summaryrefslogtreecommitdiff
path: root/git/diff.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-08-02 14:56:03 +0100
committerYobmod <yobmod@gmail.com>2021-08-02 14:56:03 +0100
commit91fce331de16de6039c94cd4d7314184a5763e61 (patch)
treee0ef280c84bddf90be0651f414b54689bcc3070b /git/diff.py
parent0525c17bc287a54bd670919a374e226345d96260 (diff)
downloadgitpython-91fce331de16de6039c94cd4d7314184a5763e61.tar.gz
increase mypy strictness (warn unused ignored and warn unreachable)
Diffstat (limited to 'git/diff.py')
-rw-r--r--git/diff.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/git/diff.py b/git/diff.py
index fc16b73e..cea66d7e 100644
--- a/git/diff.py
+++ b/git/diff.py
@@ -456,8 +456,8 @@ class Diff(object):
# for now, we have to bake the stream
text = b''.join(text_list)
index: 'DiffIndex' = DiffIndex()
- previous_header = None
- header = None
+ previous_header: Union[Match[bytes], None] = None
+ header: Union[Match[bytes], None] = None
a_path, b_path = None, None # for mypy
a_mode, b_mode = None, None # for mypy
for _header in cls.re_header.finditer(text):