From 4ff12c34308c3bcf8039e8db02b4ad1db3afed3e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 21 Jun 2023 21:30:00 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- mypy/fastparse.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mypy/fastparse.py b/mypy/fastparse.py index a46313fea767..b157fd9722d4 100644 --- a/mypy/fastparse.py +++ b/mypy/fastparse.py @@ -522,7 +522,13 @@ def translate_stmt_list( stack = self.class_and_function_stack # Fast case for stripping function bodies - if can_strip and self.strip_function_bodies and len(stack) == 1 and stack[0] == "F" and not is_coroutine: + if ( + can_strip + and self.strip_function_bodies + and len(stack) == 1 + and stack[0] == "F" + and not is_coroutine + ): return [] res: list[Statement] = []