8000 DOC Ensures that strip_tags passes numpydoc validation (#23248) · kernc/scikit-learn@3578a9f · GitHub
[go: up one dir, main page]

8000 Skip to content

Commit 3578a9f

Browse files
authored
DOC Ensures that strip_tags passes numpydoc validation (scikit-learn#23248)
1 parent 49a5e0c commit 3578a9f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

sklearn/feature_extraction/text.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,20 @@ def strip_accents_ascii(s):
171171

172172

173173
def strip_tags(s):
174-
"""Basic regexp based HTML / XML tag stripper function
174+
"""Basic regexp based HTML / XML tag stripper function.
175175
176176
For serious HTML/XML preprocessing you should rather use an external
177177
library such as lxml or BeautifulSoup.
178178
179179
Parameters
180180
----------
181181
s : str
182-
The string to strip
182+
The string to strip.
183+
184+
Returns
185+
-------
186+
s : str
187+
The stripped string.
183188
"""
184189
return re.compile(r"<([^>]+)>", flags=re.UNICODE).sub(" ", s)
185190

sklearn/tests/test_docstrings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"sklearn.feature_extraction.image.extract_patches_2d",
2828
"sklearn.feature_extraction.image.img_to_graph",
2929
"sklearn.feature_extraction.text.strip_accents_unicode",
30-
"sklearn.feature_extraction.text.strip_tags",
3130
"sklearn.feature_selection._univariate_selection.chi2",
3231
"sklearn.feature_selection._univariate_selection.f_oneway",
3332
"sklearn.inspection._partial_dependence.partial_dependence",

0 commit comments

Comments
 (0)
0