Skip to content

Commit 2e89e8d

Browse files
authored
Merge pull request #130 from jamescw19/misc/mypy-compatibility
Ensure non-blocking mypy compatibility
2 parents 7ff3f91 + e715da5 commit 2e89e8d

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

noxfile.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,15 @@ def typing(session):
101101
session.run("pyright", *session.posargs, REFERENCING)
102102

103103

104+
@session()
105+
def mypy(session):
106+
"""
107+
Check that mypy runs with no blocking errors.
108+
"""
109+
session.install("mypy", ROOT)
110+
session.run("mypy", REFERENCING)
111+
112+
104113
@session(tags=["docs"])
105114
@nox.parametrize(
106115
"builder",

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ include_trailing_comma = true
7979
multi_line_output = 3
8080
use_parentheses = true
8181

82+
[tool.mypy]
83+
follow_imports = "skip"
84+
ignore_errors = true
85+
8286
[tool.pyright]
8387
reportUnnecessaryTypeIgnoreComment = true
8488
strict = ["**/*"]

referencing/jsonschema.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ def maybe_in_subresource(
432432
"properties",
433433
},
434434
),
435-
anchors_in=_anchor_2019, # type: ignore[reportGeneralTypeIssues] TODO: check whether this is real
435+
anchors_in=_anchor_2019, # type: ignore[reportGeneralTypeIssues] # TODO: check whether this is real
436436
maybe_in_subresource=_maybe_in_subresource_crazy_items(
437437
in_value={
438438
"additionalItems",
@@ -474,7 +474,7 @@ def maybe_in_subresource(
474474
in_subarray={"allOf", "anyOf", "oneOf"},
475475
in_subvalues={"definitions", "patternProperties", "properties"},
476476
),
477-
anchors_in=_legacy_anchor_in_dollar_id, # type: ignore[reportGeneralTypeIssues] TODO: check whether this is real
477+
anchors_in=_legacy_anchor_in_dollar_id, # type: ignore[reportGeneralTypeIssues] # TODO: check whether this is real
478478
maybe_in_subresource=_maybe_in_subresource_crazy_items_dependencies(
479479
in_value={
480480
"additionalItems",
@@ -505,7 +505,7 @@ def maybe_in_subresource(
505505
in_subarray={"allOf", "anyOf", "oneOf"},
506506
in_subvalues={"definitions", "patternProperties", "properties"},
507507
),
508-
anchors_in=_legacy_anchor_in_dollar_id, # type: ignore[reportGeneralTypeIssues] TODO: check whether this is real
508+
anchors_in=_legacy_anchor_in_dollar_id, # type: ignore[reportGeneralTypeIssues] # TODO: check whether this is real
509509
maybe_in_subresource=_maybe_in_subresource_crazy_items_dependencies(
510510
in_value={
511511
"additionalItems",

0 commit comments

Comments
 (0)