Skip to content

Commit e65c156

Browse files
committed
Remove --enable-typed-dicts.
This flag was already set to always-True. PiperOrigin-RevId: 444723798
1 parent a34afd4 commit e65c156

File tree

4 files changed

+3
-17
lines changed

4 files changed

+3
-17
lines changed

pytype/config.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,6 @@ def add_basic_options(o):
160160
"Enable exhaustive checking of function parameter types."),
161161
("--enable-nested-classes", False,
162162
"Enable support for nested classes in .py files."),
163-
("--enable-typed-dicts", True,
164-
"Enable support for TypedDicts."),
165163
("--strict-primitive-comparisons", False,
166164
"Emit errors for comparisons between incompatible primitive types."),
167165
]

pytype/overlays/typing_overlay.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -425,17 +425,6 @@ def build_any(ctx):
425425
return ctx.convert.unsolvable
426426

427427

428-
def build_namedtuple(ctx):
429-
return named_tuple.NamedTupleClassBuilder(ctx)
430-
431-
432-
def build_typeddict(ctx):
433-
if ctx.options.enable_typed_dicts:
434-
return typed_dict.TypedDictBuilder(ctx)
435-
else:
436-
return not_supported_yet("TypedDict", ctx)
437-
438-
439428
def build_newtype(ctx):
440429
return NewType.make("NewType", ctx, "typing")
441430

@@ -482,13 +471,13 @@ def build_final_decorator(ctx):
482471
"Final": (overlay.build("Final", Final), (3, 8)),
483472
"Generic": (overlay.build("Generic", Generic), None),
484473
"Literal": (overlay.build("Literal", Literal), (3, 8)),
485-
"NamedTuple": (build_namedtuple, None),
474+
"NamedTuple": (named_tuple.NamedTupleClassBuilder, None),
486475
"NewType": (build_newtype, None),
487476
"NoReturn": (build_noreturn, None),
488477
"Optional": (overlay.build("Optional", Optional), None),
489478
"Tuple": (overlay.build("Tuple", Tuple), None),
490479
"TypeVar": (build_typevar, None),
491-
"TypedDict": (build_typeddict, (3, 8)),
480+
"TypedDict": (typed_dict.TypedDictBuilder, (3, 8)),
492481
"Union": (Union, None),
493482
"TYPE_CHECKING": (build_typechecking, None),
494483
"cast": (build_cast, None),

pytype/tests/test_base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ def setUp(self):
133133
self.options = config.Options.create(python_version=self.python_version,
134134
build_dict_literals_from_kwargs=True,
135135
enable_nested_classes=True,
136-
enable_typed_dicts=True,
137136
strict_namedtuple_checks=True,
138137
strict_parameter_checks=True,
139138
strict_primitive_comparisons=True,

pytype/tools/analyze_project/pytype_runner_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def setUp(self):
145145
def assertFlags(self, flags, expected_flags):
146146
# Add temporary flags that are set to true by default here, so that they are
147147
# filtered out of tests.
148-
temporary_flags = {'--enable-typed-dicts'}
148+
temporary_flags = set()
149149
self.assertEqual(flags - temporary_flags, expected_flags)
150150

151151
# --disable tests a flag with a string value.

0 commit comments

Comments
 (0)