Skip to content

Commit 55dbef2

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c677b1c commit 55dbef2

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

mypy/semanal_typeddict.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,9 @@ def analyze_typeddict_classdef_fields(
301301
total: bool | None = True
302302
for key in defn.keywords:
303303
if key == "total":
304-
total = require_bool_literal_argument(self.api, defn.keywords["total"], "total", True)
304+
total = require_bool_literal_argument(
305+
self.api, defn.keywords["total"], "total", True
306+
)
305307
continue
306308
for_function = ' for "__init_subclass__" of "TypedDict"'
307309
self.msg.unexpected_keyword_argument_for_function(for_function, key, defn)
@@ -472,7 +474,12 @@ def check_typeddict(
472474
if isinstance(node.analyzed, TypedDictExpr):
473475
existing_info = node.analyzed.info
474476
info = self.build_typeddict_typeinfo(
475-
name, dict(zip(items, types)), required_keys, readonly_keys, call.line, existing_info
477+
name,
478+
dict(zip(items, types)),
479+
required_keys,
480+
readonly_keys,
481+
call.line,
482+
existing_info,
476483
)
477484
info.line = node.line
478485
# Store generated TypeInfo under both names, see semanal_namedtuple for more details.
@@ -591,9 +598,7 @@ def build_typeddict_typeinfo(
591598
)
592599
assert fallback is not None
593600
info = existing_info or self.api.basic_new_typeinfo(name, fallback, line)
594-
typeddict_type = TypedDictType(
595-
item_types, required_keys, readonly_keys, fallback
596-
)
601+
typeddict_type = TypedDictType(item_types, required_keys, readonly_keys, fallback)
597602
if info.special_alias and has_placeholder(info.special_alias.target):
598603
self.api.process_placeholder(
599604
None, "TypedDict item", info, force_progress=typeddict_type != info.typeddict_type

0 commit comments

Comments
 (0)