Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitdf777fd

Browse files
authored
Merge pull request#1719 from EliahKagan/static-all
Add `__all__` in git.exc
2 parents44102f3 +2af3679 commitdf777fd

File tree

3 files changed

+35
-6
lines changed

3 files changed

+35
-6
lines changed

‎git/__init__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66
# flake8: noqa
77
# @PydevCodeAnalysisIgnore
88
fromgit.excimport*# @NoMove @IgnorePep8
9-
importinspect
109
importos
11-
importsys
1210
importos.pathasosp
11+
importsys
1312

14-
fromtypingimportOptional
13+
fromtypingimportList,Optional,Sequence,Tuple,Union,TYPE_CHECKING
1514
fromgit.typesimportPathLike
1615

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

4039
# { Imports
4140

41+
fromgitdb.utilimportto_hex_sha
42+
4243
try:
44+
fromgit.compatimportsafe_decode# @NoMove @IgnorePep8
4345
fromgit.configimportGitConfigParser# @NoMove @IgnorePep8
4446
fromgit.objectsimport*# @NoMove @IgnorePep8
4547
fromgit.refsimport*# @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
exceptGitErroras_exc:

‎git/db.py

Lines 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
fromgit.utilimportbin_to_hex,hex_to_bin
33
fromgitdb.baseimportOInfo,OStream
4-
fromgitdb.dbimportGitDB# @UnusedImport
4+
fromgitdb.dbimportGitDB
55
fromgitdb.dbimportLooseObjectDB
66

77
fromgitdb.excimportBadObject

‎git/exc.py

Lines 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-
fromgitdb.excimport (# 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+
fromgitdb.excimport (
936
AmbiguousObjectName,
1037
BadName,
1138
BadObject,
@@ -14,7 +41,6 @@
1441
ODBError,
1542
ParseError,
1643
UnsupportedOperation,
17-
to_hex_sha,
1844
)
1945
fromgit.compatimportsafe_decode
2046
fromgit.utilimportremove_password_if_present

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp