Skip to content

Commit 1a9c044

Browse files
committed
refactor(vcs literal): Rename to VCSLiteral and move to types
1 parent 20ecccb commit 1a9c044

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

libvcs/shortcuts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from libvcs._internal.run import ProgressCallbackProtocol
77
from libvcs.exc import InvalidPipURL, InvalidVCS
88

9-
VcsLiteral = t.Literal["git", "svn", "hg"]
9+
VCSLiteral = t.Literal["git", "svn", "hg"]
1010

1111

1212
@t.overload
@@ -44,7 +44,7 @@ def create_project(
4444

4545
def create_project(
4646
url: str,
47-
vcs: VcsLiteral,
47+
vcs: VCSLiteral,
4848
progress_callback: t.Optional[ProgressCallbackProtocol] = None,
4949
*args,
5050
**kwargs

libvcs/types.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
.. _typeshed's: https://github.com/python/typeshed/blob/5df8de7/stdlib/_typeshed/__init__.pyi#L115-L118
99
""" # NOQA E501
1010
from os import PathLike
11-
from typing import Union
11+
from typing import Literal, Union
1212

1313
from typing_extensions import TypeAlias
1414

@@ -17,3 +17,7 @@
1717

1818
StrOrBytesPath: TypeAlias = Union[str, bytes, PathLike[str], PathLike[bytes]] # stable
1919
""":class:`os.PathLike`, :class:`str` or :term:`bytes-like object`"""
20+
21+
22+
VCSLiteral = Literal["git", "svn", "hg"]
23+
"""UNSTABLE: Literal of built-in VCS aliases"""

0 commit comments

Comments
 (0)