Skip to content

Commit

Permalink
Apply new ruff rule RUF022
Browse files Browse the repository at this point in the history
RUF022 `__all__` is not sorted
  • Loading branch information
DimitriPapadopoulos committed Nov 24, 2024
1 parent 70d2c7b commit 0bddbd6
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 44 deletions.
6 changes: 3 additions & 3 deletions xarray/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

# A hardcoded __all__ variable is necessary to appease
# `mypy --strict` running in projects that import xarray.
__all__ = (
__all__ = ( # noqa: RUF022
# Sub-packages
"groupers",
"testing",
Expand Down Expand Up @@ -117,8 +117,8 @@
"Context",
"Coordinates",
"DataArray",
"Dataset",
"DataTree",
"Dataset",
"Index",
"IndexSelResult",
"IndexVariable",
Expand All @@ -131,6 +131,6 @@
"SerializationWarning",
"TreeIsomorphismError",
# Constants
"__version__",
"ALL_DIMS",
"__version__",
)
82 changes: 41 additions & 41 deletions xarray/ufuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,70 +247,45 @@ def _dedent(doc):
"absolute",
"acos",
"acosh",
"add",
"angle",
"arccos",
"arccosh",
"arcsin",
"arcsinh",
"arctan",
"arctan2",
"arctanh",
"asin",
"asinh",
"atan",
"atan2",
"atanh",
"bitwise_and",
"bitwise_count",
"bitwise_invert",
"bitwise_left_shift",
"bitwise_not",
"bitwise_or",
"bitwise_right_shift",
"bitwise_xor",
"cbrt",
"ceil",
"conj",
"conjugate",
"copysign",
"cos",
"cosh",
"deg2rad",
"degrees",
"divide",
"equal",
"exp",
"exp2",
"expm1",
"fabs",
"floor",
"invert",
"isfinite",
"isinf",
"isnan",
"isnat",
"log",
"log10",
"log1p",
"log2",
"logical_not",
"negative",
"positive",
"rad2deg",
"radians",
"reciprocal",
"rint",
"sign",
"signbit",
"sin",
"sinh",
"spacing",
"sqrt",
"square",
"tan",
"tanh",
"trunc",
"add",
"arctan2",
"atan2",
"bitwise_and",
"bitwise_left_shift",
"bitwise_or",
"bitwise_right_shift",
"bitwise_xor",
"copysign",
"divide",
"equal",
"float_power",
"floor",
"floor_divide",
"fmax",
"fmin",
Expand All @@ -320,29 +295,54 @@ def _dedent(doc):
"greater_equal",
"heaviside",
"hypot",
"invert",
"iscomplex",
"isfinite",
"isinf",
"isnan",
"isnat",
"isreal",
"lcm",
"ldexp",
"left_shift",
"less",
"less_equal",
"log",
"log1p",
"log2",
"log10",
"logaddexp",
"logaddexp2",
"logical_and",
"logical_not",
"logical_or",
"logical_xor",
"maximum",
"minimum",
"mod",
"multiply",
"negative",
"nextafter",
"not_equal",
"positive",
"pow",
"power",
"rad2deg",
"radians",
"reciprocal",
"remainder",
"right_shift",
"rint",
"sign",
"signbit",
"sin",
"sinh",
"spacing",
"sqrt",
"square",
"subtract",
"tan",
"tanh",
"true_divide",
"angle",
"isreal",
"iscomplex",
"trunc",
]

0 comments on commit 0bddbd6

Please sign in to comment.