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

Commita8ee94b

Browse files
committed
Add type to symbolicreference._create()
1 parentf657efc commita8ee94b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎git/refs/symbolic.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,9 @@ def delete(cls, repo, path):
493493
# END remove reflog
494494

495495
@classmethod
496-
def_create(cls,repo,path,resolve,reference,force,logmsg=None):
496+
def_create(cls:Type[T_References],repo:'Repo',path:PathLike,resolve:bool,
497+
reference:Union['SymbolicReference',str],force:bool,
498+
logmsg:Union[str,None]=None)->T_References:
497499
"""internal method used to create a new symbolic reference.
498500
If resolve is False, the reference will be taken as is, creating
499501
a proper symbolic reference. Otherwise it will be resolved to the
@@ -511,7 +513,7 @@ def _create(cls, repo, path, resolve, reference, force, logmsg=None):
511513
ifnotforceandos.path.isfile(abs_ref_path):
512514
target_data=str(target)
513515
ifisinstance(target,SymbolicReference):
514-
target_data=target.path
516+
target_data=str(target.path)
515517
ifnotresolve:
516518
target_data="ref: "+target_data
517519
withopen(abs_ref_path,'rb')asfd:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp