Skip to content

Commit

Permalink
fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
dstandish committed Sep 21, 2022
1 parent 9928797 commit 0189669
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions airflow/models/dagbag.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,14 @@ def __init__(

super().__init__()

if include_examples is NOTSET:
include_examples = conf.getboolean('core', 'LOAD_EXAMPLES')

if safe_mode is NOTSET:
safe_mode = conf.getboolean('core', 'DAG_DISCOVERY_SAFE_MODE')
include_examples = (
include_examples
if isinstance(include_examples, bool)
else conf.getboolean('core', 'LOAD_EXAMPLES')
)
safe_mode = (
safe_mode if isinstance(safe_mode, bool) else conf.getboolean('core', 'DAG_DISCOVERY_SAFE_MODE')
)

if store_serialized_dags:
warnings.warn(
Expand Down

0 comments on commit 0189669

Please sign in to comment.