Skip to content

Commit 829142d

Browse files
committed
Add __future__.annotations to cmd.py2
1 parent c3f3501 commit 829142d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

git/repo/fun.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def rev_parse(repo: 'Repo', rev: str) -> Union['Commit', 'Tag', 'Tree', 'Blob']:
233233
assert obj is not None
234234

235235
if ref is not None:
236-
obj = cast(Commit, ref.commit)
236+
obj = cast('Commit', ref.commit)
237237
# END handle ref
238238
# END initialize obj on first token
239239

@@ -347,8 +347,8 @@ def rev_parse(repo: 'Repo', rev: str) -> Union['Commit', 'Tag', 'Tree', 'Blob']:
347347
# END end handle tag
348348
except (IndexError, AttributeError) as e:
349349
raise BadName(
350-
"Invalid revision spec '%s' - not enough "
351-
"parent commits to reach '%s%i'" % (rev, token, num)) from e
350+
f"Invalid revision spec '{rev}' - not enough "
351+
f"parent commits to reach '{token}{int(num)}'") from e
352352
# END exception handling
353353
# END parse loop
354354

0 commit comments

Comments
 (0)