From c86284565ce97de07870379e52a567343d7c4662 Mon Sep 17 00:00:00 2001 From: DeflateAwning <11021263+DeflateAwning@users.noreply.github.com> Date: Tue, 12 Sep 2023 10:12:58 -0600 Subject: [PATCH] Fix dynamically-set __all__ variable --- git/__init__.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/git/__init__.py b/git/__init__.py index 6196a42d7..cc0ca2136 100644 --- a/git/__init__.py +++ b/git/__init__.py @@ -61,8 +61,19 @@ 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__ = ['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'] # { Initialize git executable path GIT_OK = None