Skip to content

Add types to git/config.py #1234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
May 13, 2021
308 changes: 212 additions & 96 deletions git/cmd.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions git/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
def safe_decode(s: None) -> None: ...

@overload
def safe_decode(s: Union[IO[str], AnyStr]) -> str: ...
def safe_decode(s: AnyStr) -> str: ...

def safe_decode(s: Union[IO[str], AnyStr, None]) -> Optional[str]:
def safe_decode(s: Union[AnyStr, None]) -> Optional[str]:
"""Safely decodes a binary string to unicode"""
if isinstance(s, str):
return s
Expand Down
Loading