GitHub user potiuk edited a comment on the discussion: How should we import Task SDK items in core?
BTW. We **could** potentially allow relative import as well, I am abit hesitant, because it makes refactorings more difficult, also some ways of importing code (for example inporting our DAG files) might drop the information about base /relative imports (we saw it happening in the past where relative imports were not working). For example if we are in `ariflow.sdk.__init__.py` we could do: ```python import .definitions.SomeDefinition ``` But IMHO that is a bit implicit and while it's shorter to write, it's also much more difficult to read, and causes extra cognitive load - because you need to know where you are. And when in doubt, I prefer optimizing for reading rather than writing. GitHub link: https://github.com/apache/airflow/discussions/47486#discussioncomment-12424561 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
