Avoid boolean-trap rules for positional-only builtin calls (#3075)

This commit is contained in:
Charlie Marsh 2023-02-20 18:08:18 -05:00 committed by GitHub
parent 6e02405bd6
commit 35f7f7b66d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -57,6 +57,8 @@ dict.fromkeys(("world",), True)
{}.deploy(True, False)
getattr(someobj, attrname, False)
mylist.index(True)
int(True)
str(int(False))
class Registry:

View File

@ -50,6 +50,10 @@ const FUNC_CALL_NAME_ALLOWLIST: &[&str] = &[
"pop",
"setattr",
"setdefault",
"str",
"bytes",
"int",
"float",
];
const FUNC_DEF_NAME_ALLOWLIST: &[&str] = &["__setitem__"];