We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using astroid 3.3.5
astroid 3.3.5
import astroid module = astroid.parse( """ def decorate(obj=None): if obj is None: return lambda x: decorate(x) if isinstance(obj, property): return property() return obj @decorate() def func() -> str: return 'foo' x = func() """ ) func = module.body[1] print(func) print(func.inferred()[0])
Astroid incorrectly infers this function as Property.func.
Property.func
This causes the final line x = func() to emit an error under pylint:
x = func()
E1111: Assigning result of a function call, where the function has no return (assignment-from-no-return)
If you change to:
@decorate def func() -> str: return 'foo'
Astroid correctly infers this as FunctionDef.func.
FunctionDef.func
This is a minimized repro of the error reported here dagster-io/dagster#24009
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Using
astroid 3.3.5
Astroid incorrectly infers this function as
Property.func
.This causes the final line
x = func()
to emit an error under pylint:If you change to:
Astroid correctly infers this as
FunctionDef.func
.This is a minimized repro of the error reported here dagster-io/dagster#24009
The text was updated successfully, but these errors were encountered: