home / github

Menu
  • GraphQL API
  • Search all tables

issues

Table actions
  • GraphQL API for issues

10 rows where comments = 6, state = "closed" and user = 14371165 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date), closed_at (date)

type 2

  • pull 9
  • issue 1

state 1

  • closed · 10 ✖

repo 1

  • xarray 10
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
1684281101 PR_kwDOAMm_X85PKWFR 7787 Allow the label run-upstream to run upstream CI Illviljan 14371165 closed 0     6 2023-04-26T05:07:44Z 2024-03-13T21:44:50Z 2023-05-01T19:12:26Z MEMBER   0 pydata/xarray/pulls/7787

This PR makes it easier to trigger the upstream CI and creates a mypy test for upstream as well, but only when adding this label so that it doesn't mess with the scheduled runs and those results.

Noticed the need in #7786.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/7787/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1691206894 I_kwDOAMm_X85kzcTu 7802 Mypy errors with matplotlib 3.8 Illviljan 14371165 closed 0     6 2023-05-01T19:03:51Z 2023-09-17T05:03:00Z 2023-09-17T05:02:59Z MEMBER      

Matplotlib has started to support typing in main (https://github.com/matplotlib/matplotlib/issues/20504) and mypy is throwing a few errors:

``` xarray/core/options.py:12: error: Cannot assign to a type [misc] xarray/core/options.py:12: error: Incompatible types in assignment (expression has type "Type[str]", variable has type "Type[Colormap]") [assignment] xarray/plot/utils.py:808: error: Argument 1 to "set_xticks" of "_AxesBase" has incompatible type "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]"; expected "Iterable[float]" [arg-type] xarray/plot/utils.py:810: error: Argument 1 to "set_yticks" of "_AxesBase" has incompatible type "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]"; expected "Iterable[float]" [arg-type] xarray/plot/utils.py:813: error: Argument 1 to "set_xlim" of "_AxesBase" has incompatible type "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]"; expected "Union[float, Tuple[float, float], None]" [arg-type] xarray/plot/utils.py:815: error: Argument 1 to "set_ylim" of "_AxesBase" has incompatible type "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]"; expected "Union[float, Tuple[float, float], None]" [arg-type] Generated Cobertura report: /home/runner/work/xarray/xarray/mypy_report/cobertura.xml Installing missing stub packages: /home/runner/micromamba-root/envs/xarray-tests/bin/python -m pip install types-Pillow types-PyYAML types-Pygments types-babel types-colorama types-paramiko types-psutil types-pytz types-pywin32 types-setuptools types-urllib3 Generated Cobertura report: /home/runner/work/xarray/xarray/mypy_report/cobertura.xml Found 154 errors in 10 files (checked 138 source files) xarray/plot/utils.py:1349: error: Unsupported operand types for * ("_SupportsArray[dtype[Any]]" and "float") [operator] xarray/plot/utils.py:1349: error: Unsupported operand types for * ("_NestedSequence[_SupportsArray[dtype[Any]]]" and "float") [operator] xarray/plot/utils.py:1349: error: Unsupported operand types for * ("_NestedSequence[Union[bool, int, float, complex, str, bytes]]" and "float") [operator] xarray/plot/utils.py:1349: note: Left operand is of type "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" xarray/plot/utils.py:1349: error: Unsupported operand types for * ("str" and "float") [operator] xarray/plot/utils.py:1349: error: Unsupported operand types for * ("bytes" and "float") [operator] xarray/plot/utils.py:1350: error: Item "_SupportsArray[dtype[Any]]" of "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" has no attribute "mask" [union-attr] xarray/plot/utils.py:1350: error: Item "_NestedSequence[_SupportsArray[dtype[Any]]]" of "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" has no attribute "mask" [union-attr] xarray/plot/utils.py:1350: error: Item "int" of "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" has no attribute "mask" [union-attr] xarray/plot/utils.py:1350: error: Item "float" of "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" has no attribute "mask" [union-attr] xarray/plot/utils.py:1350: error: Item "complex" of "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" has no attribute "mask" [union-attr] xarray/plot/utils.py:1350: error: Item "str" of "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" has no attribute "mask" [union-attr] xarray/plot/utils.py:1350: error: Item "bytes" of "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" has no attribute "mask" [union-attr] xarray/plot/utils.py:1350: error: Item "_NestedSequence[Union[bool, int, float, complex, str, bytes]]" of "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" has no attribute "mask" [union-attr] xarray/plot/utils.py:1351: error: Item "_SupportsArray[dtype[Any]]" of "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" has no attribute "mask" [union-attr] xarray/plot/utils.py:1351: error: Item "_NestedSequence[_SupportsArray[dtype[Any]]]" of "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" has no attribute "mask" [union-attr] xarray/plot/utils.py:1351: error: Item "int" of "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" has no attribute "mask" [union-attr] xarray/plot/utils.py:1351: error: Item "float" of "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" has no attribute "mask" [union-attr] xarray/plot/utils.py:1351: error: Item "complex" of "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" has no attribute "mask" [union-attr] xarray/plot/utils.py:1351: error: Item "str" of "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" has no attribute "mask" [union-attr] xarray/plot/utils.py:1351: error: Item "bytes" of "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" has no attribute "mask" [union-attr] xarray/plot/utils.py:1351: error: Item "_NestedSequence[Union[bool, int, float, complex, str, bytes]]" of "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" has no attribute "mask" [union-attr] xarray/plot/facetgrid.py:684: error: "FigureCanvasBase" has no attribute "get_renderer" [attr-defined] xarray/plot/accessor.py:182: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc] xarray/plot/accessor.py:182: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc] xarray/plot/accessor.py:309: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc] xarray/plot/accessor.py:309: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc] xarray/plot/accessor.py:428: error: Overloaded function implementation cannot produce return type of signature 2 [misc] xarray/plot/accessor.py:428: error: Overloaded function implementation cannot produce return type of signature 3 [misc] xarray/plot/accessor.py:433: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc] xarray/plot/accessor.py:433: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc] xarray/plot/accessor.py:552: error: Overloaded function implementation cannot produce return type of signature 2 [misc] xarray/plot/accessor.py:552: error: Overloaded function implementation cannot produce return type of signature 3 [misc] xarray/plot/accessor.py:557: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc] xarray/plot/accessor.py:557: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc] xarray/plot/accessor.py:676: error: Overloaded function implementation cannot produce return type of signature 2 [misc] xarray/plot/accessor.py:676: error: Overloaded function implementation cannot produce return type of signature 3 [misc] xarray/plot/accessor.py:681: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc] xarray/plot/accessor.py:681: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc] xarray/plot/accessor.py:800: error: Overloaded function implementation cannot produce return type of signature 2 [misc] xarray/plot/accessor.py:800: error: Overloaded function implementation cannot produce return type of signature 3 [misc] xarray/plot/accessor.py:948: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc] xarray/plot/accessor.py:948: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc] xarray/plot/accessor.py:1075: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc] xarray/plot/accessor.py:1075: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc] xarray/plot/accessor.py:1190: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc] xarray/plot/accessor.py:1190: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc] xarray/plot/dataset_plot.py:324: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc] xarray/plot/dataset_plot.py:324: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc] xarray/plot/dataset_plot.py:478: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc] xarray/plot/dataset_plot.py:478: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc] xarray/plot/dataset_plot.py:649: error: Function gets multiple values for keyword argument "x" [misc] xarray/plot/dataset_plot.py:649: error: Function gets multiple values for keyword argument "y" [misc] xarray/plot/dataset_plot.py:649: error: Function gets multiple values for keyword argument "u" [misc] xarray/plot/dataset_plot.py:649: error: Function gets multiple values for keyword argument "v" [misc] xarray/plot/dataset_plot.py:649: error: Function gets multiple values for keyword argument "density" [misc] xarray/plot/dataset_plot.py:649: error: Function gets multiple values for keyword argument "linewidth" [misc] xarray/plot/dataset_plot.py:649: error: Function gets multiple values for keyword argument "color" [misc] xarray/plot/dataset_plot.py:649: error: Function gets multiple values for keyword argument "cmap" [misc] xarray/plot/dataset_plot.py:649: error: Function gets multiple values for keyword argument "norm" [misc] xarray/plot/dataset_plot.py:649: error: Function gets multiple values for keyword argument "arrowsize" [misc] xarray/plot/dataset_plot.py:649: error: Function gets multiple values for keyword argument "arrowstyle" [misc] xarray/plot/dataset_plot.py:649: error: Function gets multiple values for keyword argument "minlength" [misc] xarray/plot/dataset_plot.py:649: error: Function gets multiple values for keyword argument "transform" [misc] xarray/plot/dataset_plot.py:649: error: Function gets multiple values for keyword argument "zorder" [misc] xarray/plot/dataset_plot.py:649: error: Function gets multiple values for keyword argument "start_points" [misc] xarray/plot/dataset_plot.py:649: error: Function gets multiple values for keyword argument "maxlength" [misc] xarray/plot/dataset_plot.py:649: error: Function gets multiple values for keyword argument "integration_direction" [misc] xarray/plot/dataset_plot.py:649: error: Function gets multiple values for keyword argument "broken_streamlines" [misc] xarray/plot/dataset_plot.py:649: error: Argument 1 has incompatible type "*List[ndarray[Any, Any]]"; expected "Union[float, Tuple[float, float]]" [arg-type] xarray/plot/dataset_plot.py:649: error: Argument 1 has incompatible type "*List[ndarray[Any, Any]]"; expected "Union[str, Colormap, None]" [arg-type] xarray/plot/dataset_plot.py:649: error: Argument 1 has incompatible type "*List[ndarray[Any, Any]]"; expected "Union[str, Normalize, None]" [arg-type] xarray/plot/dataset_plot.py:649: error: Argument 1 has incompatible type "*List[ndarray[Any, Any]]"; expected "float" [arg-type] xarray/plot/dataset_plot.py:649: error: Argument 1 has incompatible type "*List[ndarray[Any, Any]]"; expected "Union[str, ArrowStyle]" [arg-type] xarray/plot/dataset_plot.py:649: error: Argument 1 has incompatible type "*List[ndarray[Any, Any]]"; expected "Optional[Transform]" [arg-type] xarray/plot/dataset_plot.py:649: error: Argument 1 has incompatible type "*List[ndarray[Any, Any]]"; expected "Optional[float]" [arg-type] xarray/plot/dataset_plot.py:649: error: Argument 1 has incompatible type "*List[ndarray[Any, Any]]"; expected "Literal['forward', 'backward', 'both']" [arg-type] xarray/plot/dataset_plot.py:649: error: Argument 1 has incompatible type "*List[ndarray[Any, Any]]"; expected "bool" [arg-type] xarray/plot/dataset_plot.py:751: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc] xarray/plot/dataset_plot.py:751: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc] xarray/plot/dataarray_plot.py:718: error: Incompatible return value type (got "Tuple[Union[ndarray[Any, Any], List[ndarray[Any, Any]]], ndarray[Any, Any], Union[BarContainer, Polygon, List[Union[BarContainer, Polygon]]]]", expected "Tuple[ndarray[Any, Any], ndarray[Any, Any], BarContainer]") [return-value] xarray/plot/dataarray_plot.py:996: error: "Axes" has no attribute "view_init" [attr-defined] xarray/plot/dataarray_plot.py:1106: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc] xarray/plot/dataarray_plot.py:1106: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc] xarray/plot/dataarray_plot.py:1261: error: Argument 1 to "scatter" of "Axes" has incompatible type "*List[ndarray[Any, Any]]"; expected "Union[Sequence[Union[Union[Tuple[float, float, float], str], Union[str, Tuple[float, float, float, float], Tuple[Union[Tuple[float, float, float], str], float], Tuple[Tuple[float, float, float, float], float]]]], Union[Union[Tuple[float, float, float], str], Union[str, Tuple[float, float, float, float], Tuple[Union[Tuple[float, float, float], str], float], Tuple[Tuple[float, float, float, float], float]]], None]" [arg-type] xarray/plot/dataarray_plot.py:1261: error: Argument 1 to "scatter" of "Axes" has incompatible type "*List[ndarray[Any, Any]]"; expected "Optional[Union[str, Path, MarkerStyle]]" [arg-type] xarray/plot/dataarray_plot.py:1261: error: Argument 1 to "scatter" of "Axes" has incompatible type "*List[ndarray[Any, Any]]"; expected "Union[str, Colormap, None]" [arg-type] xarray/plot/dataarray_plot.py:1261: error: Argument 1 to "scatter" of "Axes" has incompatible type "*List[ndarray[Any, Any]]"; expected "Union[str, Normalize, None]" [arg-type] xarray/plot/dataarray_plot.py:1261: error: Argument 1 to "scatter" of "Axes" has incompatible type "*List[ndarray[Any, Any]]"; expected "Optional[float]" [arg-type] xarray/plot/dataarray_plot.py:1261: error: Argument 1 to "scatter" of "Axes" has incompatible type "*List[ndarray[Any, Any]]"; expected "Union[float, Sequence[float], None]" [arg-type] xarray/plot/dataarray_plot.py:1615: error: "Axes" has no attribute "set_zlabel" [attr-defined] xarray/plot/dataarray_plot.py:1655: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc] xarray/plot/dataarray_plot.py:1655: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc] xarray/plot/dataarray_plot.py:1874: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc] xarray/plot/dataarray_plot.py:1874: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc] xarray/plot/dataarray_plot.py:2010: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc] xarray/plot/dataarray_plot.py:2010: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc] xarray/plot/dataarray_plot.py:2146: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [misc] xarray/plot/dataarray_plot.py:2146: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [misc] xarray/plot/dataarray_plot.py:2464: error: "Axes" has no attribute "plot_surface" [attr-defined] xarray/tests/test_plot.py:427: error: Value of type "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]" is not indexable [index] xarray/tests/test_plot.py:443: error: Module has no attribute "viridis" [attr-defined] xarray/tests/test_plot.py:457: error: "None" not callable [misc] xarray/tests/test_plot.py:462: error: "None" not callable [misc] xarray/tests/test_plot.py:465: error: "None" not callable [misc] xarray/tests/test_plot.py:471: error: Module has no attribute "viridis" [attr-defined] xarray/tests/test_plot.py:477: error: Module has no attribute "viridis" [attr-defined] xarray/tests/test_plot.py:482: error: Module has no attribute "viridis" [attr-defined] xarray/tests/test_plot.py:486: error: Module has no attribute "viridis" [attr-defined] xarray/tests/test_plot.py:493: error: "None" not callable [misc] xarray/tests/test_plot.py:498: error: "None" not callable [misc] xarray/tests/test_plot.py:501: error: "None" not callable [misc] xarray/tests/test_plot.py:931: error: Module has no attribute "magma" [attr-defined] xarray/tests/test_plot.py:933: error: Module has no attribute "magma" [attr-defined] xarray/tests/test_plot.py:1173: error: Module has no attribute "RdBu" [attr-defined] xarray/tests/test_plot.py:1746: error: Item "Colormap" of "Optional[Colormap]" has no attribute "colors" [union-attr] xarray/tests/test_plot.py:1746: error: Item "None" of "Optional[Colormap]" has no attribute "colors" [union-attr] xarray/tests/test_plot.py:1747: error: Item "Colormap" of "Optional[Colormap]" has no attribute "colors" [union-attr] xarray/tests/test_plot.py:1747: error: Item "None" of "Optional[Colormap]" has no attribute "colors" [union-attr] xarray/tests/test_plot.py:1749: error: Item "Colormap" of "Optional[Colormap]" has no attribute "_rgba_over" [union-attr] xarray/tests/test_plot.py:1749: error: Item "None" of "Optional[Colormap]" has no attribute "_rgba_over" [union-attr] xarray/tests/test_plot.py:1801: error: Item "None" of "Optional[ndarray[Any, Any]]" has no attribute "size" [union-attr] xarray/tests/test_plot.py:1952: error: Item "None" of "Optional[ndarray[Any, Any]]" has no attribute "min" [union-attr] xarray/tests/test_plot.py:1952: error: Item "None" of "Optional[ndarray[Any, Any]]" has no attribute "max" [union-attr] xarray/tests/test_plot.py:1968: error: Item "None" of "Optional[ndarray[Any, Any]]" has no attribute "dtype" [union-attr] xarray/tests/test_plot.py:1969: error: Value of type "Optional[ndarray[Any, Any]]" is not indexable [index] xarray/tests/test_plot.py:2125: error: "Artist" has no attribute "get_clim" [attr-defined] xarray/tests/test_plot.py:2135: error: "Colorbar" has no attribute "vmin" [attr-defined] xarray/tests/test_plot.py:2136: error: "Colorbar" has no attribute "vmax" [attr-defined] xarray/tests/test_plot.py:2202: error: "Artist" has no attribute "get_clim" [attr-defined] xarray/tests/test_plot.py:2218: error: "Artist" has no attribute "norm" [attr-defined] xarray/tests/test_plot.py:2747: error: Item "_AxesBase" of "Optional[_AxesBase]" has no attribute "legend_" [union-attr] xarray/tests/test_plot.py:2747: error: Item "None" of "Optional[_AxesBase]" has no attribute "legend_" [union-attr] xarray/tests/test_plot.py:2754: error: Item "None" of "Optional[_AxesBase]" has no attribute "get_legend" [union-attr] xarray/tests/test_plot.py:2775: error: Item "None" of "Optional[FigureBase]" has no attribute "axes" [union-attr] xarray/tests/test_plot.py:2775: error: Argument 1 to "len" has incompatible type "Union[_AxesBase, None, Any]"; expected "Sized" [arg-type] xarray/tests/test_plot.py:2803: error: Module has no attribute "dates" [attr-defined] xarray/tests/test_plot.py:2812: error: Module has no attribute "dates" [attr-defined] xarray/tests/test_plot.py:2831: error: Item "None" of "Optional[_AxesBase]" has no attribute "xaxis" [union-attr] xarray/tests/test_plot.py:2831: error: Module has no attribute "dates" [attr-defined] xarray/tests/test_groupby.py:715: error: Argument 1 to "groupby" of "Dataset" has incompatible type "ndarray[Any, dtype[signedinteger[Any]]]"; expected "Union[Hashable, DataArray, IndexVariable]" [arg-type] xarray/tests/test_groupby.py:715: note: Following member(s) of "ndarray[Any, dtype[signedinteger[Any]]]" have conflicts: xarray/tests/test_groupby.py:715: note: __hash__: expected "Callable[[], int]", got "None" xarray/tests/test_dataset.py:6964: error: "PlainQuantity[Any]" not callable [operator] xarray/tests/test_dataset.py:6965: error: "PlainQuantity[Any]" not callable [operator] xarray/tests/test_dataset.py:7007: error: "PlainQuantity[Any]" not callable [operator] xarray/tests/test_dataset.py:7008: error: "PlainQuantity[Any]" not callable [operator] xarray/tests/test_dataarray.py:6687: error: "PlainQuantity[Any]" not callable [operator] xarray/tests/test_dataarray.py:6689: error: "PlainQuantity[Any]" not callable [operator] xarray/tests/test_dataarray.py:6735: error: "PlainQuantity[Any]" not callable [operator] xarray/tests/test_dataarray.py:6737: error: "PlainQuantity[Any]" not callable [operator] ```

Some guidance how to solve these:

  • [xy]ticks in mpl is currently overly narrowly type hinted because I was following the docstring, but I agree that ArrayLike is a better type hint for that, plan on updating (including the docstring) upstream
  • [xy]lim originally neglected the case of passing set_xlim((min, max)) as a tuple, but that has been updated. xarray has that type hinted as array like, but mpl has it hinted as a 2-tuple (I think it is currently still of floats, but may be expanded as we more directly address units/categoricals/etc). Willing to debate here, but my starting position is that the "exactly 2 values" is valuable info here, and I think tuple is the only way to do that.
  • get_renderer is not actually available on all of our backends, we should maybe see if there is a more preferred way of doing what you are doing here that will work for all backends, but haven't looked into it too closely.
  • Module has no attribute <colormap> is another instance of dynamically generated behavior which can't be statically type checked (elegantly, at least), can probably be replaced by mpl.colormaps["<colormap>"] in many cases, which is statically typecheckable
  • Anything to do with 3D Axes is not type hinted, perhaps ignore for now (or help us get that type hinted adequately, but it is relatively low priority currently)
  • Module has no attribute "dates" we don't currently type hint dates/units things, but it is on my mind, not sure yet if it will be in first release or not though (may at least put a placeholder that gets rid of this error, but treats everything as "Any").

Originally posted by @ksunden in https://github.com/pydata/xarray/issues/7787#issuecomment-1523743471

The suggestion from mpl (specifically @tacaswell) was to use constrained layout for the purpose that xarray currently uses get_renderer, this will ensure that the facetgrid works with all mpl backends.

Originally posted by @ksunden in https://github.com/pydata/xarray/issues/7787#issuecomment-1528091492

I'm also relatively sure that if you are willing to put a floor on the version of Matplotlib you support get_window_extent will use it's internally cached renderer (and when we make it uniformly optional we also fixed the cache invalidation logic).

Originally posted by @tacaswell in https://github.com/pydata/xarray/issues/7787#issuecomment-1528096647

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/7802/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
1420242462 PR_kwDOAMm_X85BYlCD 7204 absolufy-imports - No relative imports - PEP8 Illviljan 14371165 closed 0     6 2022-10-24T05:27:24Z 2022-12-10T11:42:43Z 2022-12-07T21:24:44Z MEMBER   0 pydata/xarray/pulls/7204

I saw dask has started using absolute imports in https://github.com/dask/dask/pull/8796. I find it much more readable and there's a nice pre-commit for it as well.

Easiest way to deal with the merge conflicts is probably to just accept your changes and let pre-commit fix them afterwards.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/7204/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1420230433 PR_kwDOAMm_X85BYia0 7203 Avoid loading any data for reprs Illviljan 14371165 closed 0     6 2022-10-24T05:12:40Z 2022-10-28T16:23:19Z 2022-10-28T16:23:19Z MEMBER   0 pydata/xarray/pulls/7203
  • [x] Closes #6722
  • [x] Tests added
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/7203/reactions",
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1376095009 PR_kwDOAMm_X84_G4FM 7044 Self should be Any Illviljan 14371165 closed 0     6 2022-09-16T15:18:21Z 2022-09-23T18:56:40Z 2022-09-16T15:54:54Z MEMBER   0 pydata/xarray/pulls/7044

Self should be as permissive as possible until it works properly.

Using Any instead of TypeVar avoids errors like these: C:\users\j.w\documents\github\xarray\xarray\plot\facetgrid.py:462: error: Incompatible return value type (got "FacetGrid", expected "Self")

xref: #6923

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/7044/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1124884287 PR_kwDOAMm_X84yHhLI 6240 Run pyupgrade on core/utils Illviljan 14371165 closed 0     6 2022-02-05T09:39:48Z 2022-08-12T09:08:36Z 2022-02-05T21:29:37Z MEMBER   0 pydata/xarray/pulls/6240

Make #6239 cleaner by running pyupgrade separately.

pyupgrade fixes typing only if from __future__ import annotations has been manually added to the file. Could probably do this in other files as well.

xref: #6244

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6240/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
990194656 MDExOlB1bGxSZXF1ZXN0NzI4ODE5ODk1 5772 Create benchmark for groupby Illviljan 14371165 closed 0     6 2021-09-07T17:23:50Z 2022-08-12T09:03:28Z 2021-09-20T20:15:30Z MEMBER   0 pydata/xarray/pulls/5772
  • [x] Benchmark from #659
  • [x] Tests added
  • [x] Passes pre-commit run --all-files
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5772/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
976179483 MDExOlB1bGxSZXF1ZXN0NzE3MTgwODkw 5726 Bump minimum version requirements for dask from 2.15 to 2.24 Illviljan 14371165 closed 0     6 2021-08-21T17:07:10Z 2021-09-08T17:58:26Z 2021-08-25T21:08:01Z MEMBER   0 pydata/xarray/pulls/5726

Dask released 2.24 around august 22 2020: https://github.com/dask/dask/releases/tag/2.24.0

  • [x] May help fixing errors in #5571
  • [x] Passes pre-commit run --all-files
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5726/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
895713502 MDExOlB1bGxSZXF1ZXN0NjQ3OTAwMzEy 5345 Remove npcompat.moveaxis Illviljan 14371165 closed 0     6 2021-05-19T17:41:31Z 2021-07-02T16:08:17Z 2021-06-17T17:18:28Z MEMBER   0 pydata/xarray/pulls/5345

Remove some compatibility code that doesn't seem necessary anymore.

  • [x] Passes pre-commit run --all-files
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5345/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
778123296 MDExOlB1bGxSZXF1ZXN0NTQ4MjY4ODg5 4762 Print number of variables in repr Illviljan 14371165 closed 0     6 2021-01-04T14:13:17Z 2021-05-18T18:17:50Z 2021-01-12T00:21:19Z MEMBER   0 pydata/xarray/pulls/4762

Show the printed and total number of variables in the repr.

  • [x] Passes isort . && black . && mypy . && flake8

```python import numpy as np import xarray as xr

a = np.arange(0, 15) b = np.core.defchararray.add("long_variable_name", a.astype(str)) c = np.arange(0, 25) d = np.core.defchararray.add("attr_", c.astype(str)) e = {k: 2 for k in d} coords = dict(time=da.array([0, 1])) data_vars = dict() for v in b: data_vars[v] = xr.DataArray( name=v, data=np.array([0, 1]).astype(bool), dims=["time"], coords=coords, ) ds1 = xr.Dataset(data_vars) ds1.attrs = e

The repr now shows how many attributes in total there are:

print(ds1) Out[10]: <xarray.Dataset> Dimensions: (time: 2) Coordinates: * time (time) int32 0 1 Data variables: (12/15) long_variable_name0 (time) bool False True long_variable_name1 (time) bool False True long_variable_name2 (time) bool False True long_variable_name3 (time) bool False True long_variable_name4 (time) bool False True long_variable_name5 (time) bool False True ... long_variable_name9 (time) bool False True long_variable_name10 (time) bool False True long_variable_name11 (time) bool False True long_variable_name12 (time) bool False True long_variable_name13 (time) bool False True long_variable_name14 (time) bool False True Attributes: (12/25) attr_0: 2 attr_1: 2 attr_2: 2 attr_3: 2 attr_4: 2 attr_5: 2 ... attr_19: 2 attr_20: 2 attr_21: 2 attr_22: 2 attr_23: 2 attr_24: 2 ```

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4762/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [active_lock_reason] TEXT,
   [draft] INTEGER,
   [pull_request] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [state_reason] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
);
CREATE INDEX [idx_issues_repo]
    ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
    ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
    ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
    ON [issues] ([user]);
Powered by Datasette · Queries took 30.301ms · About: xarray-datasette