home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 1865834162

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
1865834162 I_kwDOAMm_X85vNl6y 8112 Local mypy issues 5635139 closed 0     1 2023-08-24T20:25:42Z 2023-08-24T20:43:50Z 2023-08-24T20:43:50Z MEMBER      

What is your issue?

Hi team! I've been out of the flow for a bit. I'm just starting to add a couple of small changes to the library, and I'm having mypy issues I've spent 20 mins trying to figure out without much success.

When I run mypy locally, I get a lot of errors. That's even on the most recent commit which passed in CI, which suggests it's on me rather than Xarray... I've downgraded mypy versions to 1.4.1, which was the version that passed there.

But I can't figure out what it is — does anyone else have this? We can close if it's just me...

``` xarray/core/utils.py:120: error: Incompatible types in assignment (expression has type "Union[Any, dtype[generic], ExtensionDtype]", variable has type "dtype[object_]") [assignment] xarray/core/utils.py:170: error: No overload variant matches argument type "T" [call-overload] xarray/core/utils.py:170: note: Possible overload variants: xarray/core/utils.py:170: note: def isna(obj: DataFrame) -> DataFrame xarray/core/utils.py:170: note: def isna(obj: Series[Any]) -> Series[bool] xarray/core/utils.py:170: note: def isna(obj: Union[Index, list[Any], Union[ExtensionArray, ndarray[Any, Any]]]) -> ndarray[Any, dtype[bool_]] xarray/core/utils.py:170: note: def isna(obj: Union[Union[str, bytes, date, datetime, timedelta, bool, int, float, complex, Timestamp, Timedelta], NaTType, NAType, None]) -> TypeGuard[Union[NaTType, NAType, None]] xarray/core/pdcompat.py:104: error: "Timestamp" has no attribute "as_unit" [attr-defined] xarray/core/indexing.py:1650: error: Argument 1 to "PandasMultiIndexingAdapter" has incompatible type "Index"; expected "MultiIndex" [arg-type] xarray/core/indexes.py:452: error: Incompatible types in assignment (expression has type "Index", variable has type "NumericIndex") [assignment] xarray/core/indexes.py:454: error: Incompatible types in assignment (expression has type "Index", variable has type "NumericIndex") [assignment] xarray/core/indexes.py:456: error: Incompatible types in assignment (expression has type "Index", variable has type "NumericIndex") [assignment] xarray/core/indexes.py:473: error: No overload variant of "Index" matches argument types "ndarray[Any, dtype[Any]]", "dict[str, str]" [call-overload] xarray/core/indexes.py:473: note: Possible overload variants: xarray/core/indexes.py:473: note: def __new__(cls, data: Iterable[Any], dtype: Union[type[complex], type[number[Any]], Literal['float', 'int', 'complex']], copy: bool = ..., name: Any = ..., tupleize_cols: bool = ..., **kwargs: Any) -> NumericIndex xarray/core/indexes.py:473: note: def __new__(cls, data: Iterable[Any] = ..., dtype: Any = ..., copy: bool = ..., name: Any = ..., tupleize_cols: bool = ..., **kwargs: Any) -> Index xarray/core/indexes.py:723: error: Invalid index type "Union[int, slice, ndarray[Any, Any], Variable]" for "Index"; expected type "Union[slice, ndarray[Any, dtype[signedinteger[_64Bit]]], Index, Series[bool], ndarray[Any, dtype[bool_]]]" [index] xarray/core/indexes.py:885: error: "Index" has no attribute "levels"; maybe "nlevels"? [attr-defined] xarray/core/indexes.py:887: error: "Index" has no attribute "levels"; maybe "nlevels"? [attr-defined] xarray/core/indexes.py:889: error: "CategoricalIndex" has no attribute "remove_unused_categories" [attr-defined] xarray/core/indexes.py:889: error: "Index" has no attribute "codes" [attr-defined] xarray/core/indexes.py:891: error: "Index" has no attribute "codes" [attr-defined] xarray/core/indexes.py:900: error: "CategoricalIndex" has no attribute "remove_unused_categories" [attr-defined] xarray/core/indexes.py:916: error: "Index" has no attribute "levels"; maybe "nlevels"? [attr-defined] xarray/core/indexes.py:927: error: "Index" has no attribute "levels"; maybe "nlevels"? [attr-defined] xarray/core/indexes.py:1014: error: "Index" has no attribute "levels"; maybe "nlevels"? [attr-defined] xarray/core/indexes.py:1020: error: Incompatible return value type (got "tuple[dict[Hashable, xarray.core.indexes.Index], pandas.core.indexes.base.Index]", expected "tuple[dict[Hashable, xarray.core.indexes.Index], MultiIndex]") [return-value] xarray/core/indexes.py:1048: error: "Index" has no attribute "codes" [attr-defined] xarray/core/indexes.py:1049: error: "Index" has no attribute "levels"; maybe "nlevels"? [attr-defined] xarray/core/indexes.py:1059: error: Argument 1 to "append" of "list" has incompatible type "ndarray[Any, dtype[signedinteger[Any]]]"; expected "list[int]" [arg-type] xarray/core/indexes.py:1066: error: Argument 1 to "append" of "list" has incompatible type "ndarray[Any, dtype[signedinteger[Any]]]"; expected "list[int]" [arg-type] xarray/core/indexes.py:1106: error: "Index" has no attribute "reorder_levels" [attr-defined] xarray/core/indexes.py:1119: error: No overload variant of "__add__" of "tuple" matches argument type "list[str]" [operator] xarray/core/indexes.py:1119: note: Possible overload variants: xarray/core/indexes.py:1119: note: def __add__(self, tuple[Hashable, ...], /) -> tuple[Hashable, ...] xarray/core/indexes.py:1119: note: def [_T] __add__(self, tuple[_T, ...], /) -> tuple[Union[Hashable, _T], ...] xarray/core/indexes.py:1135: error: Argument 1 to "PandasMultiIndexingAdapter" has incompatible type "Index"; expected "MultiIndex" [arg-type] xarray/core/indexes.py:1179: error: "Index" has no attribute "get_loc_level" [attr-defined] xarray/core/indexes.py:1213: error: "Index" has no attribute "get_locs"; maybe "get_loc"? [attr-defined] xarray/core/indexes.py:1218: error: "Index" has no attribute "get_loc_level" [attr-defined] xarray/core/indexes.py:1225: error: "Index" has no attribute "get_loc_level" [attr-defined] xarray/core/indexes.py:1620: error: Incompatible types in assignment (expression has type "PandasMultiIndex", variable has type "Index") [assignment] xarray/core/indexes.py:1622: error: Incompatible types in assignment (expression has type "PandasIndex", variable has type "Index") [assignment] xarray/core/indexes.py:1626: error: "Index" has no attribute "_copy"; maybe "copy"? [attr-defined] xarray/core/indexes.py:1627: error: "Index" has no attribute "create_variables" [attr-defined] xarray/core/indexes.py:1630: error: Incompatible types in assignment (expression has type "pandas.core.indexes.base.Index", variable has type "xarray.core.indexes.Index") [assignment] xarray/core/variable.py:1837: error: No overload variant of "__add__" of "tuple" matches argument type "list[str]" [operator] xarray/core/variable.py:1837: note: Possible overload variants: xarray/core/variable.py:1837: note: def __add__(self, tuple[Hashable, ...], /) -> tuple[Hashable, ...] xarray/core/variable.py:1837: note: def [_T] __add__(self, tuple[_T, ...], /) -> tuple[Union[Hashable, _T], ...] xarray/core/missing.py:284: error: No overload variant of "str" matches argument types "int", "int", "int" [call-overload] xarray/core/missing.py:284: note: Possible overload variants: xarray/core/missing.py:284: note: def str(object: object = ...) -> str xarray/core/missing.py:284: note: def str(object: Buffer, encoding: str = ..., errors: str = ...) -> str xarray/core/missing.py:284: error: No overload variant of "bytes" matches argument types "int", "int", "int" [call-overload] xarray/core/missing.py:284: note: def bytes(Union[Iterable[SupportsIndex], SupportsIndex, SupportsBytes, Buffer], /) -> bytes xarray/core/missing.py:284: note: def bytes(str, /, encoding: str, errors: str = ...) -> bytes xarray/core/missing.py:284: note: def bytes() -> bytes xarray/core/missing.py:284: error: No overload variant of "int" matches argument types "int", "int", "int" [call-overload] xarray/core/missing.py:284: note: def int(Union[str, Buffer, SupportsInt, SupportsIndex, SupportsTrunc] = ..., /) -> int xarray/core/missing.py:284: note: def int(Union[str, bytes, bytearray], /, base: SupportsIndex) -> int xarray/core/missing.py:284: error: Too many arguments for "float" [call-arg] xarray/core/missing.py:284: error: No overload variant of "complex" matches argument types "int", "int", "int" [call-overload] xarray/core/missing.py:284: note: def complex(real: Union[complex, SupportsComplex, SupportsFloat, SupportsIndex] = ..., imag: Union[complex, SupportsFloat, SupportsIndex] = ...) -> complex xarray/core/missing.py:284: note: def complex(real: Union[str, SupportsComplex, SupportsFloat, SupportsIndex, complex]) -> complex xarray/core/missing.py:312: error: Incompatible default for argument "max_gap" (default has type "None", argument has type "Union[int, float, str, Timedelta, timedelta64, timedelta]") [assignment] xarray/core/missing.py:312: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True xarray/core/missing.py:312: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase xarray/core/groupby.py:306: error: Incompatible types in assignment (expression has type "Optional[DateOffset]", variable has type "Union[str, DateOffset, timedelta, Timedelta]") [assignment] xarray/core/groupby.py:420: error: Incompatible return value type (got "tuple[Any, list[Union[int, slice, list[int]]], IndexVariable, IndexVariable]", expected "tuple[DataArray, list[Union[int, slice, list[int]]], Union[IndexVariable, _DummyGroup[Any]], Index]") [return-value] xarray/core/groupby.py:439: error: Incompatible return value type (got "tuple[DataArray, list[Union[int, slice, list[int]]], Union[Any, IndexVariable, _DummyGroup[Any]], IndexVariable]", expected "tuple[DataArray, list[Union[int, slice, list[int]]], Union[IndexVariable, _DummyGroup[Any]], Index]") [return-value] xarray/core/groupby.py:508: error: Unexpected keyword argument "closed" for "Grouper" [call-arg] /opt/homebrew/lib/python3.9/site-packages/pandas-stubs/core/groupby/grouper.pyi:24: note: "Grouper" defined here xarray/core/groupby.py:508: error: Unexpected keyword argument "label" for "Grouper" [call-arg] /opt/homebrew/lib/python3.9/site-packages/pandas-stubs/core/groupby/grouper.pyi:24: note: "Grouper" defined here xarray/core/groupby.py:508: error: Unexpected keyword argument "origin" for "Grouper" [call-arg] /opt/homebrew/lib/python3.9/site-packages/pandas-stubs/core/groupby/grouper.pyi:24: note: "Grouper" defined here xarray/core/groupby.py:508: error: Unexpected keyword argument "offset" for "Grouper" [call-arg] /opt/homebrew/lib/python3.9/site-packages/pandas-stubs/core/groupby/grouper.pyi:24: note: "Grouper" defined here xarray/core/groupby.py:508: error: Incompatible types in assignment (expression has type "Grouper", variable has type "CFTimeGrouper") [assignment] xarray/core/groupby.py:530: error: Item "Grouper" of "Union[CFTimeGrouper, Grouper]" has no attribute "first_items" [union-attr] xarray/core/groupby.py:533: error: Argument 1 to "groupby" of "Series" has incompatible type "Union[CFTimeGrouper, Grouper]"; expected "Union[tuple[Any, ...], list[Any], Union[ufunc, Callable[..., Any]], list[Union[ufunc, Callable[..., Any]]], Series[Any], list[Series[Any]], ndarray[Any, Any], list[ndarray[Any, Any]], Mapping[Optional[Hashable], Any], list[Mapping[Optional[Hashable], Any]], Index, list[Index], Grouper, list[Grouper]]" [arg-type] xarray/core/dataset.py:503: error: Definition of "__eq__" in base class "DatasetOpsMixin" is incompatible with definition in base class "Mapping" [misc] xarray/core/dataset.py:4057: error: Incompatible types in assignment (expression has type "Variable", target has type "Index") [assignment] xarray/core/dataset.py:4059: error: Incompatible types in assignment (expression has type "Variable", target has type "Index") [assignment] xarray/core/dataset.py:6355: error: Incompatible default for argument "max_gap" (default has type "None", argument has type "Union[int, float, str, Timedelta, timedelta64, timedelta]") [assignment] xarray/core/dataset.py:6355: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True xarray/core/dataset.py:6355: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase xarray/core/dataarray.py:435: error: List item 0 has incompatible type "Union[NumericIndex, IndexVariable]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/core/dataarray.py:2924: error: "MultiIndex" has no attribute "_get_level_number" [attr-defined] xarray/core/dataarray.py:3478: error: Argument "max_gap" to "interp_na" has incompatible type "Union[None, int, float, str, Timedelta, timedelta64, timedelta]"; expected "Union[int, float, str, Timedelta, timedelta64, timedelta]" [arg-type] xarray/core/dataarray.py:3750: error: "object" not callable [operator] xarray/core/coordinates.py:803: error: Incompatible types in assignment (expression has type "MultiIndex", target has type "Variable") [assignment] xarray/core/concat.py:479: error: Incompatible types in assignment (expression has type "Hashable", variable has type "Union[str, T_DataArray, Index]") [assignment] xarray/core/concat.py:499: error: Argument 1 to "pop" of "dict" has incompatible type "Union[str, DataArray, Index]"; expected "Hashable" [arg-type] xarray/core/concat.py:500: error: Argument 1 to "pop" of "dict" has incompatible type "Union[str, DataArray, Index]"; expected "Hashable" [arg-type] xarray/core/concat.py:505: error: Argument 1 to "expand_dims" of "Dataset" has incompatible type "Union[str, DataArray, Index]"; expected "Union[None, Hashable, Sequence[Hashable], Mapping[Any, Any]]" [arg-type] xarray/core/concat.py:615: error: Argument 2 to "concat" of "Index" has incompatible type "Union[str, DataArray, Index]"; expected "Hashable" [arg-type] xarray/core/concat.py:667: error: Invalid index type "Union[str, DataArray, Index]" for "dict[Hashable, Index]"; expected type "Hashable" [index] xarray/coding/times.py:230: error: Incompatible types in assignment (expression has type "Timestamp", variable has type "str") [assignment] xarray/coding/times.py:240: error: No overload variant of "to_timedelta" matches argument types "Any", "str" [call-overload] xarray/coding/times.py:240: note: Possible overload variants: xarray/coding/times.py:240: note: def to_timedelta(arg: Union[str, float, timedelta], unit: Optional[Literal['H', 'T', 'S', 'L', 'U', 'N', 'W', 'w', 'D', 'd', 'days', 'day', 'hours', 'hour', 'hr', 'h', 'm', 'minute', 'min', 'minutes', 't', 's', 'seconds', 'sec', 'second', 'ms', 'milliseconds', 'millisecond', 'milli', 'millis', 'l', 'us', 'microseconds', 'microsecond', 'µs', 'micro', 'micros', 'u', 'ns', 'nanoseconds', 'nano', 'nanos', 'nanosecond', 'n']] = ..., errors: Literal['ignore', 'raise', 'coerce'] = ...) -> Timedelta xarray/coding/times.py:240: note: def to_timedelta(arg: Series[Any], unit: Optional[Literal['H', 'T', 'S', 'L', 'U', 'N', 'W', 'w', 'D', 'd', 'days', 'day', 'hours', 'hour', 'hr', 'h', 'm', 'minute', 'min', 'minutes', 't', 's', 'seconds', 'sec', 'second', 'ms', 'milliseconds', 'millisecond', 'milli', 'millis', 'l', 'us', 'microseconds', 'microsecond', 'µs', 'micro', 'micros', 'u', 'ns', 'nanoseconds', 'nano', 'nanos', 'nanosecond', 'n']] = ..., errors: Literal['ignore', 'raise', 'coerce'] = ...) -> TimedeltaSeries xarray/coding/times.py:240: note: def to_timedelta(arg: Union[Sequence[Union[float, timedelta]], list[Union[str, float, timedelta]], tuple[Union[str, float, timedelta], ...], range, Union[ExtensionArray, ndarray[Any, Any]], Index], unit: Optional[Literal['H', 'T', 'S', 'L', 'U', 'N', 'W', 'w', 'D', 'd', 'days', 'day', 'hours', 'hour', 'hr', 'h', 'm', 'minute', 'min', 'minutes', 't', 's', 'seconds', 'sec', 'second', 'ms', 'milliseconds', 'millisecond', 'milli', 'millis', 'l', 'us', 'microseconds', 'microsecond', 'µs', 'micro', 'micros', 'u', 'ns', 'nanoseconds', 'nano', 'nanos', 'nanosecond', 'n']] = ..., errors: Literal['ignore', 'raise', 'coerce'] = ...) -> TimedeltaIndex xarray/coding/times.py:241: error: No overload variant of "to_timedelta" matches argument types "Any", "str" [call-overload] xarray/coding/times.py:241: note: Possible overload variants: xarray/coding/times.py:241: note: def to_timedelta(arg: Union[str, float, timedelta], unit: Optional[Literal['H', 'T', 'S', 'L', 'U', 'N', 'W', 'w', 'D', 'd', 'days', 'day', 'hours', 'hour', 'hr', 'h', 'm', 'minute', 'min', 'minutes', 't', 's', 'seconds', 'sec', 'second', 'ms', 'milliseconds', 'millisecond', 'milli', 'millis', 'l', 'us', 'microseconds', 'microsecond', 'µs', 'micro', 'micros', 'u', 'ns', 'nanoseconds', 'nano', 'nanos', 'nanosecond', 'n']] = ..., errors: Literal['ignore', 'raise', 'coerce'] = ...) -> Timedelta xarray/coding/times.py:241: note: def to_timedelta(arg: Series[Any], unit: Optional[Literal['H', 'T', 'S', 'L', 'U', 'N', 'W', 'w', 'D', 'd', 'days', 'day', 'hours', 'hour', 'hr', 'h', 'm', 'minute', 'min', 'minutes', 't', 's', 'seconds', 'sec', 'second', 'ms', 'milliseconds', 'millisecond', 'milli', 'millis', 'l', 'us', 'microseconds', 'microsecond', 'µs', 'micro', 'micros', 'u', 'ns', 'nanoseconds', 'nano', 'nanos', 'nanosecond', 'n']] = ..., errors: Literal['ignore', 'raise', 'coerce'] = ...) -> TimedeltaSeries xarray/coding/times.py:241: note: def to_timedelta(arg: Union[Sequence[Union[float, timedelta]], list[Union[str, float, timedelta]], tuple[Union[str, float, timedelta], ...], range, Union[ExtensionArray, ndarray[Any, Any]], Index], unit: Optional[Literal['H', 'T', 'S', 'L', 'U', 'N', 'W', 'w', 'D', 'd', 'days', 'day', 'hours', 'hour', 'hr', 'h', 'm', 'minute', 'min', 'minutes', 't', 's', 'seconds', 'sec', 'second', 'ms', 'milliseconds', 'millisecond', 'milli', 'millis', 'l', 'us', 'microseconds', 'microsecond', 'µs', 'micro', 'micros', 'u', 'ns', 'nanoseconds', 'nano', 'nanos', 'nanosecond', 'n']] = ..., errors: Literal['ignore', 'raise', 'coerce'] = ...) -> TimedeltaIndex xarray/coding/times.py:262: error: No overload variant of "__add__" of "TimedeltaIndex" matches argument type "str" [operator] xarray/coding/times.py:262: note: Possible overload variants: xarray/coding/times.py:262: note: def __add__(self, Period, /) -> PeriodIndex xarray/coding/times.py:262: note: def __add__(self, DatetimeIndex, /) -> DatetimeIndex xarray/coding/times.py:262: note: def __add__(self, Union[Timedelta, TimedeltaIndex], /) -> TimedeltaIndex xarray/coding/times.py:459: error: Incompatible types in assignment (expression has type "str", variable has type "Timestamp") [assignment] xarray/coding/cftimeindex.py:514: error: Signature of "shift" incompatible with supertype "Index" [override] xarray/coding/cftimeindex.py:514: note: Superclass: xarray/coding/cftimeindex.py:514: note: def shift(self, periods: int = ..., freq: Any = ...) -> None xarray/coding/cftimeindex.py:514: note: Subclass: xarray/coding/cftimeindex.py:514: note: def shift(self, n: Union[int, float], freq: Union[str, timedelta]) -> Any xarray/coding/cftime_offsets.py:1219: error: Argument "inclusive" to "date_range" has incompatible type "Optional[Literal['both', 'neither', 'left', 'right']]"; expected "Literal['left', 'right', 'both', 'neither']" [arg-type] xarray/core/resample_cftime.py:155: error: Argument 1 to "to_timedelta" has incompatible type "Union[str, timedelta, BaseCFTimeOffset]"; expected "Union[str, float, timedelta]" [arg-type] xarray/core/resample_cftime.py:238: error: Argument 1 to "_adjust_bin_edges" has incompatible type "CFTimeIndex"; expected "ndarray[Any, Any]" [arg-type] xarray/core/resample_cftime.py:238: error: Argument 5 to "_adjust_bin_edges" has incompatible type "CFTimeIndex"; expected "ndarray[Any, Any]" [arg-type] xarray/tests/test_rolling.py:141: error: List item 0 has incompatible type "ndarray[Any, dtype[signedinteger[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_rolling.py:165: error: Argument 1 to "assert_allclose" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "Union[Union[_SupportsArray[dtype[Union[bool_, number[Any]]]], _NestedSequence[_SupportsArray[dtype[Union[bool_, number[Any]]]]], bool, int, float, complex, _NestedSequence[Union[bool, int, float, complex]]], Union[_SupportsArray[dtype[object_]], _NestedSequence[_SupportsArray[dtype[object_]]]]]" [arg-type] xarray/tests/test_rolling.py:167: error: Argument 1 to "assert_allclose" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "Union[Union[_SupportsArray[dtype[Union[bool_, number[Any]]]], _NestedSequence[_SupportsArray[dtype[Union[bool_, number[Any]]]]], bool, int, float, complex, _NestedSequence[Union[bool, int, float, complex]]], Union[_SupportsArray[dtype[object_]], _NestedSequence[_SupportsArray[dtype[object_]]]]]" [arg-type] xarray/tests/test_rolling.py:180: error: Argument 1 to "assert_allclose" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "Union[Union[_SupportsArray[dtype[Union[bool_, number[Any]]]], _NestedSequence[_SupportsArray[dtype[Union[bool_, number[Any]]]]], bool, int, float, complex, _NestedSequence[Union[bool, int, float, complex]]], Union[_SupportsArray[dtype[object_]], _NestedSequence[_SupportsArray[dtype[object_]]]]]" [arg-type] xarray/tests/test_rolling.py:185: error: Argument 1 to "assert_allclose" has incompatible type "Optional[ndarray[Any, Any]]"; expected "Union[Union[_SupportsArray[dtype[Union[bool_, number[Any]]]], _NestedSequence[_SupportsArray[dtype[Union[bool_, number[Any]]]]], bool, int, float, complex, _NestedSequence[Union[bool, int, float, complex]]], Union[_SupportsArray[dtype[object_]], _NestedSequence[_SupportsArray[dtype[object_]]]]]" [arg-type] xarray/tests/test_rolling.py:597: error: Argument 1 to "assert_allclose" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "Union[Union[_SupportsArray[dtype[Union[bool_, number[Any]]]], _NestedSequence[_SupportsArray[dtype[Union[bool_, number[Any]]]]], bool, int, float, complex, _NestedSequence[Union[bool, int, float, complex]]], Union[_SupportsArray[dtype[object_]], _NestedSequence[_SupportsArray[dtype[object_]]]]]" [arg-type] xarray/tests/test_rolling.py:616: error: Argument 1 to "assert_allclose" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "Union[Union[_SupportsArray[dtype[Union[bool_, number[Any]]]], _NestedSequence[_SupportsArray[dtype[Union[bool_, number[Any]]]]], bool, int, float, complex, _NestedSequence[Union[bool, int, float, complex]]], Union[_SupportsArray[dtype[object_]], _NestedSequence[_SupportsArray[dtype[object_]]]]]" [arg-type] xarray/tests/test_rolling.py:622: error: Argument 1 to "assert_allclose" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "Union[Union[_SupportsArray[dtype[Union[bool_, number[Any]]]], _NestedSequence[_SupportsArray[dtype[Union[bool_, number[Any]]]]], bool, int, float, complex, _NestedSequence[Union[bool, int, float, complex]]], Union[_SupportsArray[dtype[object_]], _NestedSequence[_SupportsArray[dtype[object_]]]]]" [arg-type] xarray/tests/test_plot.py:229: error: List item 0 has incompatible type "ndarray[Any, dtype[signedinteger[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_plot.py:515: error: No overload variant of "__sub__" of "DatetimeIndex" matches argument type "timedelta64" [operator] xarray/tests/test_plot.py:515: note: Possible overload variants: xarray/tests/test_plot.py:515: note: def __sub__(self, TimedeltaSeries, /) -> TimestampSeries xarray/tests/test_plot.py:515: note: def __sub__(self, Union[Timedelta, TimedeltaIndex], /) -> DatetimeIndex xarray/tests/test_plot.py:515: note: def __sub__(self, Union[Timestamp, DatetimeIndex], /) -> TimedeltaIndex xarray/tests/test_plot.py:1003: error: "object" not callable [operator] xarray/tests/test_groupby.py:735: error: Argument 1 to "groupby" of "Dataset" has incompatible type "Index"; expected "Union[Hashable, DataArray, IndexVariable]" [arg-type] xarray/tests/test_groupby.py:735: note: Following member(s) of "Index" have conflicts: xarray/tests/test_groupby.py:735: note: __hash__: expected "Callable[[], int]", got "None" xarray/tests/test_groupby.py:1475: error: No overload variant of "cut" matches argument types "DataArray", "list[float]", "dict[Any, Any]" [call-overload] xarray/tests/test_groupby.py:1475: note: Possible overload variants: xarray/tests/test_groupby.py:1475: note: def cut(x: Union[Index, ndarray[Any, dtype[Any]], Sequence[int], Sequence[float]], bins: Union[int, Series[Any], Int64Index, Float64Index, Sequence[int], Sequence[float]], right: bool = ..., *, labels: Literal[False], retbins: Literal[True], precision: int = ..., include_lowest: bool = ..., duplicates: Literal['raise', 'drop'] = ..., ordered: bool = ...) -> tuple[ndarray[Any, dtype[signedinteger[Any]]], ndarray[Any, dtype[Any]]] xarray/tests/test_groupby.py:1475: note: def cut(x: Union[Index, ndarray[Any, dtype[Any]], Sequence[int], Sequence[float]], bins: IntervalIndex, right: bool = ..., *, labels: Literal[False], retbins: Literal[True], precision: int = ..., include_lowest: bool = ..., duplicates: Literal['raise', 'drop'] = ..., ordered: bool = ...) -> tuple[ndarray[Any, dtype[signedinteger[Any]]], IntervalIndex] xarray/tests/test_groupby.py:1475: note: def cut(x: Series[Any], bins: Union[int, Series[Any], Int64Index, Float64Index, Sequence[int], Sequence[float]], right: bool = ..., labels: Union[Literal[False], Sequence[Optional[Hashable]], None] = ..., *, retbins: Literal[True], precision: int = ..., include_lowest: bool = ..., duplicates: Literal['raise', 'drop'] = ..., ordered: bool = ...) -> tuple[Series[Any], ndarray[Any, dtype[Any]]] xarray/tests/test_groupby.py:1475: note: def cut(x: Series[Any], bins: IntervalIndex, right: bool = ..., labels: Optional[Sequence[Optional[Hashable]]] = ..., *, retbins: Literal[True], precision: int = ..., include_lowest: bool = ..., duplicates: Literal['raise', 'drop'] = ..., ordered: bool = ...) -> tuple[Series[Any], IntervalIndex] xarray/tests/test_groupby.py:1475: note: def cut(x: Union[Index, ndarray[Any, dtype[Any]], Sequence[int], Sequence[float]], bins: Union[int, Series[Any], Int64Index, Float64Index, Sequence[int], Sequence[float]], right: bool = ..., labels: Optional[Sequence[Optional[Hashable]]] = ..., *, retbins: Literal[True], precision: int = ..., include_lowest: bool = ..., duplicates: Literal['raise', 'drop'] = ..., ordered: bool = ...) -> tuple[Categorical, ndarray[Any, dtype[Any]]] xarray/tests/test_groupby.py:1475: note: def cut(x: Union[Index, ndarray[Any, dtype[Any]], Sequence[int], Sequence[float]], bins: IntervalIndex, right: bool = ..., labels: Optional[Sequence[Optional[Hashable]]] = ..., *, retbins: Literal[True], precision: int = ..., include_lowest: bool = ..., duplicates: Literal['raise', 'drop'] = ..., ordered: bool = ...) -> tuple[Categorical, IntervalIndex] xarray/tests/test_groupby.py:1475: note: def cut(x: Union[Index, ndarray[Any, dtype[Any]], Sequence[int], Sequence[float]], bins: Union[int, Series[Any], Int64Index, Float64Index, Sequence[int], Sequence[float], IntervalIndex], right: bool = ..., *, labels: Literal[False], retbins: Literal[False] = ..., precision: int = ..., include_lowest: bool = ..., duplicates: Literal['raise', 'drop'] = ..., ordered: bool = ...) -> ndarray[Any, dtype[signedinteger[Any]]] xarray/tests/test_groupby.py:1475: note: def cut(x: Series[Any], bins: Union[int, Series[Any], Int64Index, Float64Index, Sequence[int], Sequence[float], IntervalIndex], right: bool = ..., labels: Union[Literal[False], Sequence[Optional[Hashable]], None] = ..., retbins: Literal[False] = ..., precision: int = ..., include_lowest: bool = ..., duplicates: Literal['raise', 'drop'] = ..., ordered: bool = ...) -> Series[Any] xarray/tests/test_groupby.py:1475: note: def cut(x: Union[Index, ndarray[Any, dtype[Any]], Sequence[int], Sequence[float]], bins: Union[int, Series[Any], Int64Index, Float64Index, Sequence[int], Sequence[float], IntervalIndex], right: bool = ..., labels: Optional[Sequence[Optional[Hashable]]] = ..., retbins: Literal[False] = ..., precision: int = ..., include_lowest: bool = ..., duplicates: Literal['raise', 'drop'] = ..., ordered: bool = ...) -> Categorical xarray/tests/test_groupby.py:1526: error: List item 0 has incompatible type "ndarray[Any, dtype[floating[_64Bit]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_groupby.py:2035: error: Argument "origin" to "resample" of "Series" has incompatible type "str"; expected "Union[Timestamp, Literal['epoch', 'start', 'start_day', 'end', 'end_day']]" [arg-type] xarray/tests/test_formatting.py:110: error: Argument 1 to "to_timedelta" has incompatible type "list[str]"; expected "Union[Sequence[Union[float, timedelta]], list[Union[str, float, timedelta]], tuple[Union[str, float, timedelta], ...], range, Union[ExtensionArray, ndarray[Any, Any]], Index]" [arg-type] xarray/tests/test_formatting.py:110: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance xarray/tests/test_formatting.py:110: note: Consider using "Sequence" instead, which is covariant xarray/tests/test_formatting.py:112: error: Argument 1 to "to_timedelta" has incompatible type "list[str]"; expected "Union[Sequence[Union[float, timedelta]], list[Union[str, float, timedelta]], tuple[Union[str, float, timedelta], ...], range, Union[ExtensionArray, ndarray[Any, Any]], Index]" [arg-type] xarray/tests/test_formatting.py:112: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance xarray/tests/test_formatting.py:112: note: Consider using "Sequence" instead, which is covariant xarray/tests/test_coding_times.py:623: error: Argument 1 to "to_timedelta" has incompatible type "list[str]"; expected "Union[Sequence[Union[float, timedelta]], list[Union[str, float, timedelta]], tuple[Union[str, float, timedelta], ...], range, Union[ExtensionArray, ndarray[Any, Any]], Index]" [arg-type] xarray/tests/test_coding_times.py:623: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance xarray/tests/test_coding_times.py:623: note: Consider using "Sequence" instead, which is covariant xarray/tests/test_coding_times.py:624: error: Argument 1 to "to_timedelta" has incompatible type "list[str]"; expected "Union[Sequence[Union[float, timedelta]], list[Union[str, float, timedelta]], tuple[Union[str, float, timedelta], ...], range, Union[ExtensionArray, ndarray[Any, Any]], Index]" [arg-type] xarray/tests/test_coding_times.py:624: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance xarray/tests/test_coding_times.py:624: note: Consider using "Sequence" instead, which is covariant xarray/tests/test_coding_times.py:625: error: Argument 1 to "to_timedelta" has incompatible type "list[object]"; expected "Union[Sequence[Union[float, timedelta]], list[Union[str, float, timedelta]], tuple[Union[str, float, timedelta], ...], range, Union[ExtensionArray, ndarray[Any, Any]], Index]" [arg-type] xarray/tests/test_coding_times.py:626: error: Argument 1 to "to_timedelta" has incompatible type "list[str]"; expected "Union[Sequence[Union[float, timedelta]], list[Union[str, float, timedelta]], tuple[Union[str, float, timedelta], ...], range, Union[ExtensionArray, ndarray[Any, Any]], Index]" [arg-type] xarray/tests/test_coding_times.py:626: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance xarray/tests/test_coding_times.py:626: note: Consider using "Sequence" instead, which is covariant xarray/tests/test_indexes.py:413: error: "Index" has no attribute "codes" [attr-defined] xarray/tests/test_indexes.py:433: error: "Index" has no attribute "codes" [attr-defined] xarray/tests/test_indexes.py:435: error: "Index" has no attribute "levels"; maybe "nlevels"? [attr-defined] xarray/tests/test_indexes.py:436: error: "Index" has no attribute "levels"; maybe "nlevels"? [attr-defined] xarray/tests/test_indexes.py:588: error: Incompatible types in assignment (expression has type "type[NumericIndex]", variable has type "type[xarray.core.indexes.Index]") [assignment] xarray/tests/test_accessor_dt.py:114: error: Incompatible types in assignment (expression has type "DataArray", variable has type "Index") [assignment] xarray/tests/test_accessor_dt.py:239: error: Incompatible types in assignment (expression has type "DataArray", variable has type "DatetimeIndex") [assignment] xarray/tests/test_accessor_dt.py:258: error: "DatetimeIndex" has no attribute "dt" [attr-defined] xarray/tests/test_variable.py:2945: error: "PandasObject" has no attribute "astype" [attr-defined] xarray/tests/test_dataset.py:587: error: No overload variant of "__getitem__" of "Series" matches argument type "Hashable" [call-overload] xarray/tests/test_dataset.py:587: note: Possible overload variants: xarray/tests/test_dataset.py:587: note: def __getitem__(self, Union[list[str], Index, Series[Any], slice, Series[bool], ndarray[Any, dtype[bool_]], list[bool], tuple[Union[Any, slice], ...]], /) -> Series[Any] xarray/tests/test_dataset.py:587: note: def __getitem__(self, Union[int, str], /) -> Any xarray/tests/test_dataset.py:587: error: No overload variant of "__getitem__" of "DataFrame" matches argument type "Hashable" [call-overload] xarray/tests/test_dataset.py:587: note: def __getitem__(self, Union[str, bytes, date, datetime, timedelta, bool, int, float, complex, Timestamp, Timedelta], /) -> Series[Any] xarray/tests/test_dataset.py:587: note: def __getitem__(self, slice, /) -> DataFrame xarray/tests/test_dataset.py:587: note: def [ScalarT] __getitem__(self, Union[tuple[Any, ...], Series[bool], DataFrame, list[str], list[ScalarT], Index, ndarray[Any, dtype[str_]], ndarray[Any, dtype[bool_]], Sequence[tuple[Union[str, bytes, date, datetime, timedelta, bool, int, float, complex, Timestamp, Timedelta], ...]]], /) -> DataFrame xarray/tests/test_dataset.py:1648: error: Argument "tolerance" to "sel" of "Dataset" has incompatible type "str"; expected "Union[int, float, Iterable[Union[int, float]], None]" [arg-type] xarray/tests/test_dataset.py:1648: note: Following member(s) of "str" have conflicts: xarray/tests/test_dataset.py:1648: note: Expected: xarray/tests/test_dataset.py:1648: note: def __iter__(self) -> Iterator[Union[int, float]] xarray/tests/test_dataset.py:1648: note: Got: xarray/tests/test_dataset.py:1648: note: def __iter__(self) -> Iterator[str] xarray/tests/test_dataset.py:1997: error: Incompatible types in assignment (expression has type "DataFrame", variable has type "Series[Any]") [assignment] xarray/tests/test_dataset.py:1998: error: Argument 1 to "equals" of "NDFrame" has incompatible type "Union[Series[Any], DataFrame]"; expected "Series[Any]" [arg-type] xarray/tests/test_dataset.py:3476: error: "Index" has no attribute "reorder_levels" [attr-defined] xarray/tests/test_dataset.py:3935: error: "Index" has no attribute "month" [attr-defined] xarray/tests/test_dataset.py:4502: error: Incompatible types in assignment (expression has type "Dataset", variable has type "DataFrame") [assignment] xarray/tests/test_dataset.py:4503: error: Incompatible types in assignment (expression has type "Dataset", variable has type "DataFrame") [assignment] xarray/tests/test_dataset.py:4507: error: Incompatible types in assignment (expression has type "Dataset", variable has type "DataFrame") [assignment] xarray/tests/test_dataset.py:4508: error: Incompatible types in assignment (expression has type "Dataset", variable has type "DataFrame") [assignment] xarray/tests/test_dataset.py:4513: error: Incompatible types in assignment (expression has type "Dataset", variable has type "DataFrame") [assignment] xarray/tests/test_dataset.py:4514: error: Incompatible types in assignment (expression has type "Dataset", variable has type "DataFrame") [assignment] xarray/tests/test_dataset.py:4628: error: Incompatible types in assignment (expression has type "list[str]", variable has type "Index") [assignment] xarray/tests/test_dataset.py:4650: error: Argument 1 to "apply" of "DataFrame" has incompatible type overloaded function; expected "Callable[..., Series[Any]]" [arg-type] xarray/tests/test_dataset.py:5090: error: List item 0 has incompatible type "ndarray[Any, dtype[Any]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataset.py:5093: error: List item 0 has incompatible type "ndarray[Any, dtype[Any]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:330: error: Argument 2 to "DataArray" has incompatible type "list[object]"; expected "Union[Sequence[Union[Sequence[Any], Index, DataArray]], Mapping[Any, Any], None]" [arg-type] xarray/tests/test_dataarray.py:1049: error: No overload variant of "__sub__" of "DatetimeIndex" matches argument type "str" [operator] xarray/tests/test_dataarray.py:1049: note: Possible overload variants: xarray/tests/test_dataarray.py:1049: note: def __sub__(self, TimedeltaSeries, /) -> TimestampSeries xarray/tests/test_dataarray.py:1049: note: def __sub__(self, Union[Timedelta, TimedeltaIndex], /) -> DatetimeIndex xarray/tests/test_dataarray.py:1049: note: def __sub__(self, Union[Timestamp, DatetimeIndex], /) -> TimedeltaIndex xarray/tests/test_dataarray.py:1049: error: No overload variant of "__sub__" of "DatetimeIndex" matches argument type "bytes" [operator] xarray/tests/test_dataarray.py:1049: error: No overload variant of "__sub__" of "DatetimeIndex" matches argument type "date" [operator] xarray/tests/test_dataarray.py:1049: error: No overload variant of "__sub__" of "DatetimeIndex" matches argument type "datetime" [operator] xarray/tests/test_dataarray.py:1049: error: No overload variant of "__sub__" of "DatetimeIndex" matches argument type "timedelta" [operator] xarray/tests/test_dataarray.py:1049: error: No overload variant of "__sub__" of "DatetimeIndex" matches argument type "bool" [operator] xarray/tests/test_dataarray.py:1049: error: No overload variant of "__sub__" of "DatetimeIndex" matches argument type "int" [operator] xarray/tests/test_dataarray.py:1049: error: No overload variant of "__sub__" of "DatetimeIndex" matches argument type "float" [operator] xarray/tests/test_dataarray.py:1049: error: No overload variant of "__sub__" of "DatetimeIndex" matches argument type "complex" [operator] xarray/tests/test_dataarray.py:1049: note: Right operand is of type "Union[str, bytes, date, datetime, timedelta, bool, int, float, complex, Timestamp, Timedelta]" xarray/tests/test_dataarray.py:1225: error: Argument "coords" to "DataArray" has incompatible type "tuple[ndarray[Any, dtype[Any]]]"; expected "Union[Sequence[Union[Sequence[Any], Index, DataArray]], Mapping[Any, Any], None]" [arg-type] xarray/tests/test_dataarray.py:1399: error: Argument 2 to "DataArray" has incompatible type "list[IndexVariable]"; expected "Union[Sequence[Union[Sequence[Any], Index, DataArray]], Mapping[Any, Any], None]" [arg-type] xarray/tests/test_dataarray.py:2237: error: List item 0 has incompatible type "ndarray[Any, dtype[signedinteger[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:2237: error: List item 1 has incompatible type "ndarray[Any, dtype[signedinteger[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:2238: error: List item 0 has incompatible type "ndarray[Any, dtype[signedinteger[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:2238: error: List item 1 has incompatible type "ndarray[Any, dtype[signedinteger[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:2288: error: List item 0 has incompatible type "ndarray[Any, dtype[signedinteger[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:3218: error: Argument 1 to "assert_array_equal" has incompatible type "Union[ndarray[Any, Any], ExtensionArray]"; expected "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" [arg-type] xarray/tests/test_dataarray.py:3228: error: Argument 1 to "assert_array_equal" has incompatible type "Union[ndarray[Any, Any], ExtensionArray]"; expected "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" [arg-type] xarray/tests/test_dataarray.py:3249: error: Argument 1 to "assert_array_equal" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" [arg-type] xarray/tests/test_dataarray.py:3249: error: Argument 2 to "assert_array_equal" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" [arg-type] xarray/tests/test_dataarray.py:3250: error: Argument 1 to "assert_array_equal" has incompatible type "Hashable"; expected "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" [arg-type] xarray/tests/test_dataarray.py:3250: error: Argument 2 to "assert_array_equal" has incompatible type "Hashable"; expected "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" [arg-type] xarray/tests/test_dataarray.py:3254: error: Argument 2 to "assert_array_equal" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" [arg-type] xarray/tests/test_dataarray.py:3258: error: Incompatible types in assignment (expression has type "DataFrame", variable has type "Series[Any]") [assignment] xarray/tests/test_dataarray.py:3261: error: Incompatible types in assignment (expression has type "DataFrame", variable has type "Series[Any]") [assignment] xarray/tests/test_dataarray.py:3262: error: Argument 1 to "assert_array_equal" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" [arg-type] xarray/tests/test_dataarray.py:3262: error: Argument 2 to "assert_array_equal" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" [arg-type] xarray/tests/test_dataarray.py:3285: error: Argument 1 to "assert_array_equal" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" [arg-type] xarray/tests/test_dataarray.py:3287: error: "Index" has no attribute "levels"; maybe "nlevels"? [attr-defined] xarray/tests/test_dataarray.py:3288: error: "Index" has no attribute "levels"; maybe "nlevels"? [attr-defined] xarray/tests/test_dataarray.py:3289: error: "Index" has no attribute "levels"; maybe "nlevels"? [attr-defined] xarray/tests/test_dataarray.py:3310: error: Argument 2 to "assert_array_equal" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" [arg-type] xarray/tests/test_dataarray.py:3318: error: Incompatible types in assignment (expression has type "DataFrame", variable has type "Series[Any]") [assignment] xarray/tests/test_dataarray.py:3323: error: Argument 1 to "assert_array_equal" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" [arg-type] xarray/tests/test_dataarray.py:3340: error: Argument 2 to "assert_array_equal" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" [arg-type] xarray/tests/test_dataarray.py:3934: error: List item 0 has incompatible type "ndarray[Any, dtype[floating[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:3934: error: List item 1 has incompatible type "ndarray[Any, dtype[floating[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:3942: error: List item 0 has incompatible type "ndarray[Any, dtype[floating[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:3942: error: List item 1 has incompatible type "ndarray[Any, dtype[floating[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:3954: error: List item 0 has incompatible type "ndarray[Any, dtype[floating[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:3954: error: List item 1 has incompatible type "ndarray[Any, dtype[floating[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:3957: error: List item 0 has incompatible type "ndarray[Any, dtype[floating[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:3957: error: List item 1 has incompatible type "ndarray[Any, dtype[floating[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:3982: error: List item 0 has incompatible type "ndarray[Any, dtype[floating[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:3982: error: List item 1 has incompatible type "ndarray[Any, dtype[floating[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:3999: error: List item 0 has incompatible type "ndarray[Any, dtype[floating[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:4005: error: List item 0 has incompatible type "ndarray[Any, dtype[floating[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:4005: error: List item 1 has incompatible type "ndarray[Any, dtype[floating[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:4011: error: List item 0 has incompatible type "ndarray[Any, dtype[floating[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:4011: error: List item 1 has incompatible type "ndarray[Any, dtype[floating[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:4020: error: List item 0 has incompatible type "ndarray[Any, dtype[floating[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:4020: error: List item 1 has incompatible type "ndarray[Any, dtype[floating[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:4032: error: List item 0 has incompatible type "ndarray[Any, dtype[signedinteger[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_dataarray.py:4033: error: List item 0 has incompatible type "ndarray[Any, dtype[signedinteger[Any]]]"; expected "Union[Sequence[Any], Index, DataArray]" [list-item] xarray/tests/test_concat.py:1008: error: No overload variant of "concat" matches argument types "list[DataArray]", "list[int]" [call-overload] xarray/tests/test_concat.py:1008: note: Possible overload variants: xarray/tests/test_concat.py:1008: note: def [T_Dataset <: Dataset, T_DataArray <: DataArray] concat(objs: Iterable[T_Dataset], dim: Union[Hashable, T_DataArray, Index], data_vars: Union[Literal['all', 'minimal', 'different'], Iterable[Hashable]] = ..., coords: Union[Literal['all', 'minimal', 'different'], list[Hashable]] = ..., compat: Literal['identical', 'equals', 'broadcast_equals', 'no_conflicts', 'override', 'minimal'] = ..., positions: Optional[Iterable[Iterable[int]]] = ..., fill_value: object = ..., join: Literal['outer', 'inner', 'left', 'right', 'exact', 'override'] = ..., combine_attrs: Union[Callable[..., Any], Literal['drop', 'identical', 'no_conflicts', 'drop_conflicts', 'override']] = ...) -> T_Dataset xarray/tests/test_concat.py:1008: note: def [T_DataArray <: DataArray] concat(objs: Iterable[T_DataArray], dim: Union[Hashable, T_DataArray, Index], data_vars: Union[Literal['all', 'minimal', 'different'], Iterable[Hashable]] = ..., coords: Union[Literal['all', 'minimal', 'different'], list[Hashable]] = ..., compat: Literal['identical', 'equals', 'broadcast_equals', 'no_conflicts', 'override', 'minimal'] = ..., positions: Optional[Iterable[Iterable[int]]] = ..., fill_value: object = ..., join: Literal['outer', 'inner', 'left', 'right', 'exact', 'override'] = ..., combine_attrs: Union[Callable[..., Any], Literal['drop', 'identical', 'no_conflicts', 'drop_conflicts', 'override']] = ...) -> T_DataArray xarray/tests/test_backends.py:570: error: Argument 1 to "to_timedelta" has incompatible type "list[str]"; expected "Union[Sequence[Union[float, timedelta]], list[Union[str, float, timedelta]], tuple[Union[str, float, timedelta], ...], range, Union[ExtensionArray, ndarray[Any, Any]], Index]" [arg-type] xarray/tests/test_backends.py:570: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance xarray/tests/test_backends.py:570: note: Consider using "Sequence" instead, which is covariant xarray/tests/test_backends.py:5244: error: Incompatible types in assignment (expression has type "Union[DataFrame, Series[Any]]", variable has type "DataFrame") [assignment] xarray/tests/test_conventions.py:90: error: Argument 1 to "to_timedelta" has incompatible type "list[str]"; expected "Union[Sequence[Union[float, timedelta]], list[Union[str, float, timedelta]], tuple[Union[str, float, timedelta], ...], range, Union[ExtensionArray, ndarray[Any, Any]], Index]" [arg-type] xarray/tests/test_conventions.py:90: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance xarray/tests/test_conventions.py:90: note: Consider using "Sequence" instead, which is covariant Found 183 errors in 28 files (checked 142 source files) ```
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8112/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 0 rows from issue in issue_comments
Powered by Datasette · Queries took 3.224ms · About: xarray-datasette