Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 19, 2024
1 parent 494375f commit 4597886
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pylint/checkers/typecheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -2197,7 +2197,9 @@ def _check_await_outside_coroutine(self, node: nodes.Await) -> None:
while not isinstance(node_scope, nodes.Module):
if isinstance(node_scope, nodes.AsyncFunctionDef):
return
if isinstance(node_scope, nodes.FunctionDef) or isinstance(node_scope, nodes.Lambda):
if isinstance(node_scope, nodes.FunctionDef) or isinstance(
node_scope, nodes.Lambda
):
break
node_scope = node_scope.parent.scope()
self.add_message("await-outside-async", node=node)
Expand Down

0 comments on commit 4597886

Please sign in to comment.