uranusjr commented on code in PR #73118:
URL: https://github.com/apache/airflow/pull/73118#discussion_r4004296722
##########
task-sdk/src/airflow/sdk/importers/python_importer.py:
##########
@@ -155,68 +209,50 @@ def get_source_code(self, definition: DagDefinition) ->
DagSourceCode:
source_code="# Sourceless bytecode (.pyc) — source code not
available\n",
language="python",
)
- return DagSourceCode(
- source_code=definition.read_text(encoding="utf-8"),
- language="python",
- )
-
- def might_contain_dag(self, file_path: str | Path, safe_mode: bool = True)
-> bool:
- """Check whether a file might contain Airflow DAGs according to safe
mode heuristics."""
- if not safe_mode:
- return True
- return might_contain_dag(str(file_path), safe_mode, conf=conf)
+ return
DagSourceCode(source_code=definition.read_text(encoding="utf-8"),
language="python")
def _load_modules_from_file(
Review Comment:
Good point
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]