Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sparse typing #8387

Merged
merged 14 commits into from
Oct 31, 2023
Merged

Fix sparse typing #8387

merged 14 commits into from
Oct 31, 2023

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