summaryrefslogtreecommitdiff
path: root/git/repo/fun.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-08-02 16:04:08 +0100
committerYobmod <yobmod@gmail.com>2021-08-02 16:04:08 +0100
commit829142d4c30886db2a2622605092072e979afcc9 (patch)
tree7a4ca1c16b19dee789951ac4856fc33c09bcf7a6 /git/repo/fun.py
parentc3f3501f0fe00572d2692948ebb5ce25da8bb418 (diff)
downloadgitpython-829142d4c30886db2a2622605092072e979afcc9.tar.gz
Add __future__.annotations to cmd.py2
Diffstat (limited to 'git/repo/fun.py')
-rw-r--r--git/repo/fun.py6
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