Skip to content

failing type checking CI #4225

Closed
Closed
@keewis

Description

@keewis

Due to the update of pytest, mypy reports errors:

xarray/tests/test_cftimeindex_resample.py:57: error: List or tuple expected as variable arguments
xarray/tests/test_dataset.py:2407: error: No overload variant of "__call__" of "_XfailMarkDecorator" matches argument type "Type[AssertionError]"
xarray/tests/test_dataset.py:2407: note: Possible overload variant:
xarray/tests/test_dataset.py:2407: note:     def __call__(self, condition: Union[str, bool] = ..., *conditions: Union[str, bool], reason: str = ..., run: bool = ..., raises: Union[BaseException, Tuple[BaseException, ...]] = ..., strict: bool = ...) -> MarkDecorator
xarray/tests/test_dataset.py:2407: note:     <1 more non-matching overload not shown>
xarray/tests/test_dask.py:767: error: No overload variant of "__call__" of "_XfailMarkDecorator" matches argument type "Type[NotImplementedError]"
xarray/tests/test_dask.py:767: note: Possible overload variant:
xarray/tests/test_dask.py:767: note:     def __call__(self, condition: Union[str, bool] = ..., *conditions: Union[str, bool], reason: str = ..., run: bool = ..., raises: Union[BaseException, Tuple[BaseException, ...]] = ..., strict: bool = ...) -> MarkDecorator
xarray/tests/test_dask.py:767: note:     <1 more non-matching overload not shown>
xarray/tests/test_dataarray.py:3953: error: No overload variant of "__call__" of "_XfailMarkDecorator" matches argument type "Type[AssertionError]"
xarray/tests/test_dataarray.py:3953: note: Possible overload variant:
xarray/tests/test_dataarray.py:3953: note:     def __call__(self, condition: Union[str, bool] = ..., *conditions: Union[str, bool], reason: str = ..., run: bool = ..., raises: Union[BaseException, Tuple[BaseException, ...]] = ..., strict: bool = ...) -> MarkDecorator
xarray/tests/test_dataarray.py:3953: note:     <1 more non-matching overload not shown>
Found 4 errors in 4 files (checked 124 source files)

since that particular pytest version is a release candidate, should we pin pytest for now?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions