Skip to content

Commit

Permalink
DOC: fix incorrect sphinx directives
Browse files Browse the repository at this point in the history
  • Loading branch information
Scorpil committed Nov 22, 2017
1 parent e037677 commit c08c962
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions ci/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,18 @@ if [ "$LINT" ]; then
echo "Check for use of lists instead of generators in built-in Python functions DONE"

echo "Check for incorrect sphinx directives"
SPHINX_DIRECTIVES=$(echo \
"autosummary|contents|currentmodule|deprecated|function|image|"\
"important|include|ipython|literalinclude|math|module|note|raw|"\
"seealso|toctree|versionadded|versionchanged|warning" | tr -d "[:space:]")
SPHINX_DIRECTIVES=$(echo \
"autosummary|contents|currentmodule|deprecated|function|image|"\
"important|include|ipython|literalinclude|math|module|note|raw|"\
"seealso|toctree|versionadded|versionchanged|warning" | tr -d "[:space:]")
for path in './pandas' './doc/source'
do
grep -R --include="*.py" --include="*.rst" -E "\.\. ($SPHINX_DIRECTIVES):[^:]" $path
if [ $? -ne "0" ]; then
RET=1
fi
done
echo "Check for incorrect sphinx directives DONE"
echo "Check for incorrect sphinx directives DONE"
else
echo "NOT Linting"
fi
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -4513,7 +4513,7 @@ def unstack(self, level=-1, fill_value=None):
fill_value : replace NaN with this value if the unstack produces
missing values
.. versionadded: 0.18.0
.. versionadded:: 0.18.0
See also
--------
Expand Down Expand Up @@ -4676,7 +4676,7 @@ def diff(self, periods=1, axis=0):
axis : {0 or 'index', 1 or 'columns'}, default 0
Take difference over rows (0) or columns (1).
.. versionadded: 0.16.1
.. versionadded:: 0.16.1
Returns
-------
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -1626,7 +1626,7 @@ def append(self, to_append, ignore_index=False, verify_integrity=False):
ignore_index : boolean, default False
If True, do not use the index labels.
.. versionadded: 0.19.0
.. versionadded:: 0.19.0
verify_integrity : boolean, default False
If True, raise Exception on creating index with duplicates
Expand Down Expand Up @@ -2213,7 +2213,7 @@ def unstack(self, level=-1, fill_value=None):
fill_value : replace NaN with this value if the unstack produces
missing values
.. versionadded: 0.18.0
.. versionadded:: 0.18.0
Examples
--------
Expand Down
8 changes: 4 additions & 4 deletions pandas/core/tools/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def to_datetime(arg, errors='raise', dayfirst=False, yearfirst=False,
----------
arg : integer, float, string, datetime, list, tuple, 1-d array, Series
.. versionadded: 0.18.1
.. versionadded:: 0.18.1
or DataFrame/dict-like
Expand All @@ -140,7 +140,7 @@ def to_datetime(arg, errors='raise', dayfirst=False, yearfirst=False,
Warning: yearfirst=True is not strict, but will prefer to parse
with year first (this is a known bug, based on dateutil beahavior).
.. versionadded: 0.16.1
.. versionadded:: 0.16.1
utc : boolean, default None
Return UTC DatetimeIndex if True (converting any tz-aware
Expand Down Expand Up @@ -178,13 +178,13 @@ def to_datetime(arg, errors='raise', dayfirst=False, yearfirst=False,
- If Timestamp convertible, origin is set to Timestamp identified by
origin.
.. versionadded: 0.20.0
.. versionadded:: 0.20.0
cache : boolean, default False
If True, use a cache of unique, converted dates to apply the datetime
conversion. May produce sigificant speed-up when parsing duplicate date
strings, especially ones with timezone offsets.
.. versionadded: 0.22.0
.. versionadded:: 0.22.0
Returns
-------
Expand Down
4 changes: 2 additions & 2 deletions pandas/tseries/offsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ class BusinessHour(BusinessHourMixin, SingleConstructorOffset):
"""
DateOffset subclass representing possibly n business days
.. versionadded: 0.16.1
.. versionadded:: 0.16.1
"""
_prefix = 'BH'
Expand Down Expand Up @@ -878,7 +878,7 @@ class CustomBusinessHour(BusinessHourMixin, SingleConstructorOffset):
"""
DateOffset subclass representing possibly n custom business days
.. versionadded: 0.18.1
.. versionadded:: 0.18.1
"""
_prefix = 'CBH'
Expand Down

0 comments on commit c08c962

Please sign in to comment.