Skip to content

Commit

Permalink
[fixup] cast to bool
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Jul 1, 2023
1 parent 010172e commit 40be546
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pylint/checkers/typecheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -1316,9 +1316,9 @@ def _is_builtin_no_return(node: nodes.Assign) -> bool:
return (
isinstance(node.value, nodes.Call)
and isinstance(node.value.func, nodes.Attribute)
and (inferred := utils.safe_infer(node.value.func.expr))
and bool(inferred := utils.safe_infer(node.value.func.expr))
and isinstance(inferred, bases.Instance)
and (pytype := inferred.pytype())
and bool(pytype := inferred.pytype())
and pytype.startswith("builtins")
and pytype in BUILTINS_RETURN_NONE
and node.value.func.attrname in BUILTINS_RETURN_NONE[pytype]
Expand Down

0 comments on commit 40be546

Please sign in to comment.