diff --git a/noxfile.py b/noxfile.py index b121263..3a276fb 100644 --- a/noxfile.py +++ b/noxfile.py @@ -101,6 +101,15 @@ def typing(session): session.run("pyright", *session.posargs, REFERENCING) +@session() +def mypy(session): + """ + Check that mypy runs with no blocking errors. + """ + session.install("mypy", ROOT) + session.run("mypy", REFERENCING) + + @session(tags=["docs"]) @nox.parametrize( "builder", diff --git a/pyproject.toml b/pyproject.toml index db0a6bc..ffb7e5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,6 +79,10 @@ include_trailing_comma = true multi_line_output = 3 use_parentheses = true +[tool.mypy] +follow_imports = "skip" +ignore_errors = true + [tool.pyright] reportUnnecessaryTypeIgnoreComment = true strict = ["**/*"] diff --git a/referencing/jsonschema.py b/referencing/jsonschema.py index ff4b43f..2eb1647 100644 --- a/referencing/jsonschema.py +++ b/referencing/jsonschema.py @@ -432,7 +432,7 @@ def maybe_in_subresource( "properties", }, ), - anchors_in=_anchor_2019, # type: ignore[reportGeneralTypeIssues] TODO: check whether this is real + anchors_in=_anchor_2019, # type: ignore[reportGeneralTypeIssues] # TODO: check whether this is real maybe_in_subresource=_maybe_in_subresource_crazy_items( in_value={ "additionalItems", @@ -474,7 +474,7 @@ def maybe_in_subresource( in_subarray={"allOf", "anyOf", "oneOf"}, in_subvalues={"definitions", "patternProperties", "properties"}, ), - anchors_in=_legacy_anchor_in_dollar_id, # type: ignore[reportGeneralTypeIssues] TODO: check whether this is real + anchors_in=_legacy_anchor_in_dollar_id, # type: ignore[reportGeneralTypeIssues] # TODO: check whether this is real maybe_in_subresource=_maybe_in_subresource_crazy_items_dependencies( in_value={ "additionalItems", @@ -505,7 +505,7 @@ def maybe_in_subresource( in_subarray={"allOf", "anyOf", "oneOf"}, in_subvalues={"definitions", "patternProperties", "properties"}, ), - anchors_in=_legacy_anchor_in_dollar_id, # type: ignore[reportGeneralTypeIssues] TODO: check whether this is real + anchors_in=_legacy_anchor_in_dollar_id, # type: ignore[reportGeneralTypeIssues] # TODO: check whether this is real maybe_in_subresource=_maybe_in_subresource_crazy_items_dependencies( in_value={ "additionalItems",