uranusjr commented on code in PR #73118:
URL: https://github.com/apache/airflow/pull/73118#discussion_r4024257330
##########
shared/module_loading/src/airflow_shared/module_loading/dag_file.py:
##########
@@ -37,6 +39,13 @@ def __call__(self, file_path: str, zip_file: zipfile.ZipFile
| None = None) -> b
class _ConfLike(Protocol):
def getimport(self, section: str, key: str, **kwargs: Any) -> Any: ...
+ class _DagDefinitionLike(Protocol):
Review Comment:
`might_contain_dag` should only be used internally or in controlled paths
(admin-approved), so an isinstance check would be too defensive to me. The
caller should be responsible for the input type instead.
--
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]