From ac39679ce170c5eb21f98ac23ac0358850e8974f Mon Sep 17 00:00:00 2001 From: Yobmod Date: Mon, 19 Jul 2021 16:55:03 +0100 Subject: Make types in refs compatible with previous --- git/cmd.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'git/cmd.py') diff --git a/git/cmd.py b/git/cmd.py index dd887a18..11c02afe 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -15,7 +15,6 @@ from subprocess import ( PIPE ) import subprocess -import sys import threading from textwrap import dedent @@ -539,7 +538,7 @@ class Git(LazyMixin): return self def __next__(self) -> bytes: - return self.next() + return next(self) def next(self) -> bytes: line = self.readline() @@ -799,10 +798,7 @@ class Git(LazyMixin): if kill_after_timeout: raise GitCommandError(redacted_command, '"kill_after_timeout" feature is not supported on Windows.') else: - if sys.version_info[0] > 2: - cmd_not_found_exception = FileNotFoundError # NOQA # exists, flake8 unknown @UndefinedVariable - else: - cmd_not_found_exception = OSError + cmd_not_found_exception = FileNotFoundError # NOQA # exists, flake8 unknown @UndefinedVariable # end handle stdout_sink = (PIPE @@ -1070,8 +1066,8 @@ class Git(LazyMixin): It contains key-values for the following: - the :meth:`execute()` kwds, as listed in :var:`execute_kwargs`; - "command options" to be converted by :meth:`transform_kwargs()`; - - the `'insert_kwargs_after'` key which its value must match one of ``*args``, - and any cmd-options will be appended after the matched arg. + - the `'insert_kwargs_after'` key which its value must match one of ``*args`` + and any cmd-options will be appended after the matched arg. Examples:: -- cgit v1.2.1