Skip to content

Commit

Permalink
allow for airflow dep to be present during type check
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolfix committed Dec 11, 2024
1 parent 08f8ee3 commit accb62d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dlt/common/configuration/specs/config_providers_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def _airflow_providers() -> List[ConfigProvider]:
# check if we are in task context and provide more info
from airflow.operators.python import get_current_context # noqa

ti: TaskInstance = get_current_context()["ti"]
ti: TaskInstance = get_current_context()["ti"] # type: ignore[assignment,unused-ignore]

# log outside of stderr/out redirect
if secrets_toml_var is None:
Expand Down
2 changes: 1 addition & 1 deletion dlt/helpers/airflow_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def _run(

# use task logger
if self.use_task_logger:
ti: TaskInstance = get_current_context()["ti"]
ti: TaskInstance = get_current_context()["ti"] # type: ignore[assignment,unused-ignore]
logger.LOGGER = ti.log

# set global number of buffered items
Expand Down

0 comments on commit accb62d

Please sign in to comment.