Skip to content

Commit df34e0f

Browse files
committed
internal/shortcuts(refactor[typing]): Narrow VCS TypeGuard input
why: Avoid unbounded Any in local VCS guard. what: - Type is_vcs input as str
1 parent 1159095 commit df34e0f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/libvcs/_internal/shortcuts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def create_project(
127127

128128
assert vcs_matches[0].vcs is not None
129129

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

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

0 commit comments

Comments
 (0)