Skip to content

Commit

Permalink
Silence MyPy errors about Pydantic/Sphinx workaround.
Browse files Browse the repository at this point in the history
This may well be a MyPy bug; certainly IMO more checking on function
signatures that are already full of typing.Any is not an improvement.
  • Loading branch information
TallJimbo committed Jan 8, 2025
1 parent de2df11 commit 05814d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/lsst/pipe/base/_task_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ def model_copy(self, *args: Any, **kwargs: Any) -> Any:
return super().model_copy(*args, **kwargs)

@classmethod
def model_construct(cls, *args: Any, **kwargs: Any) -> Any:
def model_construct(cls, *args: Any, **kwargs: Any) -> Any: # type: ignore[misc]

Check warning on line 673 in python/lsst/pipe/base/_task_metadata.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/pipe/base/_task_metadata.py#L673

Added line #L673 was not covered by tests
"""See `pydantic.BaseModel.model_construct`."""
return super().model_construct(*args, **kwargs)

Expand Down
4 changes: 2 additions & 2 deletions python/lsst/pipe/base/tests/mocks/_storage_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def model_copy(self, *args: Any, **kwargs: Any) -> Any:
return super().model_copy(*args, **kwargs)

@classmethod
def model_construct(cls, *args: Any, **kwargs: Any) -> Any:
def model_construct(cls, *args: Any, **kwargs: Any) -> Any: # type: ignore[misc]

Check warning on line 268 in python/lsst/pipe/base/tests/mocks/_storage_class.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/pipe/base/tests/mocks/_storage_class.py#L268

Added line #L268 was not covered by tests
"""See `pydantic.BaseModel.model_construct`."""
return super().model_construct(*args, **kwargs)

Expand Down Expand Up @@ -315,7 +315,7 @@ def model_copy(self, *args: Any, **kwargs: Any) -> Any:
return super().model_copy(*args, **kwargs)

@classmethod
def model_construct(cls, *args: Any, **kwargs: Any) -> Any:
def model_construct(cls, *args: Any, **kwargs: Any) -> Any: # type: ignore[misc]

Check warning on line 318 in python/lsst/pipe/base/tests/mocks/_storage_class.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/pipe/base/tests/mocks/_storage_class.py#L318

Added line #L318 was not covered by tests
"""See `pydantic.BaseModel.model_construct`."""
return super().model_construct(*args, **kwargs)

Expand Down

0 comments on commit 05814d2

Please sign in to comment.