|
5 | 5 | # the BSD License: http://www.opensource.org/licenses/bsd-license.php
|
6 | 6 | """Module for general utility functions"""
|
7 | 7 |
|
8 | | -from abc import abstractmethod |
| 8 | +from abc import ABC, abstractmethod |
9 | 9 | import warnings
|
10 | 10 | from git.util import (
|
11 | 11 | IterableList,
|
|
22 | 22 | from datetime import datetime, timedelta, tzinfo
|
23 | 23 |
|
24 | 24 | # typing ------------------------------------------------------------
|
25 | | -from typing import (Any, Callable, Deque, Iterator, Generic, NamedTuple, overload, Sequence, |
| 25 | +from typing import (Any, Callable, Deque, Iterator, Generic, NamedTuple, overload, Sequence,# NOQA: F401 |
26 | 26 | TYPE_CHECKING, Tuple, Type, TypeVar, Union, cast)
|
27 | 27 |
|
28 | | -from git.types import Has_id_attribute, Literal, _T |
| 28 | +from git.types import Has_id_attribute, Literal, _T# NOQA: F401 |
29 | 29 |
|
30 | 30 | if TYPE_CHECKING:
|
31 | 31 | from io import BytesIO, StringIO
|
|
37 | 37 | from .submodule.base import Submodule
|
38 | 38 | from git.types import Protocol, runtime_checkable
|
39 | 39 | else:
|
40 | | - Protocol = Generic[_T] |
| 40 | + # Protocol = Generic[_T] # NNeeded for typing bug #572? |
| 41 | + Protocol = ABC |
41 | 42 |
|
42 | 43 | def runtime_checkable(f):
|
43 | 44 | return f
|
|
0 commit comments