diff --git a/src/rapids_pre_commit_hooks/alpha_spec.py b/src/rapids_pre_commit_hooks/alpha_spec.py index 9d1e7d0..dd3d982 100644 --- a/src/rapids_pre_commit_hooks/alpha_spec.py +++ b/src/rapids_pre_commit_hooks/alpha_spec.py @@ -270,7 +270,7 @@ def __init__(self, stream) -> None: super().__init__(stream) self.document_anchors: list[dict[str, yaml.Node]] = [] - def compose_document(self) -> yaml.Node: + def compose_document(self) -> "yaml.Node": # Drop the DOCUMENT-START event. self.get_event() diff --git a/src/rapids_pre_commit_hooks/copyright.py b/src/rapids_pre_commit_hooks/copyright.py index e282869..9c46ad4 100644 --- a/src/rapids_pre_commit_hooks/copyright.py +++ b/src/rapids_pre_commit_hooks/copyright.py @@ -202,7 +202,7 @@ def get_target_branch_upstream_commit( key=lambda commit: commit.committed_datetime, ) - def try_get_ref(remote: git.Remote) -> Optional[git.Reference]: + def try_get_ref(remote: "git.Remote") -> Optional["git.Reference"]: try: return remote.refs[target_branch_name] except IndexError: @@ -242,7 +242,7 @@ def get_changed_files( for filename in filenames } - changed_files: dict[Union[str, os.PathLike[str]], Optional[git.Blob]] = { + changed_files: dict[Union[str, os.PathLike[str]], Optional["git.Blob"]] = { f: None for f in repo.untracked_files } target_branch_upstream_commit = get_target_branch_upstream_commit(repo, args)