File tree 3 files changed +11
-6
lines changed
3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,15 @@ repos:
53
53
types : [rst]
54
54
args : [--filename=*.rst]
55
55
additional_dependencies : [flake8-rst==0.7.0, flake8==3.7.9]
56
+ - id : incorrect-sphinx-directives
57
+ name : Check for incorrect Sphinx directives
58
+ language : pygrep
59
+ entry : >-
60
+ \.\. (autosummary|contents|currentmodule|deprecated
61
+ |function|image|important|include|ipython|literalinclude
62
+ |math|module|note|raw|seealso|toctree|versionadded
63
+ |versionchanged|warning):[^:]
64
+ files : \.(py|pyx|rst)$
56
65
- repo : https://github.com/asottile/yesqa
57
66
rev : v1.2.2
58
67
hooks :
61
70
rev : v3.2.0
62
71
hooks :
63
72
- id : end-of-file-fixer
64
- exclude : ' .html$| ^LICENSES/|. csv$|. txt$|. svg$|.py$ '
73
+ exclude : ^LICENSES/|\.(html| csv| txt| svg|py)$
Original file line number Diff line number Diff line change @@ -202,10 +202,6 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
202
202
invgrep -R --include=" *.rst" -E " [a-zA-Z0-9]\`\` ?[a-zA-Z0-9]" doc/source/
203
203
RET=$(( $RET + $? )) ; echo $MSG " DONE"
204
204
205
- MSG=' Check for incorrect sphinx directives' ; echo $MSG
206
- invgrep -R --include=" *.py" --include=" *.pyx" --include=" *.rst" -E " \.\. (autosummary|contents|currentmodule|deprecated|function|image|important|include|ipython|literalinclude|math|module|note|raw|seealso|toctree|versionadded|versionchanged|warning):[^:]" ./pandas ./doc/source
207
- RET=$(( $RET + $? )) ; echo $MSG " DONE"
208
-
209
205
# Check for the following code in testing: `unittest.mock`, `mock.Mock()` or `mock.patch`
210
206
MSG=' Check that unittest.mock is not used (pytest builtin monkeypatch fixture should be used instead)' ; echo $MSG
211
207
invgrep -r -E --include ' *.py' ' (unittest(\.| import )mock|mock\.Mock\(\)|mock\.patch)' pandas/tests/
Original file line number Diff line number Diff line change @@ -5343,7 +5343,7 @@ def __finalize__(
5343
5343
A passed method name providing context on where ``__finalize__``
5344
5344
was called.
5345
5345
5346
- .. warning:
5346
+ .. warning::
5347
5347
5348
5348
The value passed as `method` are not currently considered
5349
5349
stable across pandas releases.
You can’t perform that action at this time.
0 commit comments