From ad417ba77c98a39c2d5b3b3a74eb0a1ca17f0ccc Mon Sep 17 00:00:00 2001 From: Yobmod Date: Mon, 2 Aug 2021 22:54:31 +0100 Subject: Test Dataclass in repo.base.blame() 6 --- git/repo/base.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'git/repo/base.py') diff --git a/git/repo/base.py b/git/repo/base.py index a0aee322..54409b6a 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -42,10 +42,10 @@ import gitdb from git.types import TBD, PathLike, Lit_config_levels, Commit_ish, Tree_ish, assert_never from typing import (Any, BinaryIO, Callable, Dict, Iterator, List, Mapping, Optional, Sequence, - TextIO, Tuple, Type, TypedDict, Union, + TextIO, Tuple, Type, Union, NamedTuple, cast, TYPE_CHECKING) -from git.types import ConfigLevels_Tup +from git.types import ConfigLevels_Tup, TypedDict if TYPE_CHECKING: from git.util import IterableList @@ -984,11 +984,10 @@ class Repo(object): c = commits.get(sha) if c is None: c = Commit(self, hex_to_bin(sha), - author=Actor._from_string(info.author + ' ' + info.author_email), + author=Actor._from_string(f"{info.author} {info.author_email}"), authored_date=info.author_date, - committer=Actor._from_string( - info.committer + ' ' + info.committer_email), - committed_date=info.committer_date) + committer=Actor._from_string(f"{info.committer} {info.committer_email}"), + committed_date=info.committer_date) commits[sha] = c blames[-1][0] = c # END if commit objects needs initial creation -- cgit v1.2.1