Chris Histe
12/12/2022, 6:10 PMcontext
missing from function calls since it’s injected by Dagster.jamie
12/13/2022, 5:34 PMsean
12/13/2022, 5:37 PMChris Histe
12/15/2022, 1:51 PMundefined-variable
error when I have context as the first argument on an @op
, and when I call that op I’m getting a no-value-for-parameter
because I’m not passing the context.
I’m pretty sure it can be fixed by explicitly disabling those rules with context
but I assume there might be some other Dagster specific rules so I was wondering if you had a lint config you could share with the community (or even better a plugin).Chris Histe
12/19/2022, 9:42 PMsean
12/19/2022, 9:45 PMsean
12/19/2022, 9:52 PMmypy
nor pyright
flag this:
from dagster import OpExecutionContext, op
@op
def foo(context: OpExecutionContext):
return 1
foo()
sean
12/19/2022, 9:58 PMpylint
typecheck
checker and using mypy or pyright for typechecking instead. However, if you don’t want to do that, I believe you can configure pylint’s --signature-mutators
option to tell it that dagster.op
etc change function signatures, and that should stop it from raising errors for functions decorated with the specified decorators:
https://pylint.pycqa.org/en/latest/user_guide/configuration/all-options.html#signature-mutatorsChris Histe
12/20/2022, 3:30 PMpylint
and mypy
. We don’t want to turn off pylint
. Thanks for sharing that link it looks like what we need indeed. I was hoping you would have a recommended pylint config since it’s probably the most used linter. I’ll check out pyright
maybe I can remove the problem without spending time on config 🙂sean
12/20/2022, 4:07 PMWe don’t want to turn off pylintJust want to make sure you’re aware that you don’t have to turn off
pylint
entirely to turn off its typecheck
checker (the part that overlaps mypy).sean
12/20/2022, 4:08 PMtypecheck
disabled: https://github.com/dagster-io/dagster/blame/master/pyproject.toml#L137Chris Histe
12/20/2022, 6:25 PM