diff --git a/swh/__init__.py b/swh/__init__.py --- a/swh/__init__.py +++ b/swh/__init__.py @@ -1,4 +1,3 @@ from pkgutil import extend_path -from typing import List -__path__: List[str] = extend_path(__path__, __name__) +__path__ = extend_path(__path__, __name__) diff --git a/swh/web/__init__.py b/swh/web/__init__.py --- a/swh/web/__init__.py +++ b/swh/web/__init__.py @@ -1,4 +1,3 @@ from pkgutil import extend_path -from typing import List -__path__: List[str] = extend_path(__path__, __name__) +__path__ = extend_path(__path__, __name__) diff --git a/swh/web/api/apiresponse.py b/swh/web/api/apiresponse.py --- a/swh/web/api/apiresponse.py +++ b/swh/web/api/apiresponse.py @@ -227,5 +227,5 @@ """Custom DRF exception handler used to generate API error responses. """ sentry_capture_exception(exc) - doc_data = getattr(exc, "doc_data", None) + doc_data = getattr(exc, "doc_data", {}) return error_response(context["request"], exc, doc_data) diff --git a/tox.ini b/tox.ini --- a/tox.ini +++ b/tox.ini @@ -26,7 +26,7 @@ extras = testing deps = - mypy + mypy==0.920 commands = mypy swh