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

Commitab27827

Browse files
committed
Fix remaining old Commit_ish annotations in git.refs
(This also improves the sorting of imports where they are alreadybeing changed, and fixes a typo in a comment.)
1 parentfe7f9f2 commitab27827

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

‎git/refs/head.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515

1616
# typing ---------------------------------------------------
1717

18-
fromtypingimportAny,Sequence,Union,TYPE_CHECKING
18+
fromtypingimportAny,Sequence,TYPE_CHECKING,Union
1919

20-
fromgit.typesimportPathLike,Old_commit_ish
20+
fromgit.typesimportCommit_ish,PathLike
2121

2222
ifTYPE_CHECKING:
23-
fromgit.repoimportRepo
2423
fromgit.objectsimportCommit
2524
fromgit.refsimportRemoteReference
25+
fromgit.repoimportRepo
2626

2727
# -------------------------------------------------------------------
2828

@@ -62,7 +62,7 @@ def orig_head(self) -> SymbolicReference:
6262

6363
defreset(
6464
self,
65-
commit:Union[Old_commit_ish,SymbolicReference,str]="HEAD",
65+
commit:Union[Commit_ish,SymbolicReference,str]="HEAD",
6666
index:bool=True,
6767
working_tree:bool=False,
6868
paths:Union[PathLike,Sequence[PathLike],None]=None,
@@ -99,7 +99,7 @@ def reset(
9999
ifindex:
100100
mode="--mixed"
101101

102-
#Tt appears some git versions declare mixed and paths deprecated.
102+
#It appears some git versions declare mixed and paths deprecated.
103103
# See http://github.com/Byron/GitPython/issues#issue/2.
104104
ifpaths:
105105
mode=None

‎git/refs/reference.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
# This module is part of GitPython and is released under the
22
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
33

4-
fromgit.utilimport (
5-
LazyMixin,
6-
IterableObj,
7-
)
4+
fromgit.utilimportIterableObj,LazyMixin
85
from .symbolicimportSymbolicReference,T_References
96

10-
117
# typing ------------------------------------------------------------------
128

13-
fromtypingimportAny,Callable,Iterator,Type,Union,TYPE_CHECKING
14-
fromgit.typesimportOld_commit_ish,PathLike,_T
9+
fromtypingimportAny,Callable,Iterator,TYPE_CHECKING,Type,Union
10+
11+
fromgit.typesimportAnyGitObject,PathLike,_T
1512

1613
ifTYPE_CHECKING:
1714
fromgit.repoimportRepo
1815

1916
# ------------------------------------------------------------------------------
2017

21-
2218
__all__= ["Reference"]
2319

2420
# { Utilities
@@ -81,7 +77,7 @@ def __str__(self) -> str:
8177
# @ReservedAssignment
8278
defset_object(
8379
self,
84-
object:Union[Old_commit_ish,"SymbolicReference",str],
80+
object:Union[AnyGitObject,"SymbolicReference",str],
8581
logmsg:Union[str,None]=None,
8682
)->"Reference":
8783
"""Special version which checks if the head-log needs an update as well.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp