Skip to content

Commit

Permalink
Update the return type of _get_template as it seems to be wrongly a…
Browse files Browse the repository at this point in the history
…nnotated before.

PiperOrigin-RevId: 691745311
  • Loading branch information
h-joo authored and copybara-github committed Oct 31, 2024
1 parent efd1678 commit 07f071e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pytype/abstract/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 07f071e

Please sign in to comment.