Skip to content

Commit 98e9692

Browse files
authored
maint: remove stray spaces (#4504)
* remove stray spaces * black * whats new * Apply suggestions from code review
1 parent 569a4da commit 98e9692

31 files changed

+57
-69
lines changed

conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def pytest_runtest_setup(item):
1919
pytest.skip("set --run-flaky option to run flaky tests")
2020
if "network" in item.keywords and not item.config.getoption("--run-network-tests"):
2121
pytest.skip(
22-
"set --run-network-tests to run test requiring an " "internet connection"
22+
"set --run-network-tests to run test requiring an internet connection"
2323
)
2424

2525

doc/examples/apply_ufunc_vectorize_1d.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@
333333
"cell_type": "markdown",
334334
"metadata": {},
335335
"source": [
336-
"Now our function currently only works on one vector of data which is not so useful given our 3D dataset.\n",
336+
"Now our function currently only works on one vector of data which is not so useful given our 3D dataset.\n",
337337
"Let's try passing the whole dataset. We add a `print` statement so we can see what our function receives."
338338
]
339339
},

doc/plotting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ The simplest way to make a plot is to call the :py:func:`DataArray.plot()` metho
106106
@savefig plotting_1d_simple.png width=4in
107107
air1d.plot()
108108
109-
xarray uses the coordinate name along with metadata ``attrs.long_name``, ``attrs.standard_name``, ``DataArray.name`` and ``attrs.units`` (if available) to label the axes. The names ``long_name``, ``standard_name`` and ``units`` are copied from the `CF-conventions spec <http://cfconventions.org/Data/cf-conventions/cf-conventions-1.7/build/ch03s03.html>`_. When choosing names, the order of precedence is ``long_name``, ``standard_name`` and finally ``DataArray.name``. The y-axis label in the above plot was constructed from the ``long_name`` and ``units`` attributes of ``air1d``.
109+
xarray uses the coordinate name along with metadata ``attrs.long_name``, ``attrs.standard_name``, ``DataArray.name`` and ``attrs.units`` (if available) to label the axes. The names ``long_name``, ``standard_name`` and ``units`` are copied from the `CF-conventions spec <http://cfconventions.org/Data/cf-conventions/cf-conventions-1.7/build/ch03s03.html>`_. When choosing names, the order of precedence is ``long_name``, ``standard_name`` and finally ``DataArray.name``. The y-axis label in the above plot was constructed from the ``long_name`` and ``units`` attributes of ``air1d``.
110110

111111
.. ipython:: python
112112

doc/reshaping.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ of multi-index levels:
237237
mda.reorder_levels(x=["wavenumber", "band"])
238238
239239
As of xarray v0.9 coordinate labels for each dimension are optional.
240-
You can also use ``.set_index`` / ``.reset_index`` to add / remove
240+
You can also use ``.set_index`` / ``.reset_index`` to add / remove
241241
labels for one or several dimensions:
242242

243243
.. ipython:: python

doc/whats-new.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ Documentation
5252

5353
Internal Changes
5454
~~~~~~~~~~~~~~~~
55-
55+
- Removed stray spaces that stem from black removing new lines (:pull:`4504`).
56+
By `Mathias Hauser <https://github.com/mathause>`_.
5657

5758
.. _whats-new.0.16.1:
5859

@@ -178,7 +179,7 @@ Internal Changes
178179
older than 2.9)
179180
- all versions of other packages released in the last 12 months
180181

181-
All are up from 6 months (:issue:`4295`)
182+
All are up from 6 months (:issue:`4295`)
182183
`Guido Imperiale <https://github.com/crusaderky>`_.
183184
- Use :py:func:`dask.array.apply_gufunc` instead of :py:func:`dask.array.blockwise` in
184185
:py:func:`xarray.apply_ufunc` when using ``dask='parallelized'``. (:pull:`4060`, :pull:`4391`, :pull:`4392`)
@@ -2516,7 +2517,7 @@ Breaking changes
25162517
- A new resampling interface to match pandas' groupby-like API was added to
25172518
:py:meth:`Dataset.resample` and :py:meth:`DataArray.resample`
25182519
(:issue:`1272`). :ref:`Timeseries resampling <resampling>` is
2519-
fully supported for data with arbitrary dimensions as is both downsampling
2520+
fully supported for data with arbitrary dimensions as is both downsampling
25202521
and upsampling (including linear, quadratic, cubic, and spline interpolation).
25212522

25222523
Old syntax:
@@ -3647,7 +3648,7 @@ Bug fixes
36473648
- Restore checks for shape consistency between data and coordinates in the
36483649
DataArray constructor (:issue:`758`).
36493650
- Single dimension variables no longer transpose as part of a broader
3650-
``.transpose``. This behavior was causing ``pandas.PeriodIndex`` dimensions
3651+
``.transpose``. This behavior was causing ``pandas.PeriodIndex`` dimensions
36513652
to lose their type (:issue:`749`)
36523653
- :py:class:`~xarray.Dataset` labels remain as their native type on ``.to_dataset``.
36533654
Previously they were coerced to strings (:issue:`745`)

doc/why-xarray.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Core data structures
4949
--------------------
5050

5151
xarray has two core data structures, which build upon and extend the core
52-
strengths of NumPy_ and pandas_. Both data structures are fundamentally N-dimensional:
52+
strengths of NumPy_ and pandas_. Both data structures are fundamentally N-dimensional:
5353

5454
- :py:class:`~xarray.DataArray` is our implementation of a labeled, N-dimensional
5555
array. It is an N-D generalization of a :py:class:`pandas.Series`. The name

xarray/backends/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def _get_default_engine_grib():
8787
if msgs:
8888
raise ValueError(" or\n".join(msgs))
8989
else:
90-
raise ValueError("PyNIO or cfgrib is required for accessing " "GRIB files")
90+
raise ValueError("PyNIO or cfgrib is required for accessing GRIB files")
9191

9292

9393
def _get_default_engine_gz():
@@ -1228,7 +1228,7 @@ def save_mfdataset(
12281228
"""
12291229
if mode == "w" and len(set(paths)) < len(paths):
12301230
raise ValueError(
1231-
"cannot use mode='w' when writing multiple " "datasets to the same path"
1231+
"cannot use mode='w' when writing multiple datasets to the same path"
12321232
)
12331233

12341234
for obj in datasets:

xarray/backends/h5netcdf_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def prepare_variable(
280280
and "compression_opts" in encoding
281281
and encoding["complevel"] != encoding["compression_opts"]
282282
):
283-
raise ValueError("'complevel' and 'compression_opts' encodings " "mismatch")
283+
raise ValueError("'complevel' and 'compression_opts' encodings mismatch")
284284
complevel = encoding.pop("complevel", 0)
285285
if complevel != 0:
286286
encoding.setdefault("compression_opts", complevel)

xarray/backends/netcdf3.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"uint",
2121
"int64",
2222
"uint64",
23-
"float" "real",
23+
"float",
24+
"real",
2425
"double",
2526
"bool",
2627
"string",

xarray/backends/scipy_.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ def _open_scipy_netcdf(filename, mode, mmap, version):
7070
except TypeError as e:
7171
# TODO: gzipped loading only works with NetCDF3 files.
7272
if "is not a valid NetCDF 3 file" in e.message:
73-
raise ValueError(
74-
"gzipped file loading only supports " "NetCDF 3 files."
75-
)
73+
raise ValueError("gzipped file loading only supports NetCDF 3 files.")
7674
else:
7775
raise
7876

@@ -110,9 +108,7 @@ def __init__(
110108
self, filename_or_obj, mode="r", format=None, group=None, mmap=None, lock=None
111109
):
112110
if group is not None:
113-
raise ValueError(
114-
"cannot save to a group with the " "scipy.io.netcdf backend"
115-
)
111+
raise ValueError("cannot save to a group with the scipy.io.netcdf backend")
116112

117113
if format is None or format == "NETCDF3_64BIT":
118114
version = 2

0 commit comments

Comments
 (0)