Skip to content

Commit 683c7b5

Browse files
MarckKjreback
authored andcommitted
DOC: Fix validation type error SA05 (#25208)
Create check for SA05 errors in CI
1 parent 0535180 commit 683c7b5

27 files changed

+131
-132
lines changed

Diff for: ci/code_checks.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ fi
240240
### DOCSTRINGS ###
241241
if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
242242

243-
MSG='Validate docstrings (GL06, GL07, GL09, SS04, PR03, PR05, EX04, RT04, SS05)' ; echo $MSG
244-
$BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL06,GL07,GL09,SS04,PR03,PR05,EX04,RT04,SS05
243+
MSG='Validate docstrings (GL06, GL07, GL09, SS04, PR03, PR05, EX04, RT04, SS05, SA05)' ; echo $MSG
244+
$BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL06,GL07,GL09,SS04,PR03,PR05,EX04,RT04,SS05,SA05
245245
RET=$(($RET + $?)) ; echo $MSG "DONE"
246246

247247
fi

Diff for: pandas/core/algorithms.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ def unique(values):
295295
296296
See Also
297297
--------
298-
pandas.Index.unique
299-
pandas.Series.unique
298+
Index.unique
299+
Series.unique
300300
301301
Examples
302302
--------

Diff for: pandas/core/arrays/categorical.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ class Categorical(ExtensionArray, PandasObject):
276276
277277
See Also
278278
--------
279-
pandas.api.types.CategoricalDtype : Type for categorical data.
279+
api.types.CategoricalDtype : Type for categorical data.
280280
CategoricalIndex : An Index with an underlying ``Categorical``.
281281
282282
Notes

Diff for: pandas/core/computation/eval.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def eval(expr, parser='pandas', engine=None, truediv=True,
205205
A list of objects implementing the ``__getitem__`` special method that
206206
you can use to inject an additional collection of namespaces to use for
207207
variable lookup. For example, this is used in the
208-
:meth:`~pandas.DataFrame.query` method to inject the
208+
:meth:`~DataFrame.query` method to inject the
209209
``DataFrame.index`` and ``DataFrame.columns``
210210
variables that refer to their respective :class:`~pandas.DataFrame`
211211
instance attributes.
@@ -248,8 +248,8 @@ def eval(expr, parser='pandas', engine=None, truediv=True,
248248
249249
See Also
250250
--------
251-
pandas.DataFrame.query
252-
pandas.DataFrame.eval
251+
DataFrame.query
252+
DataFrame.eval
253253
254254
Notes
255255
-----

Diff for: pandas/core/dtypes/base.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ class ExtensionDtype(_DtypeOpsMixin):
153153
154154
See Also
155155
--------
156-
pandas.api.extensions.register_extension_dtype
157-
pandas.api.extensions.ExtensionArray
156+
extensions.register_extension_dtype
157+
extensions.ExtensionArray
158158
159159
Notes
160160
-----
@@ -173,7 +173,7 @@ class ExtensionDtype(_DtypeOpsMixin):
173173
174174
Optionally one can override construct_array_type for construction
175175
with the name of this dtype via the Registry. See
176-
:meth:`pandas.api.extensions.register_extension_dtype`.
176+
:meth:`extensions.register_extension_dtype`.
177177
178178
* construct_array_type
179179

Diff for: pandas/core/dtypes/dtypes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ class CategoricalDtype(PandasExtensionDtype, ExtensionDtype):
195195
196196
See Also
197197
--------
198-
pandas.Categorical
198+
Categorical
199199
200200
Notes
201201
-----

Diff for: pandas/core/dtypes/inference.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def is_number(obj):
4444
4545
See Also
4646
--------
47-
pandas.api.types.is_integer: Checks a subgroup of numbers.
47+
api.types.is_integer: Checks a subgroup of numbers.
4848
4949
Examples
5050
--------

Diff for: pandas/core/frame.py

+24-24
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ class DataFrame(NDFrame):
320320
DataFrame.from_records : Constructor from tuples, also record arrays.
321321
DataFrame.from_dict : From dicts of Series, arrays, or dicts.
322322
DataFrame.from_items : From sequence of (key, value) pairs
323-
pandas.read_csv, pandas.read_table, pandas.read_clipboard.
323+
read_csv, pandas.read_table, pandas.read_clipboard.
324324
325325
Examples
326326
--------
@@ -735,7 +735,7 @@ def style(self):
735735
736736
See Also
737737
--------
738-
pandas.io.formats.style.Styler
738+
io.formats.style.Styler
739739
"""
740740
from pandas.io.formats.style import Styler
741741
return Styler(self)
@@ -1417,7 +1417,7 @@ def to_gbq(self, destination_table, project_id=None, chunksize=None,
14171417
See Also
14181418
--------
14191419
pandas_gbq.to_gbq : This function in the pandas-gbq library.
1420-
pandas.read_gbq : Read a DataFrame from Google BigQuery.
1420+
read_gbq : Read a DataFrame from Google BigQuery.
14211421
"""
14221422
from pandas.io import gbq
14231423
return gbq.to_gbq(
@@ -1843,14 +1843,14 @@ def from_csv(cls, path, header=0, sep=',', index_col=0, parse_dates=True,
18431843
Read CSV file.
18441844
18451845
.. deprecated:: 0.21.0
1846-
Use :func:`pandas.read_csv` instead.
1846+
Use :func:`read_csv` instead.
18471847
1848-
It is preferable to use the more powerful :func:`pandas.read_csv`
1848+
It is preferable to use the more powerful :func:`read_csv`
18491849
for most general purposes, but ``from_csv`` makes for an easy
18501850
roundtrip to and from a file (the exact counterpart of
18511851
``to_csv``), especially with a DataFrame of time series data.
18521852
1853-
This method only differs from the preferred :func:`pandas.read_csv`
1853+
This method only differs from the preferred :func:`read_csv`
18541854
in some defaults:
18551855
18561856
- `index_col` is ``0`` instead of ``None`` (take first column as index
@@ -1887,7 +1887,7 @@ def from_csv(cls, path, header=0, sep=',', index_col=0, parse_dates=True,
18871887
18881888
See Also
18891889
--------
1890-
pandas.read_csv
1890+
read_csv
18911891
"""
18921892

18931893
warnings.warn("from_csv is deprecated. Please use read_csv(...) "
@@ -2504,7 +2504,7 @@ def memory_usage(self, index=True, deep=False):
25042504
numpy.ndarray.nbytes : Total bytes consumed by the elements of an
25052505
ndarray.
25062506
Series.memory_usage : Bytes consumed by a Series.
2507-
pandas.Categorical : Memory-efficient array for string values with
2507+
Categorical : Memory-efficient array for string values with
25082508
many repeated values.
25092509
DataFrame.info : Concise summary of a DataFrame.
25102510
@@ -2987,7 +2987,7 @@ def query(self, expr, inplace=False, **kwargs):
29872987
Whether the query should modify the data in place or return
29882988
a modified copy.
29892989
**kwargs
2990-
See the documentation for :func:`pandas.eval` for complete details
2990+
See the documentation for :func:`eval` for complete details
29912991
on the keyword arguments accepted by :meth:`DataFrame.query`.
29922992
29932993
.. versionadded:: 0.18.0
@@ -3011,7 +3011,7 @@ def query(self, expr, inplace=False, **kwargs):
30113011
multidimensional key (e.g., a DataFrame) then the result will be passed
30123012
to :meth:`DataFrame.__getitem__`.
30133013
3014-
This method uses the top-level :func:`pandas.eval` function to
3014+
This method uses the top-level :func:`eval` function to
30153015
evaluate the passed query.
30163016
30173017
The :meth:`~pandas.DataFrame.query` method uses a slightly
@@ -3098,7 +3098,7 @@ def eval(self, expr, inplace=False, **kwargs):
30983098
30993099
.. versionadded:: 0.18.0.
31003100
kwargs : dict
3101-
See the documentation for :func:`~pandas.eval` for complete details
3101+
See the documentation for :func:`eval` for complete details
31023102
on the keyword arguments accepted by
31033103
:meth:`~pandas.DataFrame.query`.
31043104
@@ -3113,12 +3113,12 @@ def eval(self, expr, inplace=False, **kwargs):
31133113
of a frame.
31143114
DataFrame.assign : Can evaluate an expression or function to create new
31153115
values for a column.
3116-
pandas.eval : Evaluate a Python expression as a string using various
3116+
eval : Evaluate a Python expression as a string using various
31173117
backends.
31183118
31193119
Notes
31203120
-----
3121-
For more details see the API documentation for :func:`~pandas.eval`.
3121+
For more details see the API documentation for :func:`~eval`.
31223122
For detailed examples see :ref:`enhancing performance with eval
31233123
<enhancingperf.eval>`.
31243124
@@ -3957,7 +3957,7 @@ def rename(self, *args, **kwargs):
39573957
39583958
See Also
39593959
--------
3960-
pandas.DataFrame.rename_axis
3960+
DataFrame.rename_axis
39613961
39623962
Examples
39633963
--------
@@ -6203,11 +6203,11 @@ def _gotitem(self,
62036203
--------
62046204
DataFrame.apply : Perform any type of operations.
62056205
DataFrame.transform : Perform transformation type operations.
6206-
pandas.core.groupby.GroupBy : Perform operations over groups.
6207-
pandas.core.resample.Resampler : Perform operations over resampled bins.
6208-
pandas.core.window.Rolling : Perform operations over rolling window.
6209-
pandas.core.window.Expanding : Perform operations over expanding window.
6210-
pandas.core.window.EWM : Perform operation over exponential weighted
6206+
core.groupby.GroupBy : Perform operations over groups.
6207+
core.resample.Resampler : Perform operations over resampled bins.
6208+
core.window.Rolling : Perform operations over rolling window.
6209+
core.window.Expanding : Perform operations over expanding window.
6210+
core.window.EWM : Perform operation over exponential weighted
62116211
window.
62126212
""")
62136213

@@ -6559,7 +6559,7 @@ def append(self, other, ignore_index=False,
65596559
65606560
See Also
65616561
--------
6562-
pandas.concat : General function to concatenate DataFrame, Series
6562+
concat : General function to concatenate DataFrame, Series
65636563
or Panel objects.
65646564
65656565
Notes
@@ -7069,10 +7069,10 @@ def cov(self, min_periods=None):
70697069
70707070
See Also
70717071
--------
7072-
pandas.Series.cov : Compute covariance with another Series.
7073-
pandas.core.window.EWM.cov: Exponential weighted sample covariance.
7074-
pandas.core.window.Expanding.cov : Expanding sample covariance.
7075-
pandas.core.window.Rolling.cov : Rolling sample covariance.
7072+
Series.cov : Compute covariance with another Series.
7073+
core.window.EWM.cov: Exponential weighted sample covariance.
7074+
core.window.Expanding.cov : Expanding sample covariance.
7075+
core.window.Rolling.cov : Rolling sample covariance.
70767076
70777077
Notes
70787078
-----

Diff for: pandas/core/generic.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ def rename(self, *args, **kwargs):
986986
987987
See Also
988988
--------
989-
pandas.NDFrame.rename_axis
989+
NDFrame.rename_axis
990990
991991
Examples
992992
--------
@@ -1861,8 +1861,8 @@ def empty(self):
18611861
18621862
See Also
18631863
--------
1864-
pandas.Series.dropna
1865-
pandas.DataFrame.dropna
1864+
Series.dropna
1865+
DataFrame.dropna
18661866
18671867
Notes
18681868
-----
@@ -5272,8 +5272,8 @@ def values(self):
52725272
See Also
52735273
--------
52745274
DataFrame.to_numpy : Recommended alternative to this method.
5275-
pandas.DataFrame.index : Retrieve the index labels.
5276-
pandas.DataFrame.columns : Retrieving the column names.
5275+
DataFrame.index : Retrieve the index labels.
5276+
DataFrame.columns : Retrieving the column names.
52775277
52785278
Notes
52795279
-----
@@ -5344,7 +5344,7 @@ def get_values(self):
53445344
Return an ndarray after converting sparse values to dense.
53455345
53465346
This is the same as ``.values`` for non-sparse data. For sparse
5347-
data contained in a `pandas.SparseArray`, the data are first
5347+
data contained in a `SparseArray`, the data are first
53485348
converted to a dense representation.
53495349
53505350
Returns
@@ -5355,7 +5355,7 @@ def get_values(self):
53555355
See Also
53565356
--------
53575357
values : Numpy representation of DataFrame.
5358-
pandas.SparseArray : Container for sparse data.
5358+
SparseArray : Container for sparse data.
53595359
53605360
Examples
53615361
--------
@@ -5476,7 +5476,7 @@ def dtypes(self):
54765476
54775477
See Also
54785478
--------
5479-
pandas.DataFrame.ftypes : Dtype and sparsity information.
5479+
DataFrame.ftypes : Dtype and sparsity information.
54805480
54815481
Examples
54825482
--------
@@ -5512,8 +5512,8 @@ def ftypes(self):
55125512
55135513
See Also
55145514
--------
5515-
pandas.DataFrame.dtypes: Series with just dtype information.
5516-
pandas.SparseDataFrame : Container for sparse tabular data.
5515+
DataFrame.dtypes: Series with just dtype information.
5516+
SparseDataFrame : Container for sparse tabular data.
55175517
55185518
Notes
55195519
-----

Diff for: pandas/core/groupby/groupby.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ class providing the base-class of operations.
4444
_common_see_also = """
4545
See Also
4646
--------
47-
pandas.Series.%(name)s
48-
pandas.DataFrame.%(name)s
49-
pandas.Panel.%(name)s
47+
Series.%(name)s
48+
DataFrame.%(name)s
49+
Panel.%(name)s
5050
"""
5151

5252
_apply_docs = dict(
@@ -206,8 +206,8 @@ class providing the base-class of operations.
206206
207207
See Also
208208
--------
209-
pandas.Series.pipe : Apply a function with arguments to a series.
210-
pandas.DataFrame.pipe: Apply a function with arguments to a dataframe.
209+
Series.pipe : Apply a function with arguments to a series.
210+
DataFrame.pipe: Apply a function with arguments to a dataframe.
211211
apply : Apply function to each group instead of to the
212212
full %(klass)s object.
213213
@@ -1351,7 +1351,7 @@ def resample(self, rule, *args, **kwargs):
13511351
13521352
See Also
13531353
--------
1354-
pandas.Grouper : Specify a frequency to resample with when
1354+
Grouper : Specify a frequency to resample with when
13551355
grouping by a key.
13561356
DatetimeIndex.resample : Frequency conversion and resampling of
13571357
time series.

0 commit comments

Comments
 (0)