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

Commitb32ef65

Browse files
committed
Improve order of imports and __all__ in git.repo submodules
1 parentb25dd7e commitb32ef65

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

‎git/repo/base.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
from __future__importannotations
77

8+
__all__= ("Repo",)
9+
810
importgc
911
importlogging
1012
importos
@@ -92,8 +94,6 @@
9294

9395
_logger=logging.getLogger(__name__)
9496

95-
__all__= ("Repo",)
96-
9797

9898
classBlameEntry(NamedTuple):
9999
commit:Dict[str,Commit]

‎git/repo/fun.py‎

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,31 @@
55

66
from __future__importannotations
77

8+
__all__= (
9+
"rev_parse",
10+
"is_git_dir",
11+
"touch",
12+
"find_submodule_git_dir",
13+
"name_to_object",
14+
"short_to_long",
15+
"deref_tag",
16+
"to_commit",
17+
"find_worktree_git_dir",
18+
)
19+
820
importos
921
importos.pathasosp
1022
frompathlibimportPath
1123
importstat
1224
fromstringimportdigits
1325

26+
fromgitdb.excimportBadName,BadObject
27+
1428
fromgit.cmdimportGit
1529
fromgit.excimportWorkTreeRepositoryUnsupported
1630
fromgit.objectsimportObject
1731
fromgit.refsimportSymbolicReference
18-
fromgit.utilimporthex_to_bin,bin_to_hex,cygpath
19-
fromgitdb.excimportBadName,BadObject
32+
fromgit.utilimportcygpath,bin_to_hex,hex_to_bin
2033

2134
# Typing ----------------------------------------------------------------------
2235

@@ -29,22 +42,11 @@
2942
fromgit.objectsimportCommit,TagObject
3043
fromgit.refs.referenceimportReference
3144
fromgit.refs.tagimportTag
45+
3246
from .baseimportRepo
3347

3448
# ----------------------------------------------------------------------------
3549

36-
__all__= (
37-
"rev_parse",
38-
"is_git_dir",
39-
"touch",
40-
"find_submodule_git_dir",
41-
"name_to_object",
42-
"short_to_long",
43-
"deref_tag",
44-
"to_commit",
45-
"find_worktree_git_dir",
46-
)
47-
4850

4951
deftouch(filename:str)->str:
5052
withopen(filename,"ab"):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp