From 07f071e4cb8b6265c63f5e816a07138af3738c16 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Thu, 31 Oct 2024 03:57:01 -0700 Subject: [PATCH] Update the return type of `_get_template` as it seems to be wrongly annotated before. PiperOrigin-RevId: 691745311 --- pytype/abstract/_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytype/abstract/_base.py b/pytype/abstract/_base.py index 3c07847f7..59bb517dc 100644 --- a/pytype/abstract/_base.py +++ b/pytype/abstract/_base.py @@ -86,7 +86,7 @@ def official_name(self, official_name: str) -> None: self._official_name = official_name @property - def all_template_names(self) -> "set[BaseValue | str]": + def all_template_names(self) -> "set[str]": if self._all_template_names is None: self._all_template_names = _get_template(self) return self._all_template_names @@ -433,7 +433,7 @@ def should_set_self_annot(self) -> bool: # pytype: enable=attribute-error -def _get_template(val: BaseValue) -> set[BaseValue | str]: +def _get_template(val: BaseValue) -> set[str]: """Get the value's class template.""" if _isinstance(val, "Class"): res = {t.full_name for t in val.template}