diff --git a/git/__init__.py b/git/__init__.py index e2d123fa5..be8338ddc 100644 --- a/git/__init__.py +++ b/git/__init__.py @@ -61,8 +61,85 @@ def _init_externals() -> None: # } END imports -__all__ = [name for name, obj in locals().items() if not (name.startswith("_") or inspect.ismodule(obj))] - +# __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__ = [ + "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 0786a8e8a..5110d502d 100644 --- a/git/exc.py +++ b/git/exc.py @@ -2,11 +2,20 @@ # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under -# the BSD License: https://opensource.org/license/bsd-3-clause/ -""" 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 +# the BSD License: http://www.opensource.org/licenses/bsd-license.php +""" Module containing all exceptions thrown throughout the git package """ + +from gitdb.exc import ( # noqa: @UnusedImport + AmbiguousObjectName, + BadName, + BadObject, + BadObjectType, + InvalidDBRoot, + ODBError, + ParseError, + UnsupportedOperation, + to_hex_sha, +) from git.compat import safe_decode from git.util import remove_password_if_present
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: