Skip to content

Commit

Permalink
Pass mypy and link issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Aug 27, 2024
1 parent 76063f4 commit 911ea7d
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 6 deletions.
51 changes: 51 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,54 @@ explicit_package_bases = True

# Disable overload-overlap due to many false-positives
disable_error_code = 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

0 comments on commit 911ea7d

Please sign in to comment.