diff options
author | Yobmod <yobmod@gmail.com> | 2021-08-02 16:04:08 +0100 |
---|---|---|
committer | Yobmod <yobmod@gmail.com> | 2021-08-02 16:04:08 +0100 |
commit | 829142d4c30886db2a2622605092072e979afcc9 (patch) | |
tree | 7a4ca1c16b19dee789951ac4856fc33c09bcf7a6 /git/repo/fun.py | |
parent | c3f3501f0fe00572d2692948ebb5ce25da8bb418 (diff) | |
download | gitpython-829142d4c30886db2a2622605092072e979afcc9.tar.gz |
Add __future__.annotations to cmd.py2
Diffstat (limited to 'git/repo/fun.py')
-rw-r--r-- | git/repo/fun.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/git/repo/fun.py b/git/repo/fun.py index 36c8b797..1a83dd3d 100644 --- a/git/repo/fun.py +++ b/git/repo/fun.py @@ -233,7 +233,7 @@ def rev_parse(repo: 'Repo', rev: str) -> Union['Commit', 'Tag', 'Tree', 'Blob']: assert obj is not None if ref is not None: - obj = cast(Commit, ref.commit) + obj = cast('Commit', ref.commit) # END handle ref # END initialize obj on first token @@ -347,8 +347,8 @@ def rev_parse(repo: 'Repo', rev: str) -> Union['Commit', 'Tag', 'Tree', 'Blob']: # END end handle tag except (IndexError, AttributeError) as e: raise BadName( - "Invalid revision spec '%s' - not enough " - "parent commits to reach '%s%i'" % (rev, token, num)) from e + f"Invalid revision spec '{rev}' - not enough " + f"parent commits to reach '{token}{int(num)}'") from e # END exception handling # END parse loop |