Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit df777fd

Browse filesBrowse files
authored
Merge pull request #1719 from EliahKagan/static-all
Add `__all__` in git.exc
2 parents 44102f3 + 2af3679 commit df777fd
Copy full SHA for df777fd

File tree

3 files changed

+35
-6
lines changed
Filter options

3 files changed

+35
-6
lines changed

‎git/__init__.py

Copy file name to clipboardExpand all lines: git/__init__.py
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66
# flake8: noqa
77
# @PydevCodeAnalysisIgnore
88
from git.exc import * # @NoMove @IgnorePep8
9-
import inspect
109
import os
11-
import sys
1210
import os.path as osp
11+
import sys
1312

14-
from typing import Optional
13+
from typing import List, Optional, Sequence, Tuple, Union, TYPE_CHECKING
1514
from git.types import PathLike
1615

1716
__version__ = "git"
@@ -39,7 +38,10 @@ def _init_externals() -> None:
3938

4039
# { Imports
4140

41+
from gitdb.util import to_hex_sha
42+
4243
try:
44+
from git.compat import safe_decode # @NoMove @IgnorePep8
4345
from git.config import GitConfigParser # @NoMove @IgnorePep8
4446
from git.objects import * # @NoMove @IgnorePep8
4547
from git.refs import * # @NoMove @IgnorePep8
@@ -54,6 +56,7 @@ def _init_externals() -> None:
5456
BlockingLockFile,
5557
Stats,
5658
Actor,
59+
remove_password_if_present,
5760
rmtree,
5861
)
5962
except GitError as _exc:

‎git/db.py

Copy file name to clipboardExpand all lines: git/db.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Module with our own gitdb implementation - it uses the git command"""
22
from git.util import bin_to_hex, hex_to_bin
33
from gitdb.base import OInfo, OStream
4-
from gitdb.db import GitDB # @UnusedImport
4+
from gitdb.db import GitDB
55
from gitdb.db import LooseObjectDB
66

77
from gitdb.exc import BadObject

‎git/exc.py

Copy file name to clipboardExpand all lines: git/exc.py
+28-2Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,34 @@
55
# the BSD License: https://opensource.org/license/bsd-3-clause/
66
""" Module containing all exceptions thrown throughout the git package """
77

8-
from gitdb.exc import ( # noqa: @UnusedImport
8+
__all__ = [
9+
# Defined in gitdb.exc:
10+
"AmbiguousObjectName",
11+
"BadName",
12+
"BadObject",
13+
"BadObjectType",
14+
"InvalidDBRoot",
15+
"ODBError",
16+
"ParseError",
17+
"UnsupportedOperation",
18+
# Introduced in this module:
19+
"GitError",
20+
"InvalidGitRepositoryError",
21+
"WorkTreeRepositoryUnsupported",
22+
"NoSuchPathError",
23+
"UnsafeProtocolError",
24+
"UnsafeOptionError",
25+
"CommandError",
26+
"GitCommandNotFound",
27+
"GitCommandError",
28+
"CheckoutError",
29+
"CacheError",
30+
"UnmergedEntriesError",
31+
"HookExecutionError",
32+
"RepositoryDirtyError",
33+
]
34+
35+
from gitdb.exc import (
936
AmbiguousObjectName,
1037
BadName,
1138
BadObject,
@@ -14,7 +41,6 @@
1441
ODBError,
1542
ParseError,
1643
UnsupportedOperation,
17-
to_hex_sha,
1844
)
1945
from git.compat import safe_decode
2046
from git.util import remove_password_if_present

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.