|
5 | 5 |
|
6 | 6 | # @PydevCodeAnalysisIgnore |
7 | 7 |
|
8 | | -__all__= [# noqa: F405 |
| 8 | +__all__= [ |
9 | 9 | "Actor", |
10 | 10 | "AmbiguousObjectName", |
11 | 11 | "BadName", |
|
88 | 88 |
|
89 | 89 | __version__="git" |
90 | 90 |
|
91 | | -fromtypingimportList,Optional,Sequence,Tuple,Union,TYPE_CHECKING |
| 91 | +fromtypingimportList,Optional,Sequence,TYPE_CHECKING,Tuple,Union |
92 | 92 |
|
93 | 93 | fromgitdb.utilimportto_hex_sha |
94 | | -fromgit.excimport*# noqa: F403 # @NoMove @IgnorePep8 |
| 94 | + |
| 95 | +fromgit.excimport ( |
| 96 | +AmbiguousObjectName, |
| 97 | +BadName, |
| 98 | +BadObject, |
| 99 | +BadObjectType, |
| 100 | +CacheError, |
| 101 | +CheckoutError, |
| 102 | +CommandError, |
| 103 | +GitCommandError, |
| 104 | +GitCommandNotFound, |
| 105 | +GitError, |
| 106 | +HookExecutionError, |
| 107 | +InvalidDBRoot, |
| 108 | +InvalidGitRepositoryError, |
| 109 | +NoSuchPathError, |
| 110 | +ODBError, |
| 111 | +ParseError, |
| 112 | +RepositoryDirtyError, |
| 113 | +UnmergedEntriesError, |
| 114 | +UnsafeOptionError, |
| 115 | +UnsafeProtocolError, |
| 116 | +UnsupportedOperation, |
| 117 | +WorkTreeRepositoryUnsupported, |
| 118 | +) |
95 | 119 | fromgit.typesimportPathLike |
96 | 120 |
|
97 | 121 | 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, |
| 122 | +fromgit.compatimportsafe_decode# @NoMove |
| 123 | +fromgit.configimportGitConfigParser# @NoMove |
| 124 | +fromgit.objectsimport (# @NoMove |
| 125 | +Blob, |
| 126 | +Commit, |
| 127 | +IndexObject, |
| 128 | +Object, |
| 129 | +RootModule, |
| 130 | +RootUpdateProgress, |
| 131 | +Submodule, |
| 132 | +TagObject, |
| 133 | +Tree, |
| 134 | +TreeModifier, |
| 135 | +UpdateProgress, |
| 136 | + ) |
| 137 | +fromgit.refsimport (# @NoMove |
| 138 | +HEAD, |
| 139 | +Head, |
| 140 | +RefLog, |
| 141 | +RefLogEntry, |
| 142 | +Reference, |
| 143 | +RemoteReference, |
| 144 | +SymbolicReference, |
| 145 | +Tag, |
| 146 | +TagReference, |
| 147 | +head,# noqa: F401 # Nonpublic. May disappear! Use git.refs.head. |
| 148 | +log,# noqa: F401 # Nonpublic. May disappear! Use git.refs.log. |
| 149 | +reference,# noqa: F401 # Nonpublic. May disappear! Use git.refs.reference. |
| 150 | +symbolic,# noqa: F401 # Nonpublic. May disappear! Use git.refs.symbolic. |
| 151 | +tag,# noqa: F401 # Nonpublic. May disappear! Use git.refs.tag. |
| 152 | + ) |
| 153 | +fromgit.diffimport (# @NoMove |
| 154 | +INDEX, |
| 155 | +NULL_TREE, |
| 156 | +Diff, |
| 157 | +DiffConstants, |
| 158 | +DiffIndex, |
| 159 | +Diffable, |
| 160 | + ) |
| 161 | +fromgit.dbimportGitCmdObjectDB,GitDB# @NoMove |
| 162 | +fromgit.cmdimportGit# @NoMove |
| 163 | +fromgit.repoimportRepo# @NoMove |
| 164 | +fromgit.remoteimportFetchInfo,PushInfo,Remote,RemoteProgress# @NoMove |
| 165 | +fromgit.indeximport (# @NoMove |
| 166 | +BaseIndexEntry, |
| 167 | +BlobFilter, |
| 168 | +CheckoutError, |
| 169 | +IndexEntry, |
| 170 | +IndexFile, |
| 171 | +StageType, |
| 172 | +base,# noqa: F401 # Nonpublic. May disappear! Use git.index.base. |
| 173 | +fun,# noqa: F401 # Nonpublic. May disappear! Use git.index.fun. |
| 174 | +typ,# noqa: F401 # Nonpublic. May disappear! Use git.index.typ. |
| 175 | +# |
| 176 | +# NOTE: The expression `git.util` evaluates to git.index.util, and the import |
| 177 | +# `from git import util` imports git.index.util, NOT git.util. It may not be |
| 178 | +# feasible to change this until the next major version, to avoid breaking code |
| 179 | +# inadvertently relying on it. If git.index.util really is what you want, use or |
| 180 | +# import from that name, to avoid confusion. To use the "real" git.util module, |
| 181 | +# write `from git.util import ...`, or access it as `sys.modules["git.util"]`. |
| 182 | +# (This differs from other historical indirect-submodule imports that are |
| 183 | +# unambiguously nonpublic and are subject to immediate removal. Here, the public |
| 184 | +# git.util module, even though different, makes it less discoverable that the |
| 185 | +# expression `git.util` refers to a non-public attribute of the git module.) |
| 186 | +util,# noqa: F401 |
| 187 | + ) |
| 188 | +fromgit.utilimport (# @NoMove |
| 189 | +Actor, |
110 | 190 | BlockingLockFile, |
| 191 | +LockFile, |
111 | 192 | Stats, |
112 | | -Actor, |
113 | 193 | remove_password_if_present, |
114 | 194 | rmtree, |
115 | 195 | ) |
116 | | -exceptGitErroras_exc:# noqa: F405 |
| 196 | +exceptGitErroras_exc: |
117 | 197 | raiseImportError("%s: %s"% (_exc.__class__.__name__,_exc))from_exc |
118 | 198 |
|
119 | 199 | # { Initialize git executable path |
|