Skip to content

Commit ed4cd38

Browse files
authored
Update black formatting for Python 3.9 (#18335)
1 parent b3eff87 commit ed4cd38

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

mypy/checkexpr.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5345,9 +5345,10 @@ def visit_lambda_expr(self, e: LambdaExpr) -> Type:
53455345
self.chk.return_types.append(AnyType(TypeOfAny.special_form))
53465346
# Type check everything in the body except for the final return
53475347
# statement (it can contain tuple unpacking before return).
5348-
with self.chk.binder.frame_context(
5349-
can_skip=True, fall_through=0
5350-
), self.chk.scope.push_function(e):
5348+
with (
5349+
self.chk.binder.frame_context(can_skip=True, fall_through=0),
5350+
self.chk.scope.push_function(e),
5351+
):
53515352
# Lambdas can have more than one element in body,
53525353
# when we add "fictional" AssignmentStatement nodes, like in:
53535354
# `lambda (a, b): a`

mypyc/test/test_run.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,10 @@ class TestRun(MypycDataSuite):
146146
def run_case(self, testcase: DataDrivenTestCase) -> None:
147147
# setup.py wants to be run from the root directory of the package, which we accommodate
148148
# by chdiring into tmp/
149-
with use_custom_builtins(
150-
os.path.join(self.data_prefix, ICODE_GEN_BUILTINS), testcase
151-
), chdir_manager("tmp"):
149+
with (
150+
use_custom_builtins(os.path.join(self.data_prefix, ICODE_GEN_BUILTINS), testcase),
151+
chdir_manager("tmp"),
152+
):
152153
self.run_case_inner(testcase)
153154

154155
def run_case_inner(self, testcase: DataDrivenTestCase) -> None:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ mypy = [
9292

9393
[tool.black]
9494
line-length = 99
95-
target-version = ["py38", "py39", "py310", "py311", "py312"]
95+
target-version = ["py39", "py310", "py311", "py312", "py313"]
9696
skip-magic-trailing-comma = true
9797
force-exclude = '''
9898
^/mypy/typeshed|

0 commit comments

Comments
 (0)