False positive: Various dict-access checks fail when using NewType for Dict[str,str] #7474
Labels
False Positive 🦟
A message is emitted but nothing is wrong with the code
Needs astroid Brain 🧠
Needs a brain tip in astroid (then an astroid upgrade)
Needs PR
This issue is accepted, sufficiently specified and now needs an implementation
Bug description
When using a NewType type definition based on
Dict[str,str]
and using regular dict-access methods, this generates various false positive warnings, e.g.unsupported-assignment-operation
,unsubscriptable-object
.Sample code:
Possibly related issues:
For Tuples: #4944
For Lists: #2296
Configuration
No response
Command used
Pylint output
Expected behavior
No issues should be reported, as the dict-access is correct.
Pylint version
OS / Environment
MacOS on M1 Mac (arm64-architecture)
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: