Skip to content

Commit dc5dafb

Browse files
authored
Avoid extra isinstance calls in _builtin_filter_predicate (#2544)
1 parent 5982618 commit dc5dafb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

astroid/brain/brain_builtin_inference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ def _builtin_filter_predicate(node, builtin_name) -> bool:
189189
# Match = type(...)
190190
# ```
191191
return False
192-
if isinstance(node.func, nodes.Name) and node.func.name == builtin_name:
193-
return True
192+
if isinstance(node.func, nodes.Name):
193+
return node.func.name == builtin_name
194194
if isinstance(node.func, nodes.Attribute):
195195
return (
196196
node.func.attrname == "fromkeys"

0 commit comments

Comments
 (0)