mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
Merge pull request #2374 from tausbn/python-fix-mappingproxytype-fp
Python: Fix non-container FP relating to `MappingProxyType`.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user