Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass mypy and link issues #5

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ type = [
"pytest-mypy",

# local
"boto3-stubs",
"botocore-stubs",
"types-requests",
"types-boto",
"types-docutils",
Expand All @@ -99,7 +101,3 @@ recapture-docs = "recapturedocs.server:handle_command_line"


[tool.setuptools_scm]


[tool.pytest-enabler.mypy]
# Disabled due to jaraco/skeleton#143
8 changes: 6 additions & 2 deletions recapturedocs/jsonpickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand All @@ -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)))
Expand All @@ -42,7 +46,7 @@ def restore(self, data):


class OldStyleClassParamsHandler_None(OldStyleClassParamsHandler):
params = (None,) # type: ignore
params = (None,)


def setup_handlers():
Expand Down
Loading