File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
1
"""Shortcuts"""
2
- from typing import Union
2
+ from typing import Dict , Literal , Type , Union
3
3
4
4
from libvcs import GitRepo , MercurialRepo , SubversionRepo
5
5
from libvcs .exc import InvalidPipURL , InvalidVCS
6
6
7
+ #: Default VCS systems by string (in :data:`DEFAULT_VCS_CLASS_MAP`)
8
+ DEFAULT_VCS_LITERAL = Literal ["git" , "hg" , "svn" ]
9
+ #: Union of VCS Classes
10
+ DEFAULT_VCS_CLASS_UNION = Type [Union [GitRepo , MercurialRepo , SubversionRepo ]]
11
+ #: String -> Class Map. ``DEFAULT_VCS_CLASS_MAP['git']`` -> :class:`~libvcs.git.GitRepo`
12
+ DEFAULT_VCS_CLASS_MAP : Dict [DEFAULT_VCS_LITERAL , DEFAULT_VCS_CLASS_UNION ] = {
13
+ "git" : GitRepo ,
14
+ "svn" : SubversionRepo ,
15
+ "hg" : MercurialRepo ,
16
+ }
17
+
7
18
8
19
def create_repo (
9
20
url , vcs , progress_callback = None , ** kwargs
You can’t perform that action at this time.
0 commit comments