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 Mar 1, 2024
1 parent 43d2a38 commit f90601c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions mypy/semanal_typeddict.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,17 +235,20 @@ def analyze_base_args(self, base: IndexExpr, ctx: Context) -> list[Type] | None:

for arg_expr in args:
try:
type = expr_to_unanalyzed_type(arg_expr, self.options,
allow_new_syntax=self.api.is_stub_file,
allow_unpack=True)
type = expr_to_unanalyzed_type(
arg_expr,
self.options,
allow_new_syntax=self.api.is_stub_file,
allow_unpack=True,
)
except TypeTranslationError:
self.fail("Invalid TypedDict type argument", ctx)
return None
analyzed = self.api.anal_type(
type,
allow_required=True,
allow_unpack=True,
allow_placeholder=not self.api.is_func_scope()
allow_placeholder=not self.api.is_func_scope(),
)
if analyzed is None:
return None
Expand Down

0 comments on commit f90601c

Please sign in to comment.