Merge pull request #2374 from tausbn/python-fix-mappingproxytype-fp

Python: Fix non-container FP relating to `MappingProxyType`.
This commit is contained in:
Rasmus Wriedt Larsen
2019-11-19 13:13:26 +01:00
committed by GitHub
3 changed files with 28 additions and 11 deletions

View File

@@ -234,3 +234,11 @@ def func():
except TypeError:
return 1
return 0
# False positive for py/member-test-non-container
# Container wrapped in MappingProxyType
from types import MappingProxyType
def mpt_arg(d=MappingProxyType({})):
return 1 in d