|
5 | 5 |
|
6 | 6 | # @PydevCodeAnalysisIgnore |
7 | 7 |
|
8 | | -__version__="git" |
9 | | - |
10 | | -fromtypingimportList,Optional,Sequence,Tuple,Union,TYPE_CHECKING |
11 | | - |
12 | | -fromgitdb.utilimportto_hex_sha |
13 | | -fromgit.excimport*# noqa: F403 # @NoMove @IgnorePep8 |
14 | | -fromgit.typesimportPathLike |
15 | | - |
16 | | -try: |
17 | | -fromgit.compatimportsafe_decode# @NoMove @IgnorePep8 |
18 | | -fromgit.configimportGitConfigParser# @NoMove @IgnorePep8 |
19 | | -fromgit.objectsimport*# noqa: F403 # @NoMove @IgnorePep8 |
20 | | -fromgit.refsimport*# noqa: F403 # @NoMove @IgnorePep8 |
21 | | -fromgit.diffimport*# noqa: F403 # @NoMove @IgnorePep8 |
22 | | -fromgit.dbimport*# noqa: F403 # @NoMove @IgnorePep8 |
23 | | -fromgit.cmdimportGit# @NoMove @IgnorePep8 |
24 | | -fromgit.repoimportRepo# @NoMove @IgnorePep8 |
25 | | -fromgit.remoteimport*# noqa: F403 # @NoMove @IgnorePep8 |
26 | | -fromgit.indeximport*# noqa: F403 # @NoMove @IgnorePep8 |
27 | | -fromgit.utilimport (# @NoMove @IgnorePep8 |
28 | | -LockFile, |
29 | | -BlockingLockFile, |
30 | | -Stats, |
31 | | -Actor, |
32 | | -remove_password_if_present, |
33 | | -rmtree, |
34 | | - ) |
35 | | -exceptGitErroras_exc:# noqa: F405 |
36 | | -raiseImportError("%s: %s"% (_exc.__class__.__name__,_exc))from_exc |
37 | | - |
38 | | -# __all__ must be statically defined by py.typed support |
39 | | -# __all__ = [name for name, obj in locals().items() if not (name.startswith("_") or inspect.ismodule(obj))] |
40 | 8 | __all__= [# noqa: F405 |
41 | 9 | "Actor", |
42 | 10 | "AmbiguousObjectName", |
|
52 | 20 | "CommandError", |
53 | 21 | "Commit", |
54 | 22 | "Diff", |
| 23 | +"DiffConstants", |
55 | 24 | "DiffIndex", |
56 | 25 | "Diffable", |
57 | 26 | "FetchInfo", |
|
65 | 34 | "HEAD", |
66 | 35 | "Head", |
67 | 36 | "HookExecutionError", |
| 37 | +"INDEX", |
68 | 38 | "IndexEntry", |
69 | 39 | "IndexFile", |
70 | 40 | "IndexObject", |
71 | 41 | "InvalidDBRoot", |
72 | 42 | "InvalidGitRepositoryError", |
73 | | -"List", |
| 43 | +"List",# Deprecated - import this from `typing` instead. |
74 | 44 | "LockFile", |
75 | 45 | "NULL_TREE", |
76 | 46 | "NoSuchPathError", |
77 | 47 | "ODBError", |
78 | 48 | "Object", |
79 | | -"Optional", |
| 49 | +"Optional",# Deprecated - import this from `typing` instead. |
80 | 50 | "ParseError", |
81 | 51 | "PathLike", |
82 | 52 | "PushInfo", |
|
90 | 60 | "RepositoryDirtyError", |
91 | 61 | "RootModule", |
92 | 62 | "RootUpdateProgress", |
93 | | -"Sequence", |
| 63 | +"Sequence",# Deprecated - import from `typing`, or `collections.abc` in 3.9+. |
94 | 64 | "StageType", |
95 | 65 | "Stats", |
96 | 66 | "Submodule", |
97 | 67 | "SymbolicReference", |
98 | | -"TYPE_CHECKING", |
| 68 | +"TYPE_CHECKING",# Deprecated - import this from `typing` instead. |
99 | 69 | "Tag", |
100 | 70 | "TagObject", |
101 | 71 | "TagReference", |
102 | 72 | "Tree", |
103 | 73 | "TreeModifier", |
104 | | -"Tuple", |
105 | | -"Union", |
| 74 | +"Tuple",# Deprecated - import this from `typing` instead. |
| 75 | +"Union",# Deprecated - import this from `typing` instead. |
106 | 76 | "UnmergedEntriesError", |
107 | 77 | "UnsafeOptionError", |
108 | 78 | "UnsafeProtocolError", |
109 | 79 | "UnsupportedOperation", |
110 | 80 | "UpdateProgress", |
111 | 81 | "WorkTreeRepositoryUnsupported", |
| 82 | +"refresh", |
112 | 83 | "remove_password_if_present", |
113 | 84 | "rmtree", |
114 | 85 | "safe_decode", |
115 | 86 | "to_hex_sha", |
116 | 87 | ] |
117 | 88 |
|
| 89 | +__version__="git" |
| 90 | + |
| 91 | +fromtypingimportList,Optional,Sequence,Tuple,Union,TYPE_CHECKING |
| 92 | + |
| 93 | +fromgitdb.utilimportto_hex_sha |
| 94 | +fromgit.excimport*# noqa: F403 # @NoMove @IgnorePep8 |
| 95 | +fromgit.typesimportPathLike |
| 96 | + |
| 97 | +try: |
| 98 | +fromgit.compatimportsafe_decode# @NoMove @IgnorePep8 |
| 99 | +fromgit.configimportGitConfigParser# @NoMove @IgnorePep8 |
| 100 | +fromgit.objectsimport*# noqa: F403 # @NoMove @IgnorePep8 |
| 101 | +fromgit.refsimport*# noqa: F403 # @NoMove @IgnorePep8 |
| 102 | +fromgit.diffimport*# noqa: F403 # @NoMove @IgnorePep8 |
| 103 | +fromgit.dbimport*# noqa: F403 # @NoMove @IgnorePep8 |
| 104 | +fromgit.cmdimportGit# @NoMove @IgnorePep8 |
| 105 | +fromgit.repoimportRepo# @NoMove @IgnorePep8 |
| 106 | +fromgit.remoteimport*# noqa: F403 # @NoMove @IgnorePep8 |
| 107 | +fromgit.indeximport*# noqa: F403 # @NoMove @IgnorePep8 |
| 108 | +fromgit.utilimport (# @NoMove @IgnorePep8 |
| 109 | +LockFile, |
| 110 | +BlockingLockFile, |
| 111 | +Stats, |
| 112 | +Actor, |
| 113 | +remove_password_if_present, |
| 114 | +rmtree, |
| 115 | + ) |
| 116 | +exceptGitErroras_exc:# noqa: F405 |
| 117 | +raiseImportError("%s: %s"% (_exc.__class__.__name__,_exc))from_exc |
| 118 | + |
118 | 119 | # { Initialize git executable path |
119 | 120 | GIT_OK=None |
120 | 121 |
|
@@ -146,7 +147,7 @@ def refresh(path: Optional[PathLike] = None) -> None: |
146 | 147 | ifnotGit.refresh(path=path): |
147 | 148 | return |
148 | 149 | ifnotFetchInfo.refresh():# noqa: F405 |
149 | | -return# type: ignore[unreachable] |
| 150 | +return# type: ignore[unreachable] |
150 | 151 |
|
151 | 152 | GIT_OK=True |
152 | 153 |
|
|