False negative assigned-from-none
for value = dict.update({}, {})
#8714
Labels
False Negative 🦋
No message is emitted but something is wrong with the code
Help wanted 🙏
Outside help would be appreciated, good for new contributors
Needs PR
This issue is accepted, sufficiently specified and now needs an implementation
Milestone
Current problem
This mistake recently bit a coworker of mine:
Obviously this type of error one should catch in unit testing, but we didn't have tests.
mypy
can catch this only if one adds type annotations.I am wondering, can
pylint
catch this in the future, without type annotations?Desired solution
pylint
would:some_dict
is actuallyNone
dict
will failIn other words the request:
pylint
catching errors associated withNone
returns later being used as ifnot None
.Additional context
No response
The text was updated successfully, but these errors were encountered: