False positive no-member
error if the __new__
static method replaces returning class
#7258
Labels
Astroid
Related to astroid
False Positive 🦟
A message is emitted but nothing is wrong with the code
Needs PR
This issue is accepted, sufficiently specified and now needs an implementation
Bug description
The dunder method __new__ may return object not necessary corresponding to the first argument. Pylint could infer actual variable type after construction if astroid looked deeper into the method.
Configuration
No response
Command used
Pylint output
Expected behavior
No false error.
Pylint version
OS / Environment
Ubuntu 22.04 (Jammy Jellyfish)
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: