Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/airflow/serialization/enums.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

40 statements  

1# 

2# Licensed to the Apache Software Foundation (ASF) under one 

3# or more contributor license agreements. See the NOTICE file 

4# distributed with this work for additional information 

5# regarding copyright ownership. The ASF licenses this file 

6# to you under the Apache License, Version 2.0 (the 

7# "License"); you may not use this file except in compliance 

8# with the License. You may obtain a copy of the License at 

9# 

10# http://www.apache.org/licenses/LICENSE-2.0 

11# 

12# Unless required by applicable law or agreed to in writing, 

13# software distributed under the License is distributed on an 

14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 

15# KIND, either express or implied. See the License for the 

16# specific language governing permissions and limitations 

17# under the License. 

18"""Enums for DAG serialization.""" 

19 

20from __future__ import annotations 

21 

22from enum import Enum, unique 

23 

24 

25# Fields of an encoded object in serialization. 

26@unique 

27class Encoding(str, Enum): 

28 """Enum of encoding constants.""" 

29 

30 TYPE = "__type" 

31 VAR = "__var" 

32 

33 

34# Supported types for encoding. primitives and list are not encoded. 

35@unique 

36class DagAttributeTypes(str, Enum): 

37 """Enum of supported attribute types of DAG.""" 

38 

39 DAG = "dag" 

40 DATASET_EVENT_ACCESSORS = "dataset_event_accessors" 

41 DATASET_EVENT_ACCESSOR = "dataset_event_accessor" 

42 OP = "operator" 

43 DATETIME = "datetime" 

44 TIMEDELTA = "timedelta" 

45 TIMEZONE = "timezone" 

46 RELATIVEDELTA = "relativedelta" 

47 BASE_TRIGGER = "base_trigger" 

48 AIRFLOW_EXC_SER = "airflow_exc_ser" 

49 DICT = "dict" 

50 SET = "set" 

51 TUPLE = "tuple" 

52 POD = "k8s.V1Pod" 

53 TASK_GROUP = "taskgroup" 

54 EDGE_INFO = "edgeinfo" 

55 PARAM = "param" 

56 XCOM_REF = "xcomref" 

57 DATASET = "dataset" 

58 DATASET_ANY = "dataset_any" 

59 DATASET_ALL = "dataset_all" 

60 SIMPLE_TASK_INSTANCE = "simple_task_instance" 

61 BASE_JOB = "Job" 

62 TASK_INSTANCE = "task_instance" 

63 DAG_RUN = "dag_run" 

64 DAG_MODEL = "dag_model" 

65 DATA_SET = "data_set" 

66 LOG_TEMPLATE = "log_template" 

67 CONNECTION = "connection" 

68 TASK_CONTEXT = "task_context" 

69 ARG_NOT_SET = "arg_not_set"