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
Run this code:
import astroid code = """ x = dict() y = x.copy() """ ast = astroid.parse(code) for name in ('x', 'y'): node = ast.locals[name][0] print(name, node.inferred())
x [<Dict.dict l.2 at 0x7fffe852e110>] y [Uninferable]
I expect y to be inferred as dict too.
y
dict
python -c "from astroid import __pkginfo__; print(__pkginfo__.version)"
2.4.2
The text was updated successfully, but these errors were encountered:
I think the same issue applies to list, set and bytearray. I think we can deal with all these at the same time.
list
set
bytearray
Sorry, something went wrong.
astroid
2.12.1
Successfully merging a pull request may close this issue.
Steps to reproduce
Run this code:
Current behavior
x [<Dict.dict l.2 at 0x7fffe852e110>]
y [Uninferable]
Expected behavior
I expect
y
to be inferred asdict
too.python -c "from astroid import __pkginfo__; print(__pkginfo__.version)"
output2.4.2
The text was updated successfully, but these errors were encountered: