diff options
Diffstat (limited to 'git')
-rw-r--r-- | git/config.py | 4 | ||||
-rw-r--r-- | git/repo/base.py | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/git/config.py b/git/config.py index 4cb13bdf..6931dd12 100644 --- a/git/config.py +++ b/git/config.py @@ -34,7 +34,7 @@ import configparser as cp from typing import (Any, Callable, IO, List, Dict, Sequence, TYPE_CHECKING, Tuple, Union, cast, overload) -from git.types import Lit_config_levels, ConfigLevels_Tup, ConfigLevels_NT, PathLike, TBD, assert_never +from git.types import Lit_config_levels, ConfigLevels_Tup, PathLike, TBD, assert_never if TYPE_CHECKING: from git.repo.base import Repo @@ -51,7 +51,7 @@ log.addHandler(logging.NullHandler()) # represents the configuration level of a configuration file -CONFIG_LEVELS: ConfigLevels_Tup = ConfigLevels_NT("system", "user", "global", "repository") +CONFIG_LEVELS: ConfigLevels_Tup = ("system", "user", "global", "repository") # Section pattern to detect conditional includes. # https://git-scm.com/docs/git-config#_conditional_includes diff --git a/git/repo/base.py b/git/repo/base.py index e60b6f6c..e1b1fc76 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -36,7 +36,7 @@ import gitdb # typing ------------------------------------------------------ -from git.types import ConfigLevels_NT, TBD, PathLike, Lit_config_levels, Commit_ish, Tree_ish +from git.types import TBD, PathLike, Lit_config_levels, Commit_ish, Tree_ish from typing import (Any, BinaryIO, Callable, Dict, Iterator, List, Mapping, Optional, Sequence, TextIO, Tuple, Type, Union, @@ -58,7 +58,7 @@ __all__ = ('Repo',) class BlameEntry(NamedTuple): - commit: Dict[str, TBD] + commit: Dict[str, 'Commit'] linenos: range orig_path: Optional[str] orig_linenos: range @@ -96,7 +96,7 @@ class Repo(object): # invariants # represents the configuration level of a configuration file - config_level: ConfigLevels_Tup = ConfigLevels_NT("system", "user", "global", "repository") + config_level: ConfigLevels_Tup = ("system", "user", "global", "repository") # Subclass configuration # Subclasses may easily bring in their own custom types by placing a constructor or type here @@ -802,7 +802,7 @@ class Repo(object): should get a continuous range spanning all line numbers in the file. """ data = self.git.blame(rev, '--', file, p=True, incremental=True, stdout_as_string=False, **kwargs) - commits = {} # type: Dict[str, TBD] + commits: Dict[str, Commit] = {} stream = (line for line in data.split(b'\n') if line) while True: |