Skip to content

Commit

Permalink
Put @cached.property support behind a feature flag.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 449352208
  • Loading branch information
martindemello authored and rchen152 committed May 19, 2022
1 parent 5d1afcb commit e3dad3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pytype/config.py
Expand Up @@ -174,6 +174,8 @@ def add_basic_options(o):
"Enable return type checks for overriding methods."),
("--enable-bare-annotations", False,
"Support variable annotations without assignments."),
("--enable-cached-property", False,
"Support pyglib's @cached.property."),
]


Expand Down
3 changes: 2 additions & 1 deletion pytype/tests/test_base.py
Expand Up @@ -133,8 +133,9 @@ def setUp(self):
self.options = config.Options.create(
python_version=self.python_version,
build_dict_literals_from_kwargs=True,
enable_nested_classes=True,
enable_bare_annotations=True,
enable_cached_property=True,
enable_nested_classes=True,
overriding_default_value_checks=True,
overriding_parameter_count_checks=True,
overriding_parameter_name_checks=True,
Expand Down

0 comments on commit e3dad3b

Please sign in to comment.