Skip to content

Commit

Permalink
Add type annotation on abstract/abstract_utils.py, and also add CFGNo…
Browse files Browse the repository at this point in the history
…de.program which were missing in the cfg.pyi.

PiperOrigin-RevId: 692920772
  • Loading branch information
h-joo authored and copybara-github committed Nov 4, 2024
1 parent ac2f0dd commit 502da7d
Show file tree
Hide file tree
Showing 4 changed files with 180 additions and 89 deletions.
4 changes: 2 additions & 2 deletions pytype/abstract/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""

from collections.abc import Collection, Sequence
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Literal

from pytype import utils
from pytype.abstract import abstract_utils
Expand Down Expand Up @@ -405,7 +405,7 @@ def init_subclass(
def update_official_name(self, _: str) -> None:
"""Update the official name."""

def is_late_annotation(self) -> bool:
def is_late_annotation(self) -> Literal[False]:
return False

def should_set_self_annot(self) -> bool:
Expand Down
Loading

0 comments on commit 502da7d

Please sign in to comment.