Skip to content

Commit 79fbece

Browse files
committed
Fix mypy errors
1 parent 627396c commit 79fbece

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/desert/_make.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def _get_field_default(
350350
if isinstance(field, dataclasses.Field):
351351
# misc: https://github.com/python/mypy/issues/10750
352352
# comparison-overlap: https://github.com/python/typeshed/pull/5900
353-
if field.default_factory != dataclasses.MISSING: # type: ignore[misc,comparison-overlap]
353+
if field.default_factory != dataclasses.MISSING:
354354
return dataclasses.MISSING
355355
if field.default is dataclasses.MISSING:
356356
return marshmallow.missing

tests/cases/forward_reference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
# Type ignores are just here for now instead of figuring out how to
1717
# handle these properly.
1818

19-
@module.dataclass # type: ignore[attr-defined]
19+
@module.dataclass
2020
class A:
2121
x: "B"
2222

23-
@module.dataclass # type: ignore[attr-defined]
23+
@module.dataclass
2424
class B:
2525
y: int
2626

tests/test_make.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ def fixture_from_dict(
9494
The PyTest fixture
9595
"""
9696

97-
@pytest.fixture(name=name, params=id_to_value.values(), ids=id_to_value.keys())
97+
@pytest.fixture(name=name, params=id_to_value.values(), ids=id_to_value.keys()) # type: ignore[call-overload, misc]
9898
def fixture(request: _pytest.fixtures.SubRequest) -> object:
9999
return request.param
100100

101101
# This looks right to me but mypy says:
102102
# error: Incompatible return value type (got "Callable[[SubRequest], object]", expected "_pytest.fixtures._FixtureFunction") [return-value]
103-
return fixture # type: ignore[return-value]
103+
return fixture # type: ignore[no-any-return]
104104

105105

106106
_assert_dump_load = fixture_from_dict(

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ commands =
4343
check-manifest {toxinidir}
4444
black --check {toxinidir}
4545
isort --verbose --check-only --diff src tests setup.py
46-
mypy src/desert/ tests/
46+
mypy --show-error-codes src/desert/ tests/
4747

4848
[testenv:spell]
4949
setenv =

0 commit comments

Comments
 (0)