FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
GitPython/git/types.py at main · NagiReddy-devops/GitPython · GitHub
NagiReddy-devops
GitPython
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
GitPython
/
git
/
types.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
54 lines (38 loc) · 1.42 KB
Breadcrumbs
GitPython
/
git
/
types.py
Copy path
File metadata and controls
54 lines (38 loc) · 1.42 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# -*- coding: utf-8 -*-
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
import
os
import
sys
from
typing
import
Dict
,
Union
,
Any
,
TYPE_CHECKING
if
sys
.
version_info
[:
2
]
>=
(
3
,
8
):
from
typing
import
Final
,
Literal
,
SupportsIndex
,
TypedDict
,
Protocol
# noqa: F401
else
:
from
typing_extensions
import
Final
,
Literal
,
SupportsIndex
,
TypedDict
,
Protocol
# noqa: F401
if
sys
.
version_info
[:
2
]
>=
(
3
,
10
):
from
typing
import
TypeGuard
# noqa: F401
else
:
from
typing_extensions
import
TypeGuard
# noqa: F401
if
sys
.
version_info
[:
2
]
<
(
3
,
9
):
PathLike
=
Union
[
str
,
os
.
PathLike
]
elif
sys
.
version_info
[:
2
]
>=
(
3
,
9
):
# os.PathLike only becomes subscriptable from Python 3.9 onwards
PathLike
=
Union
[
str
,
'os.PathLike[str]'
]
# forward ref as pylance complains unless editing with py3.9+
if
TYPE_CHECKING
:
from
git
.
objects
import
Commit
,
Tree
,
TagObject
,
Blob
# from git.refs import SymbolicReference
TBD
=
Any
Tree_ish
=
Union
[
'Commit'
,
'Tree'
]
Commit_ish
=
Union
[
'Commit'
,
'TagObject'
,
'Blob'
,
'Tree'
]
Lit_config_levels
=
Literal
[
'system'
,
'global'
,
'user'
,
'repository'
]
class
Files_TD
(
TypedDict
):
insertions
:
int
deletions
:
int
lines
:
int
class
Total_TD
(
TypedDict
):
insertions
:
int
deletions
:
int
lines
:
int
files
:
int
class
HSH_TD
(
TypedDict
):
total
:
Total_TD
files
:
Dict
[
PathLike
,
Files_TD
]
Back
|
FazBrowse Home
|
New Git URL