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

Commitaf7cee5

Browse files
committed
Make Repo a forward ref in Submodule.base
1 parent33ffd0b commitaf7cee5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎git/objects/submodule/base.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@
4747
find_first_remote_branch
4848
)
4949

50-
fromgit.repoimportRepo
5150

5251
# typing ----------------------------------------------------------------------
53-
fromtypingimportCallable,Dict,Mapping,Sequence,TYPE_CHECKING
52+
fromtypingimportCallable,Dict,Mapping,Sequence,TYPE_CHECKING,cast
5453
fromtypingimportAny,Iterator,Union
5554

5655
fromgit.typesimportCommit_ish,PathLike,TBD
5756

5857
ifTYPE_CHECKING:
5958
fromgit.indeximportIndexFile
59+
fromgit.repoimportRepo
6060

6161

6262
# -----------------------------------------------------------------------------
@@ -589,7 +589,7 @@ def update(self, recursive: bool = False, init: bool = True, to_latest_revision:
589589
ifnotdry_run:
590590
# see whether we have a valid branch to checkout
591591
try:
592-
assertisinstance(mrepo,Repo)
592+
mrepo=cast('Repo',mrepo)
593593
# find a remote which has our branch - we try to be flexible
594594
remote_branch=find_first_remote_branch(mrepo.remotes,self.branch_name)
595595
local_branch=mkhead(mrepo,self.branch_path)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp