File tree Expand file tree Collapse file tree 9 files changed +72
-13
lines changed Expand file tree Collapse file tree 9 files changed +72
-13
lines changed Original file line number Diff line number Diff line change @@ -327,7 +327,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
327327 RET=$(( $RET + $? )) ; echo $MSG " DONE"
328328
329329 MSG=' Validate correct capitalization among titles in documentation' ; echo $MSG
330- $BASE_DIR /scripts/validate_rst_title_capitalization.py $BASE_DIR /doc/source/development/contributing.rst
330+ $BASE_DIR /scripts/validate_rst_title_capitalization.py $BASE_DIR /doc/source/development/contributing.rst $BASE_DIR /doc/source/reference
331331 RET=$(( $RET + $? )) ; echo $MSG " DONE"
332332
333333fi
Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ consistent code format throughout the project. For details see the
1818Patterns
1919========
2020
21- foo.__class__
22- -------------
21+ Using foo.__class__
22+ -------------------
2323
2424
2525pandas uses 'type(foo)' instead 'foo.__class__' as it is making the code more
@@ -47,8 +47,8 @@ String formatting
4747Concatenated strings
4848--------------------
4949
50- f-strings
51- ~~~~~~~~~
50+ Using f-strings
51+ ~~~~~~~~~~~~~~~
5252
5353pandas uses f-strings formatting instead of '%' and '.format()' string formatters.
5454
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ and comments contain guidance for properly implementing the interface.
139139
140140.. _extending.extension.operator :
141141
142- :class: `~pandas.api.extensions.ExtensionArray ` Operator Support
142+ :class: `~pandas.api.extensions.ExtensionArray ` operator support
143143^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
144144
145145.. versionadded :: 0.24.0
Original file line number Diff line number Diff line change 66
77.. _policies.version :
88
9- Version Policy
9+ Version policy
1010~~~~~~~~~~~~~~
1111
1212.. versionchanged :: 1.0.0
@@ -48,7 +48,7 @@ deprecation removed in the next next major release (2.0.0).
4848These policies do not apply to features marked as **experimental ** in the documentation.
4949pandas may change the behavior of experimental features at any time.
5050
51- Python Support
51+ Python support
5252~~~~~~~~~~~~~~
5353
5454pandas will only drop support for specific Python versions (e.g. 3.6.x, 3.7.x) in
Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ We'd like to fund improvements and maintenance of these tools to
152152
153153.. _roadmap.evolution :
154154
155- Roadmap Evolution
155+ Roadmap evolution
156156-----------------
157157
158158pandas continues to evolve. The direction is primarily determined by community
Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ Combining / joining / merging
251251 DataFrame.merge
252252 DataFrame.update
253253
254- Time series -related
254+ Time Series -related
255255~~~~~~~~~~~~~~~~~~~
256256.. autosummary ::
257257 :toctree: api/
Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ DatetimeIndex
328328
329329 DatetimeIndex
330330
331- Time/Date components
331+ Time/date components
332332~~~~~~~~~~~~~~~~~~~~
333333.. autosummary ::
334334 :toctree: api/
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ Binary operator functions
110110 Series.product
111111 Series.dot
112112
113- Function application, groupby & window
113+ Function application, GroupBy & window
114114--------------------------------------
115115.. autosummary ::
116116 :toctree: api/
@@ -249,7 +249,7 @@ Combining / joining / merging
249249 Series.replace
250250 Series.update
251251
252- Time series -related
252+ Time Series -related
253253-------------------
254254.. autosummary ::
255255 :toctree: api/
Original file line number Diff line number Diff line change 4545 "NumFOCUS" ,
4646 "sklearn" ,
4747 "Docker" ,
48+ "PeriodIndex" ,
49+ "NA" ,
50+ "NaN" ,
51+ "ValueError" ,
52+ "BooleanArray" ,
53+ "KeyError" ,
54+ "API" ,
55+ "FAQ" ,
56+ "IO" ,
57+ "TimedeltaIndex" ,
58+ "DatetimeIndex" ,
59+ "IntervalIndex" ,
60+ "CategoricalIndex" ,
61+ "GroupBy" ,
62+ "SPSS" ,
63+ "ORC" ,
64+ "R" ,
65+ "HDF5" ,
66+ "HDFStore" ,
67+ "CDay" ,
68+ "CBMonthBegin" ,
69+ "CBMonthEnd" ,
70+ "BMonthBegin" ,
71+ "BMonthEnd" ,
72+ "BDay" ,
73+ "FY5253Quarter" ,
74+ "FY5253" ,
75+ "YearBegin" ,
76+ "YearEnd" ,
77+ "BYearBegin" ,
78+ "BYearEnd" ,
79+ "YearOffset" ,
80+ "QuarterBegin" ,
81+ "QuarterEnd" ,
82+ "BQuarterBegin" ,
83+ "BQuarterEnd" ,
84+ "QuarterOffset" ,
85+ "LastWeekOfMonth" ,
86+ "WeekOfMonth" ,
87+ "SemiMonthBegin" ,
88+ "SemiMonthEnd" ,
89+ "SemiMonthOffset" ,
90+ "CustomBusinessMonthBegin" ,
91+ "CustomBusinessMonthEnd" ,
92+ "BusinessMonthBegin" ,
93+ "BusinessMonthEnd" ,
94+ "MonthBegin" ,
95+ "MonthEnd" ,
96+ "MonthOffset" ,
97+ "CustomBusinessHour" ,
98+ "CustomBusinessDay" ,
99+ "BusinessHour" ,
100+ "BusinessDay" ,
101+ "DateOffset" ,
48102}
49103
50104CAP_EXCEPTIONS_DICT = {word .lower (): word for word in CAPITALIZATION_EXCEPTIONS }
@@ -69,6 +123,11 @@ def correct_title_capitalization(title: str) -> str:
69123 Correctly capitalized heading.
70124 """
71125
126+ # Skip modification no matter what if title begins by ":" to exclude specific
127+ # syntax that is needed to build links.
128+ if title [0 ] == ":" :
129+ return title
130+
72131 # Strip all non-word characters from the beginning of the title to the
73132 # first word character.
74133 correct_title : str = re .sub (r"^\W*" , "" , title ).capitalize ()
You can’t perform that action at this time.
0 commit comments