diff --git a/mypy.ini b/mypy.ini index efcb8cb..fb89677 100644 --- a/mypy.ini +++ b/mypy.ini @@ -13,3 +13,53 @@ explicit_package_bases = True disable_error_code = # Disable due to many false positives overload-overlap, + +# jaraco/jaraco.mongodb#41 +[mypy-jaraco.mongodb.*] +ignore_missing_imports = True + +# jaraco/jaraco.itertools#20 +[mypy-jaraco.itertools.*] +ignore_missing_imports = True + +# jaraco/jaraco.text#17 +[mypy-jaraco.text.*] +ignore_missing_imports = True + +# jaraco/jaraco.logging#6 +[mypy-jaraco.logging.*] +ignore_missing_imports = True + +# jaraco/jaraco.email#4 +[mypy-jaraco.email.*] +ignore_missing_imports = True + +# jaraco/jaraco.fabric#8 +[mypy-jaraco.fabric.*] +ignore_missing_imports = True + +# jaraco/jaraco.modb#3 +[mypy-jaraco.modb.*] +ignore_missing_imports = True + +# cherrypy/cherrypy#1510 +[mypy-cherrypy.*] +ignore_missing_imports = True + +# jsonpickle/jsonpickle#441 +[mypy-jsonpickle.*] +ignore_missing_imports = True + +# shon/httpagentparser#93 +[mypy-httpagentparser.*] +ignore_missing_imports = True + +# dropbox/dropbox-sdk-python#419 +[mypy-dropbox.*] +ignore_missing_imports = True + +# TODO: Raise issues upstream +[mypy-fabric.*] +ignore_missing_imports = True +[mypy-genshi.*] +ignore_missing_imports = True diff --git a/pyproject.toml b/pyproject.toml index 4e23512..aa4ba10 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,6 +86,8 @@ type = [ "pytest-mypy", # local + "boto3-stubs", + "botocore-stubs", "types-requests", "types-boto", "types-docutils", @@ -99,7 +101,3 @@ recapture-docs = "recapturedocs.server:handle_command_line" [tool.setuptools_scm] - - -[tool.pytest-enabler.mypy] -# Disabled due to jaraco/skeleton#143 diff --git a/recapturedocs/jsonpickle.py b/recapturedocs/jsonpickle.py index 8613f0a..4bb0171 100644 --- a/recapturedocs/jsonpickle.py +++ b/recapturedocs/jsonpickle.py @@ -2,6 +2,10 @@ A few handlers to make sure recapturedocs objects are serializable to JSON """ +from __future__ import annotations + +from typing import ClassVar + import jsonpickle # TODO: what types are returned for ResultSet and HIT? @@ -28,7 +32,7 @@ def restore(self, data): class OldStyleClassParamsHandler(jsonpickle.handlers.BaseHandler): - params = () + params: ClassVar[tuple[object, ...]] = () def flatten(self, obj, data): data.update(self._base.flatten(vars(obj))) @@ -42,7 +46,7 @@ def restore(self, data): class OldStyleClassParamsHandler_None(OldStyleClassParamsHandler): - params = (None,) # type: ignore + params = (None,) def setup_handlers():