Skip to content

Conversation

Illviljan
Copy link
Contributor

@Illviljan Illviljan commented Oct 28, 2023

Fixes the following pyright error on main:

  C:\Users\J.W\Documents\GitHub\xarray\xarray\namedarray\core.py:846:39 - error: Argument of type "NDArray[Any]" cannot be assigned to parameter "data" of type "duckarray[_ShapeType_co@NamedArray, _DType_co@NamedArray] | Default" in function "_replace"
    Type "NDArray[Any]" cannot be assigned to type "duckarray[_ShapeType_co@NamedArray, _DType_co@NamedArray] | Default"
      "NDArray[Any]" is incompatible with protocol "_arrayfunction[_ShapeType_co@NamedArray, _DType_co@NamedArray]"
        Type "(dtype: None = ..., /) -> ndarray[Any, _dtype]" cannot be assigned to type "(dtype: _DType@__array__, /) -> ndarray[Any, _DType@__array__]"
          Parameter 1: type "_DType@__array__" cannot be assigned to type "None"
            Type cannot be assigned to type "None"
        Type "(dtype: None = ..., /) -> ndarray[Any, _dtype]" cannot be assigned to type "(dtype: _DType@__array__, /) -> ndarray[Any, _DType@__array__]"
          Parameter 1: type "_DType@__array__" cannot be assigned to type "None"
            Type cannot be assigned to type "None"
    ... (reportGeneralTypeIssues)

@github-actions github-actions bot added the topic-NamedArray Lightweight version of Variable label Oct 28, 2023
@Illviljan Illviljan marked this pull request as ready for review October 29, 2023 08:43
@Illviljan Illviljan requested a review from andersy005 October 30, 2023 20:23
@andersy005 andersy005 added the plan to merge Final call for comments label Oct 31, 2023
@Illviljan Illviljan merged commit 8a2f29b into pydata:main Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plan to merge Final call for comments topic-NamedArray Lightweight version of Variable
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants