Skip to content

Commit 9f771ca

Browse files
committed
types(shortcuts): Use t.TypeGuard namespace import
why: project style prefers namespaced typing usage (47188b8). what: - drop direct TypeGuard import and annotate helper using t.TypeGuard
1 parent eb2ea5d commit 9f771ca

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/libvcs/_internal/shortcuts.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from __future__ import annotations
99

1010
import typing as t
11-
from typing import TypeGuard
1211

1312
from libvcs import GitSync, HgSync, SvnSync, exc
1413
from libvcs._internal.run import ProgressCallbackProtocol
@@ -128,7 +127,7 @@ def create_project(
128127

129128
assert vcs_matches[0].vcs is not None
130129

131-
def is_vcs(val: t.Any) -> TypeGuard[VCSLiteral]:
130+
def is_vcs(val: t.Any) -> t.TypeGuard[VCSLiteral]:
132131
return isinstance(val, str) and val in {"git", "hg", "svn"}
133132

134133
if is_vcs(vcs_matches[0].vcs):

0 commit comments

Comments
 (0)