mirror of https://github.com/astral-sh/ruff
Avoid boolean-trap rules for positional-only builtin calls (#3075)
This commit is contained in:
parent
6e02405bd6
commit
35f7f7b66d
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -50,6 +50,10 @@ const FUNC_CALL_NAME_ALLOWLIST: &[&str] = &[
|
|||
"pop",
|
||||
"setattr",
|
||||
"setdefault",
|
||||
"str",
|
||||
"bytes",
|
||||
"int",
|
||||
"float",
|
||||
];
|
||||
|
||||
const FUNC_DEF_NAME_ALLOWLIST: &[&str] = &["__setitem__"];
|
||||
|
|
|
|||
Loading…
Reference in New Issue