You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python_modules/dagster/dagster/_core/definitions/op_definition.py:53:42: TCH004 [*] Move import `.decorators.op_decorator.DecoratedOpFunction` out of type-checking block. Import is used for more than type hinting.
But this isn't the case-- all the places where DecoratedOpFunction is used outside of type annotations, there is a function-local import covering it. When ruff autofixes this it pulls the import out of the TYPE_CHECKING block which then causes a circular import error.
The text was updated successfully, but these errors were encountered:
I was unable to create a simple reproduction of this, but TCH004 on ruff 0.0.271 gives several false positives in Dagster when there are function-local imports. Running ruff on https://github.com/dagster-io/dagster/blame/master/python_modules/dagster/dagster/_core/definitions/op_definition.py will give this error:
But this isn't the case-- all the places where
DecoratedOpFunction
is used outside of type annotations, there is a function-local import covering it. When ruff autofixes this it pulls the import out of theTYPE_CHECKING
block which then causes a circular import error.The text was updated successfully, but these errors were encountered: