Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Jun 11, 2022
1 parent cc90541 commit 7272b43
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pylint/checkers/base/basic_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ def _check_using_constant_test(
elif isinstance(test, nodes.Call):
inferred_call = utils.safe_infer(test.func)
if isinstance(inferred_call, nodes.FunctionDef):
# Can't use all(x) or not any(not x) for this condition, because it
# will return True for empty generators, which is not what we want.
all_returns_were_generator = None
for return_node in inferred_call._get_return_nodes_skip_functions():
if not isinstance(return_node.value, nodes.GeneratorExp):
Expand Down

0 comments on commit 7272b43

Please sign in to comment.