Skip to content

loader: Fix mypy errors

Since breezy upgrade, the following mypy errors were issued:

swh/loader/bzr/loader.py:307: error: "ControlComponentFormat" has no attribute "as_string"
swh/loader/bzr/loader.py:428: error: Item "None" of "Optional[str]" has no attribute "encode"
swh/loader/bzr/loader.py:438: error: Invalid index type "bytes" for "Dict[BzrRevisionId, bytes]"; expected type "BzrRevisionId"
swh/loader/bzr/loader.py:590: error: Incompatible return value type (got "List[int]", expected "List[Revision]")
swh/loader/bzr/loader.py:649: error: Argument 1 to "_get_revision_id_from_bzr_id" of "BazaarLoader" has incompatible type "bytes"; expected "BzrRevisionId"

Merge request reports

Loading