diff --git a/git/__init__.py b/git/__init__.py index cc0ca2136..00e7b8dd3 100644 --- a/git/__init__.py +++ b/git/__init__.py @@ -63,17 +63,83 @@ def _init_externals() -> None: # __all__ must be statically defined by py.typed support # __all__ = [name for name, obj in locals().items() if not (name.startswith("_") or inspect.ismodule(obj))] -__all__ = ['BadName', 'safe_decode', - 'remove_password_if_present', 'List', 'Sequence', 'Tuple', 'Union', 'TYPE_CHECKING', - 'PathLike', 'GitError', 'InvalidGitRepositoryError', 'WorkTreeRepositoryUnsupported', - 'NoSuchPathError', 'UnsafeProtocolError', 'UnsafeOptionError', 'CommandError', 'GitCommandNotFound', - 'GitCommandError', 'CheckoutError', 'CacheError', 'UnmergedEntriesError', 'HookExecutionError', - 'RepositoryDirtyError', 'Optional', 'GitConfigParser', 'Object', 'IndexObject', 'Blob', 'Commit', - 'Submodule', 'UpdateProgress', 'RootModule', 'RootUpdateProgress', 'TagObject', 'TreeModifier', - 'Tree', 'SymbolicReference', 'Reference', 'HEAD', 'Head', 'TagReference', 'Tag', 'RemoteReference', - 'RefLog', 'RefLogEntry', 'Diffable', 'DiffIndex', 'Diff', 'NULL_TREE', 'GitCmdObjectDB', 'GitDB', - 'Git', 'Repo', 'RemoteProgress', 'PushInfo', 'FetchInfo', 'Remote', 'IndexFile', 'StageType', - 'BlobFilter', 'BaseIndexEntry', 'IndexEntry', 'LockFile', 'BlockingLockFile', 'Stats', 'Actor', 'rmtree'] +__all__ = [ + 'Actor', + 'AmbiguousObjectName', + 'BadName', + 'BadObject', + 'BadObjectType', + 'BaseIndexEntry', + 'Blob', + 'BlobFilter', + 'BlockingLockFile', + 'CacheError', + 'CheckoutError', + 'CommandError', + 'Commit', + 'Diff', + 'DiffIndex', + 'Diffable', + 'FetchInfo', + 'Git', + 'GitCmdObjectDB', + 'GitCommandError', + 'GitCommandNotFound', + 'GitConfigParser', + 'GitDB', + 'GitError', + 'HEAD', + 'Head', + 'HookExecutionError', + 'IndexEntry', + 'IndexFile', + 'IndexObject', + 'InvalidDBRoot', + 'InvalidGitRepositoryError', + 'List', + 'LockFile', + 'NULL_TREE', + 'NoSuchPathError', + 'ODBError', + 'Object', + 'Optional', + 'ParseError', + 'PathLike', + 'PushInfo', + 'RefLog', + 'RefLogEntry', + 'Reference', + 'Remote', + 'RemoteProgress', + 'RemoteReference', + 'Repo', + 'RepositoryDirtyError', + 'RootModule', + 'RootUpdateProgress', + 'Sequence', + 'StageType', + 'Stats', + 'Submodule', + 'SymbolicReference', + 'TYPE_CHECKING', + 'Tag', + 'TagObject', + 'TagReference', + 'Tree', + 'TreeModifier', + 'Tuple', + 'Union', + 'UnmergedEntriesError', + 'UnsafeOptionError', + 'UnsafeProtocolError', + 'UnsupportedOperation', + 'UpdateProgress', + 'WorkTreeRepositoryUnsupported', + 'remove_password_if_present', + 'rmtree', + 'safe_decode', + 'to_hex_sha', +] # { Initialize git executable path GIT_OK = None diff --git a/git/exc.py b/git/exc.py index 775528bf6..0c939f929 100644 --- a/git/exc.py +++ b/git/exc.py @@ -5,8 +5,17 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php """ Module containing all exceptions thrown throughout the git package, """ -from gitdb.exc import BadName # NOQA @UnusedWildImport skipcq: PYL-W0401, PYL-W0614 -from gitdb.exc import * # NOQA @UnusedWildImport skipcq: PYL-W0401, PYL-W0614 +from gitdb.exc import ( + AmbiguousObjectName, + BadName, + BadObject, + BadObjectType, + InvalidDBRoot, + ODBError, + ParseError, + UnsupportedOperation, + to_hex_sha, +) # NOQA @UnusedWildImport skipcq: PYL-W0401, PYL-W0614 from git.compat import safe_decode from git.util import remove_password_if_present