diff options
author | Yobmod <yobmod@gmail.com> | 2021-08-09 17:14:31 +0100 |
---|---|---|
committer | Yobmod <yobmod@gmail.com> | 2021-08-09 17:14:31 +0100 |
commit | c35ab1dd61e91bd55d939302d1f02e1c58985826 (patch) | |
tree | 4a571ca076a6c9e1472add02c3c363fa105c5285 /git/objects/util.py | |
parent | 2f42966cd1ec287d1c2011224940131dbda2383d (diff) | |
download | gitpython-c35ab1dd61e91bd55d939302d1f02e1c58985826.tar.gz |
upgrade sphinx for 3.10 compat
Diffstat (limited to 'git/objects/util.py')
-rw-r--r-- | git/objects/util.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/git/objects/util.py b/git/objects/util.py index 4b830e0e..187318fe 100644 --- a/git/objects/util.py +++ b/git/objects/util.py @@ -5,7 +5,7 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php """Module for general utility functions""" -from abc import abstractmethod +from abc import ABC, abstractmethod import warnings from git.util import ( IterableList, @@ -22,10 +22,10 @@ import calendar from datetime import datetime, timedelta, tzinfo # typing ------------------------------------------------------------ -from typing import (Any, Callable, Deque, Iterator, Generic, NamedTuple, overload, Sequence, +from typing import (Any, Callable, Deque, Iterator, Generic, NamedTuple, overload, Sequence, # NOQA: F401 TYPE_CHECKING, Tuple, Type, TypeVar, Union, cast) -from git.types import Has_id_attribute, Literal, _T +from git.types import Has_id_attribute, Literal, _T # NOQA: F401 if TYPE_CHECKING: from io import BytesIO, StringIO @@ -37,7 +37,8 @@ if TYPE_CHECKING: from .submodule.base import Submodule from git.types import Protocol, runtime_checkable else: - Protocol = Generic[_T] + # Protocol = Generic[_T] # NNeeded for typing bug #572? + Protocol = ABC def runtime_checkable(f): return f |