From bf7d44db3cf791109bc46ed577b2f74f01f7892d Mon Sep 17 00:00:00 2001 From: Antoine Lambert Date: Wed, 9 Jun 2021 14:02:23 +0200 Subject: [PATCH] mypy: Fix errors with release >= v0.900 --- requirements-test.txt | 3 +++ swh/__init__.py | 4 ++-- swh/lister/bitbucket/lister.py | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/requirements-test.txt b/requirements-test.txt index 2407c40..c73a59f 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,3 +1,6 @@ pytest pytest-mock requests_mock +types-click +types-pyyaml +types-requests diff --git a/swh/__init__.py b/swh/__init__.py index f14e196..8d9f151 100644 --- a/swh/__init__.py +++ b/swh/__init__.py @@ -1,4 +1,4 @@ from pkgutil import extend_path -from typing import Iterable +from typing import List -__path__ = extend_path(__path__, __name__) # type: Iterable[str] +__path__: List[str] = extend_path(__path__, __name__) diff --git a/swh/lister/bitbucket/lister.py b/swh/lister/bitbucket/lister.py index edc4e0e..ab364a9 100644 --- a/swh/lister/bitbucket/lister.py +++ b/swh/lister/bitbucket/lister.py @@ -67,7 +67,7 @@ class BitbucketLister(Lister[BitbucketListerState, List[Dict[str, Any]]]): self.incremental = incremental - self.url_params = { + self.url_params: Dict[str, Any] = { "pagelen": page_size, # only return needed JSON fields in bitbucket API responses # (also prevent errors 500 when listing)