Skip to content

Commit da1c6de

Browse files
authored
CI: Add rst backtick checker (pandas-dev#36591)
1 parent 40d3b5f commit da1c6de

File tree

3 files changed

+47
-12
lines changed

3 files changed

+47
-12
lines changed

.pre-commit-config.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,38 @@ repos:
3030
hooks:
3131
- id: pyupgrade
3232
args: [--py37-plus]
33+
- repo: https://github.com/pre-commit/pygrep-hooks
34+
rev: v1.6.0
35+
hooks:
36+
- id: rst-backticks
37+
# these exclusions should be removed and the files fixed
38+
exclude: (?x)(
39+
text\.rst|
40+
timeseries\.rst|
41+
visualization\.rst|
42+
missing_data\.rst|
43+
options\.rst|
44+
reshaping\.rst|
45+
scale\.rst|
46+
merging\.rst|
47+
cookbook\.rst|
48+
enhancingperf\.rst|
49+
groupby\.rst|
50+
io\.rst|
51+
overview\.rst|
52+
panel\.rst|
53+
plotting\.rst|
54+
10min\.rst|
55+
basics\.rst|
56+
categorical\.rst|
57+
contributing\.rst|
58+
contributing_docstring\.rst|
59+
extending\.rst|
60+
ecosystem\.rst|
61+
comparison_with_sql\.rst|
62+
install\.rst|
63+
calculate_statistics\.rst|
64+
combine_dataframes\.rst|
65+
v0\.|
66+
v1\.0\.|
67+
v1\.1\.[012])

doc/source/whatsnew/v1.2.0.rst

+11-11
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Other enhancements
117117
- :meth:`DataFrame.applymap` now supports ``na_action`` (:issue:`23803`)
118118
- :class:`Index` with object dtype supports division and multiplication (:issue:`34160`)
119119
- :meth:`DataFrame.explode` and :meth:`Series.explode` now support exploding of sets (:issue:`35614`)
120-
- `Styler` now allows direct CSS class name addition to individual data cells (:issue:`36159`)
120+
- ``Styler`` now allows direct CSS class name addition to individual data cells (:issue:`36159`)
121121
- :meth:`Rolling.mean()` and :meth:`Rolling.sum()` use Kahan summation to calculate the mean to avoid numerical problems (:issue:`10319`, :issue:`11645`, :issue:`13254`, :issue:`32761`, :issue:`36031`)
122122
- :meth:`DatetimeIndex.searchsorted`, :meth:`TimedeltaIndex.searchsorted`, :meth:`PeriodIndex.searchsorted`, and :meth:`Series.searchsorted` with datetimelike dtypes will now try to cast string arguments (listlike and scalar) to the matching datetimelike type (:issue:`36346`)
123123

@@ -223,12 +223,12 @@ Deprecations
223223
Performance improvements
224224
~~~~~~~~~~~~~~~~~~~~~~~~
225225

226-
- Performance improvements when creating DataFrame or Series with dtype `str` or :class:`StringDtype` from array with many string elements (:issue:`36304`, :issue:`36317`, :issue:`36325`, :issue:`36432`)
226+
- Performance improvements when creating DataFrame or Series with dtype ``str`` or :class:`StringDtype` from array with many string elements (:issue:`36304`, :issue:`36317`, :issue:`36325`, :issue:`36432`)
227227
- Performance improvement in :meth:`GroupBy.agg` with the ``numba`` engine (:issue:`35759`)
228228
- Performance improvements when creating :meth:`pd.Series.map` from a huge dictionary (:issue:`34717`)
229229
- Performance improvement in :meth:`GroupBy.transform` with the ``numba`` engine (:issue:`36240`)
230230
- ``Styler`` uuid method altered to compress data transmission over web whilst maintaining reasonably low table collision probability (:issue:`36345`)
231-
- Performance improvement in :meth:`pd.to_datetime` with non-`ns` time unit for `float` `dtype` columns (:issue:`20445`)
231+
- Performance improvement in :meth:`pd.to_datetime` with non-ns time unit for ``float`` ``dtype`` columns (:issue:`20445`)
232232

233233
.. ---------------------------------------------------------------------------
234234
@@ -263,7 +263,7 @@ Timedelta
263263
Timezones
264264
^^^^^^^^^
265265

266-
- Bug in :func:`date_range` was raising AmbiguousTimeError for valid input with `ambiguous=False` (:issue:`35297`)
266+
- Bug in :func:`date_range` was raising AmbiguousTimeError for valid input with ``ambiguous=False`` (:issue:`35297`)
267267
-
268268

269269

@@ -305,29 +305,29 @@ Indexing
305305
Missing
306306
^^^^^^^
307307

308-
- Bug in :meth:`SeriesGroupBy.transform` now correctly handles missing values for `dropna=False` (:issue:`35014`)
308+
- Bug in :meth:`SeriesGroupBy.transform` now correctly handles missing values for ``dropna=False`` (:issue:`35014`)
309309
-
310310

311311
MultiIndex
312312
^^^^^^^^^^
313313

314-
- Bug in :meth:`DataFrame.xs` when used with :class:`IndexSlice` raises ``TypeError`` with message `Expected label or tuple of labels` (:issue:`35301`)
314+
- Bug in :meth:`DataFrame.xs` when used with :class:`IndexSlice` raises ``TypeError`` with message ``"Expected label or tuple of labels"`` (:issue:`35301`)
315315
-
316316

317317
I/O
318318
^^^
319319

320320
- :func:`read_sas` no longer leaks resources on failure (:issue:`35566`)
321321
- Bug in :meth:`to_csv` caused a ``ValueError`` when it was called with a filename in combination with ``mode`` containing a ``b`` (:issue:`35058`)
322-
- In :meth:`read_csv` `float_precision='round_trip'` now handles `decimal` and `thousands` parameters (:issue:`35365`)
322+
- In :meth:`read_csv` ``float_precision='round_trip'`` now handles ``decimal`` and ``thousands`` parameters (:issue:`35365`)
323323
- :meth:`to_pickle` and :meth:`read_pickle` were closing user-provided file objects (:issue:`35679`)
324-
- :meth:`to_csv` passes compression arguments for `'gzip'` always to `gzip.GzipFile` (:issue:`28103`)
324+
- :meth:`to_csv` passes compression arguments for ``'gzip'`` always to ``gzip.GzipFile`` (:issue:`28103`)
325325
- :meth:`to_csv` did not support zip compression for binary file object not having a filename (:issue:`35058`)
326-
- :meth:`to_csv` and :meth:`read_csv` did not honor `compression` and `encoding` for path-like objects that are internally converted to file-like objects (:issue:`35677`, :issue:`26124`, and :issue:`32392`)
326+
- :meth:`to_csv` and :meth:`read_csv` did not honor ``compression`` and ``encoding`` for path-like objects that are internally converted to file-like objects (:issue:`35677`, :issue:`26124`, and :issue:`32392`)
327327
- :meth:`to_picke` and :meth:`read_pickle` did not support compression for file-objects (:issue:`26237`, :issue:`29054`, and :issue:`29570`)
328328
- Bug in :func:`LongTableBuilder.middle_separator` was duplicating LaTeX longtable entires in the List of Tables of a LaTeX document (:issue:`34360`)
329-
- Bug in :meth:`read_csv` with `engine='python'` truncating data if multiple items present in first row and first element started with BOM (:issue:`36343`)
330-
- Removed ``private_key`` and ``verbose`` from :func:`read_gbq` as they are no longer supported in `pandas-gbq` (:issue:`34654` :issue:`30200`)
329+
- Bug in :meth:`read_csv` with ``engine='python'`` truncating data if multiple items present in first row and first element started with BOM (:issue:`36343`)
330+
- Removed ``private_key`` and ``verbose`` from :func:`read_gbq` as they are no longer supported in ``pandas-gbq`` (:issue:`34654`, :issue:`30200`)
331331

332332
Plotting
333333
^^^^^^^^

doc/sphinxext/README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pandas documentation. These copies originate from other projects:
77
- ``numpydoc`` - Numpy's Sphinx extensions: this can be found at its own
88
repository: https://github.com/numpy/numpydoc
99
- ``ipython_directive`` and ``ipython_console_highlighting`` in the folder
10-
`ipython_sphinxext` - Sphinx extensions from IPython: these are included
10+
``ipython_sphinxext`` - Sphinx extensions from IPython: these are included
1111
in IPython: https://github.com/ipython/ipython/tree/master/IPython/sphinxext
1212

1313
.. note::

0 commit comments

Comments
 (0)