From 0b43f3051dbcfdc4eae000257aa3efa9da5ace2d Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Wed, 25 Dec 2024 14:12:30 +0100 Subject: [PATCH] Update black formatting for Python 3.9 --- mypy/checkexpr.py | 7 ++++--- mypyc/test/test_run.py | 7 ++++--- pyproject.toml | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/mypy/checkexpr.py b/mypy/checkexpr.py index 3ad125cc8bbe..964149fa8df4 100644 --- a/mypy/checkexpr.py +++ b/mypy/checkexpr.py @@ -5345,9 +5345,10 @@ def visit_lambda_expr(self, e: LambdaExpr) -> Type: self.chk.return_types.append(AnyType(TypeOfAny.special_form)) # Type check everything in the body except for the final return # statement (it can contain tuple unpacking before return). - with self.chk.binder.frame_context( - can_skip=True, fall_through=0 - ), self.chk.scope.push_function(e): + with ( + self.chk.binder.frame_context(can_skip=True, fall_through=0), + self.chk.scope.push_function(e), + ): # Lambdas can have more than one element in body, # when we add "fictional" AssignmentStatement nodes, like in: # `lambda (a, b): a` diff --git a/mypyc/test/test_run.py b/mypyc/test/test_run.py index 8048870a79f2..0f3be7891779 100644 --- a/mypyc/test/test_run.py +++ b/mypyc/test/test_run.py @@ -146,9 +146,10 @@ class TestRun(MypycDataSuite): def run_case(self, testcase: DataDrivenTestCase) -> None: # setup.py wants to be run from the root directory of the package, which we accommodate # by chdiring into tmp/ - with use_custom_builtins( - os.path.join(self.data_prefix, ICODE_GEN_BUILTINS), testcase - ), chdir_manager("tmp"): + with ( + use_custom_builtins(os.path.join(self.data_prefix, ICODE_GEN_BUILTINS), testcase), + chdir_manager("tmp"), + ): self.run_case_inner(testcase) def run_case_inner(self, testcase: DataDrivenTestCase) -> None: diff --git a/pyproject.toml b/pyproject.toml index 8be581b44761..24f13921eaf8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -92,7 +92,7 @@ mypy = [ [tool.black] line-length = 99 -target-version = ["py38", "py39", "py310", "py311", "py312"] +target-version = ["py39", "py310", "py311", "py312", "py313"] skip-magic-trailing-comma = true force-exclude = ''' ^/mypy/typeshed|