Skip to content

Commit

Permalink
Merge pull request #130 from jamescw19/misc/mypy-compatibility
Browse files Browse the repository at this point in the history
Ensure non-blocking mypy compatibility
  • Loading branch information
Julian authored Feb 19, 2024
2 parents 7ff3f91 + e715da5 commit 2e89e8d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
9 changes: 9 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ["**/*"]
Expand Down
6 changes: 3 additions & 3 deletions referencing/jsonschema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 2e89e8d

Please sign in to comment.