From 5d9d263e40e1f67910cbefaf96d46a91c560b8b5 Mon Sep 17 00:00:00 2001 From: Keewis Date: Tue, 12 Nov 2019 20:55:20 +0100 Subject: [PATCH] silence more sphinx warnings --- doc/whats-new.rst | 2 +- xarray/backends/api.py | 2 +- xarray/core/dataarray.py | 13 +++++++------ xarray/core/dataset.py | 4 ++-- xarray/core/groupby.py | 4 ++-- xarray/plot/plot.py | 2 +- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/doc/whats-new.rst b/doc/whats-new.rst index 96f0ba9a4a6..54aaa4b7595 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -229,7 +229,7 @@ Documentation (pull:`3331`, pull:`3331`). By `Justus Magin `_. - Add examples for :py:meth:`align`, :py:meth:`merge`, :py:meth:`combine_by_coords`, :py:meth:`full_like`, :py:meth:`zeros_like`, :py:meth:`ones_like`, :py:meth:`Dataset.pipe`, - :py:meth:`Dataset.assign`, :py:meth:`Dataset.reindex`, :py:meth:`Dataset.fillna` (pull:`3328`). + :py:meth:`Dataset.assign`, :py:meth:`Dataset.reindex`, :py:meth:`Dataset.fillna` (:pull:`3328`). By `Anderson Banihirwe `_. - Fixed documentation to clean up an unwanted file created in ``ipython`` example (:pull:`3353`). By `Gregory Gundersen `_. diff --git a/xarray/backends/api.py b/xarray/backends/api.py index 3232a24e780..3dec3995e97 100644 --- a/xarray/backends/api.py +++ b/xarray/backends/api.py @@ -735,7 +735,7 @@ def open_mfdataset( Parameters ---------- paths : str or sequence - Either a string glob in the form "path/to/my/files/*.nc" or an explicit list of + Either a string glob in the form ``"path/to/my/files/*.nc"`` or an explicit list of files to open. Paths can be given as strings or as pathlib Paths. If concatenation along more than one dimension is desired, then ``paths`` must be a nested list-of-lists (see ``manual_combine`` for details). (A string glob will diff --git a/xarray/core/dataarray.py b/xarray/core/dataarray.py index 089f048257f..b906056c922 100644 --- a/xarray/core/dataarray.py +++ b/xarray/core/dataarray.py @@ -1314,7 +1314,7 @@ def interp( values. kwargs: dictionary Additional keyword passed to scipy's interpolator. - **coords_kwarg : {dim: coordinate, ...}, optional + ``**coords_kwarg`` : {dim: coordinate, ...}, optional The keyword arguments form of ``coords``. One of coords or coords_kwargs must be provided. @@ -2028,9 +2028,10 @@ def interpolate_na( ---------- dim : str Specifies the dimension along which to interpolate. - method : {'linear', 'nearest', 'zero', 'slinear', 'quadratic', 'cubic', - 'polynomial', 'barycentric', 'krog', 'pchip', - 'spline', 'akima'}, optional + method : {'linear', 'nearest', 'zero', 'slinear', 'quadratic', + 'cubic', 'polynomial', 'barycentric', 'krog', 'pchip', + 'spline', 'akima'}, optional + String indicating which method to use for interpolation: - 'linear': linear interpolation (Default). Additional keyword @@ -3041,8 +3042,8 @@ def integrate( Coordinate(s) used for the integration. datetime_unit: str, optional Can be used to specify the unit if datetime coordinate is used. - One of {'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns', - 'ps', 'fs', 'as'} + One of {'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns', 'ps', + 'fs', 'as'} Returns ------- diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py index f6a512c0ff4..1bba6e23cba 100644 --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -1499,7 +1499,7 @@ def to_netcdf( Nested dictionary with variable names as keys and dictionaries of variable specific encodings as values, e.g., ``{'my_variable': {'dtype': 'int16', 'scale_factor': 0.1, - 'zlib': True}, ...}`` + 'zlib': True}, ...}`` The `h5netcdf` engine supports both the NetCDF4-style compression encoding parameters ``{'zlib': True, 'complevel': 9}`` and the h5py @@ -2117,7 +2117,7 @@ def thin( A dict with keys matching dimensions and integer values `n` or a single integer `n` applied over all dimensions. One of indexers or indexers_kwargs must be provided. - **indexers_kwargs : {dim: n, ...}, optional + ``**indexers_kwargs`` : {dim: n, ...}, optional The keyword arguments form of ``indexers``. One of indexers or indexers_kwargs must be provided. diff --git a/xarray/core/groupby.py b/xarray/core/groupby.py index 00925bad6bf..8d6ede16141 100644 --- a/xarray/core/groupby.py +++ b/xarray/core/groupby.py @@ -687,9 +687,9 @@ def map(self, func, shortcut=False, args=(), **kwargs): If these conditions are satisfied `shortcut` provides significant speedup. This should be the case for many common groupby operations (e.g., applying numpy ufuncs). - args : tuple, optional + ``*args`` : tuple, optional Positional arguments passed to `func`. - **kwargs + ``**kwargs`` Used to call `func(ar, **kwargs)` for each array `ar`. Returns diff --git a/xarray/plot/plot.py b/xarray/plot/plot.py index 5c754c3f49b..16a4943627e 100644 --- a/xarray/plot/plot.py +++ b/xarray/plot/plot.py @@ -269,7 +269,7 @@ def line( if None, use the default for the matplotlib function. add_legend : boolean, optional Add legend with y axis coordinates (2D inputs only). - *args, **kwargs : optional + ``*args``, ``**kwargs`` : optional Additional arguments to matplotlib.pyplot.plot """ # Handle facetgrids first