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

Commit017b0d4

Browse files
committed
Add a cast to git.cmd _version_info
1 parent8900f2a commit017b0d4

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

‎git/cmd.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -603,35 +603,35 @@ def _set_cache_(self, attr: str) -> None:
603603
process_version=self._call_process('version')# should be as default *args and **kwargs used
604604
version_numbers=process_version.split(' ')[2]
605605

606-
self._version_info:Tuple[int,int,int,int]=tuple(
607-
int(n)forninversion_numbers.split('.')[:4]ifn.isdigit()
608-
)# type: ignore # use typeguard here
606+
self._version_info=cast(Tuple[int,int,int,int],
607+
tuple(int(n)forninversion_numbers.split('.')[:4]ifn.isdigit())
608+
)
609609
else:
610610
super(Git,self)._set_cache_(attr)
611611
# END handle version info
612612

613-
@property
613+
@property
614614
defworking_dir(self)->Union[None,PathLike]:
615615
""":return: Git directory we are working on"""
616616
returnself._working_dir
617617

618-
@property
618+
@property
619619
defversion_info(self)->Tuple[int,int,int,int]:
620620
"""
621621
:return: tuple(int, int, int, int) tuple with integers representing the major, minor
622622
and additional version numbers as parsed from git version.
623623
This value is generated on demand and is cached"""
624624
returnself._version_info
625625

626-
@overload
626+
@overload
627627
defexecute(self,
628628
command:Union[str,Sequence[Any]],
629629
*,
630630
as_process:Literal[True]
631631
)->'AutoInterrupt':
632632
...
633633

634-
@overload
634+
@overload
635635
defexecute(self,
636636
command:Union[str,Sequence[Any]],
637637
*,
@@ -640,7 +640,7 @@ def execute(self,
640640
)->Union[str,Tuple[int,str,str]]:
641641
...
642642

643-
@overload
643+
@overload
644644
defexecute(self,
645645
command:Union[str,Sequence[Any]],
646646
*,
@@ -649,7 +649,7 @@ def execute(self,
649649
)->Union[bytes,Tuple[int,bytes,str]]:
650650
...
651651

652-
@overload
652+
@overload
653653
defexecute(self,
654654
command:Union[str,Sequence[Any]],
655655
*,
@@ -659,7 +659,7 @@ def execute(self,
659659
)->str:
660660
...
661661

662-
@overload
662+
@overload
663663
defexecute(self,
664664
command:Union[str,Sequence[Any]],
665665
*,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp