From c4ccc208b960f060f828521d7400f73b53358763 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Wed, 6 Nov 2024 13:52:37 +0100 Subject: [PATCH] Apply ruff rule RUF022 RUF022 `__all__` is not sorted --- xarray/__init__.py | 8 ++++---- xarray/backends/__init__.py | 12 ++++++------ xarray/groupers.py | 4 ++-- xarray/plot/__init__.py | 8 ++++---- xarray/testing/__init__.py | 2 +- xarray/testing/strategies.py | 10 +++++----- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/xarray/__init__.py b/xarray/__init__.py index e818d6c53b2..e474cee85ad 100644 --- a/xarray/__init__.py +++ b/xarray/__init__.py @@ -78,13 +78,13 @@ "combine_by_coords", "combine_nested", "concat", + "corr", + "cov", + "cross", "date_range", "date_range_like", "decode_cf", "dot", - "cov", - "corr", - "cross", "full_like", "get_options", "group_subtrees", @@ -121,8 +121,8 @@ "Index", "IndexSelResult", "IndexVariable", - "Variable", "NamedArray", + "Variable", # Exceptions "InvalidTreeError", "MergeError", diff --git a/xarray/backends/__init__.py b/xarray/backends/__init__.py index 550b9e29e42..e5df179716f 100644 --- a/xarray/backends/__init__.py +++ b/xarray/backends/__init__.py @@ -23,21 +23,21 @@ "AbstractDataStore", "BackendArray", "BackendEntrypoint", - "FileManager", "CachingFileManager", "DummyFileManager", - "InMemoryDataStore", - "NetCDF4DataStore", - "PydapDataStore", - "ScipyDataStore", + "FileManager", "H5NetCDFStore", - "ZarrStore", "H5netcdfBackendEntrypoint", + "InMemoryDataStore", "NetCDF4BackendEntrypoint", + "NetCDF4DataStore", "PydapBackendEntrypoint", + "PydapDataStore", "ScipyBackendEntrypoint", + "ScipyDataStore", "StoreBackendEntrypoint", "ZarrBackendEntrypoint", + "ZarrStore", "list_engines", "refresh_engines", ] diff --git a/xarray/groupers.py b/xarray/groupers.py index c4980e6d810..0adfcce9483 100644 --- a/xarray/groupers.py +++ b/xarray/groupers.py @@ -35,12 +35,12 @@ from xarray.namedarray.pycompat import is_chunked_array __all__ = [ + "BinGrouper", "EncodedGroups", "Grouper", "Resampler", - "UniqueGrouper", - "BinGrouper", "TimeResampler", + "UniqueGrouper", ] RESAMPLE_DIM = "__resample_dim__" diff --git a/xarray/plot/__init__.py b/xarray/plot/__init__.py index ae7a0012b32..49f12e13bfc 100644 --- a/xarray/plot/__init__.py +++ b/xarray/plot/__init__.py @@ -22,15 +22,15 @@ from xarray.plot.facetgrid import FacetGrid __all__ = [ - "plot", - "line", - "step", + "FacetGrid", "contour", "contourf", "hist", "imshow", + "line", "pcolormesh", - "FacetGrid", + "plot", "scatter", + "step", "surface", ] diff --git a/xarray/testing/__init__.py b/xarray/testing/__init__.py index a4770071d3a..a18b1963421 100644 --- a/xarray/testing/__init__.py +++ b/xarray/testing/__init__.py @@ -17,8 +17,8 @@ __all__ = [ "assert_allclose", "assert_chunks_equal", - "assert_duckarray_equal", "assert_duckarray_allclose", + "assert_duckarray_equal", "assert_equal", "assert_identical", "assert_isomorphic", diff --git a/xarray/testing/strategies.py b/xarray/testing/strategies.py index eeba8540133..db7660c07ab 100644 --- a/xarray/testing/strategies.py +++ b/xarray/testing/strategies.py @@ -20,14 +20,14 @@ __all__ = [ - "supported_dtypes", - "pandas_index_dtypes", - "names", + "attrs", "dimension_names", "dimension_sizes", - "attrs", - "variables", + "names", + "pandas_index_dtypes", + "supported_dtypes", "unique_subset_of", + "variables", ]