Skip to content
Snippets Groups Projects
Commit d6d5ce2b authored by Antoine Lambert's avatar Antoine Lambert
Browse files

converters, dumb: Fix errors since latest dulwich release (0.20.50)

ShaFile.get_type was deprecated and has been removed.

New typings have been added in dulwich that trigerred a new mypy error.
parent 44f70a70
No related branches found
Tags v1.10.1
No related merge requests found
......@@ -185,6 +185,7 @@ def dulwich_commit_to_revision(obj: ShaFile) -> Revision:
author_timezone = None
committer_timezone = None
assert commit._chunked_text is not None # to keep mypy happy
for (field, value) in _parse_message(commit._chunked_text):
if field == b"author":
m = AUTHORSHIP_LINE_RE.match(value)
......
......@@ -86,7 +86,7 @@ class GitObjectsFetcher:
commit_objects = []
for ref in wants:
ref_object = self._get_git_object(ref)
if ref_object.get_type() == Commit.type_num:
if ref_object.type_num == Commit.type_num:
commit_objects.append(cast(Commit, ref_object))
self.objects[b"commit"].add(ref)
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment