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

Commit 0b89bfe

Browse files
authored
Add overload to get_value()
1 parent fe54118 commit 0b89bfe

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

‎git/config.py‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -710,14 +710,13 @@ def read_only(self) -> bool:
710710
return self._read_only
711711

712712
@overload
713-
def get_value(self, section: str, option: str, default: str
714-
) -> str:
715-
...
713+
def get_value(self, section: str, option: str, default: None = None) -> str: ...
716714

717715
@overload
718-
def get_value(self, section: str, option: str, default: float
719-
) -> float:
720-
...
716+
def get_value(self, section: str, option: str, default: str) -> str: ...
717+
718+
@overload
719+
def get_value(self, section: str, option: str, default: float) -> float: ...
721720

722721
def get_value(self, section: str, option: str, default: Union[int, float, str, bool, None] = None
723722
) -> Union[int, float, str, bool]:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /