summaryrefslogtreecommitdiff
path: root/git/diff.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-07-06 16:41:14 +0100
committerYobmod <yobmod@gmail.com>2021-07-06 16:41:14 +0100
commit94c2ae405ba635e801ff7a1ea00300e51f3a70db (patch)
tree4d967000fda482f96a80a7722a5420d52b58dd1f /git/diff.py
parent215abfda39c34aa125f9405d9bb848eb45ee7ac6 (diff)
downloadgitpython-94c2ae405ba635e801ff7a1ea00300e51f3a70db.tar.gz
Readd submodule.base.py types
Diffstat (limited to 'git/diff.py')
-rw-r--r--git/diff.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/git/diff.py b/git/diff.py
index a90b7758..7de4276a 100644
--- a/git/diff.py
+++ b/git/diff.py
@@ -28,7 +28,8 @@ Lit_change_type = Literal['A', 'D', 'C', 'M', 'R', 'T']
def is_change_type(inp: str) -> TypeGuard[Lit_change_type]:
- return inp in ['A', 'D', 'C', 'M', 'R', 'T']
+ return True
+ # return inp in ['A', 'D', 'C', 'M', 'R', 'T']
# ------------------------------------------------------------------------
@@ -511,7 +512,7 @@ class Diff(object):
# Change type can be R100
# R: status letter
# 100: score (in case of copy and rename)
- assert is_change_type(_change_type[0])
+ assert is_change_type(_change_type[0]), f"Unexpected value for change_type received: {_change_type[0]}"
change_type: Lit_change_type = _change_type[0]
score_str = ''.join(_change_type[1:])
score = int(score_str) if score_str.isdigit() else None