summaryrefslogtreecommitdiff
path: root/git/cmd.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-08-02 14:56:03 +0100
committerYobmod <yobmod@gmail.com>2021-08-02 14:56:03 +0100
commit91fce331de16de6039c94cd4d7314184a5763e61 (patch)
treee0ef280c84bddf90be0651f414b54689bcc3070b /git/cmd.py
parent0525c17bc287a54bd670919a374e226345d96260 (diff)
downloadgitpython-91fce331de16de6039c94cd4d7314184a5763e61.tar.gz
increase mypy strictness (warn unused ignored and warn unreachable)
Diffstat (limited to 'git/cmd.py')
-rw-r--r--git/cmd.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/git/cmd.py b/git/cmd.py
index 9d070367..e690dc12 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -42,7 +42,7 @@ from .util import (
from typing import (Any, AnyStr, BinaryIO, Callable, Dict, IO, Iterator, List, Mapping,
Sequence, TYPE_CHECKING, TextIO, Tuple, Union, cast, overload)
-from git.types import PathLike, Literal
+from git.types import PathLike, Literal, TBD
if TYPE_CHECKING:
from git.repo.base import Repo
@@ -575,8 +575,8 @@ class Git(LazyMixin):
self._environment: Dict[str, str] = {}
# cached command slots
- self.cat_file_header = None
- self.cat_file_all = None
+ self.cat_file_header: Union[None, TBD] = None
+ self.cat_file_all: Union[None, TBD] = None
def __getattr__(self, name: str) -> Any:
"""A convenience method as it allows to call the command as if it was
@@ -1012,8 +1012,6 @@ class Git(LazyMixin):
@classmethod
def __unpack_args(cls, arg_list: Sequence[str]) -> List[str]:
- if not isinstance(arg_list, (list, tuple)):
- return [str(arg_list)]
outlist = []
for arg in arg_list: