-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
DOC: Validate that See Also section items do not contain the pandas. prefix #23145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f85e296
Give Warning on prefix pandas
thoo 6a64a62
Update error message and test validator
thoo 9358fae
Fix string prasing and test validator
thoo 4cf7e1b
PEP8 compliant fixes
thoo 785a7c0
Fix in prefix_pandas and mark.parameterize
thoo 0209430
Fix long string and remove a misplaced comma
thoo 67ed7f4
Made changes as recommended
thoo cc5dc0f
Merge remote-tracking branch 'repo_org/master' into Warning_prefix_pa…
thoo 0461c99
modify due to merge with upstream/master
thoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update error message and test validator
- Loading branch information
commit 6a64a629215cba57b25c6d38a1b82507fe67d81b
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -333,15 +333,6 @@ def method(self, foo=None, bar=None): | |
""" | ||
pass | ||
|
||
|
||
class BadSeeAlso(object): | ||
|
||
def prefix_pandas(self): | ||
""" | ||
Return prefix with `pandas` from See Also sec | ||
""" | ||
pass | ||
|
||
class BadSummaries(object): | ||
|
||
def wrong_line(self): | ||
|
@@ -553,6 +544,13 @@ def no_punctuation(self): | |
""" | ||
return "Hello world!" | ||
|
||
class BadSeeAlso(object): | ||
|
||
def prefix_pandas(self): | ||
""" | ||
Return prefix with `pandas` from See Also sec | ||
""" | ||
pass | ||
|
||
class TestValidator(object): | ||
|
||
|
@@ -616,9 +614,6 @@ def test_bad_generic_functions(self, func): | |
assert errors | ||
|
||
@pytest.mark.parametrize("klass,func,msgs", [ | ||
#SeeAlso tests | ||
('BadSeeAlso', 'prefix_pandas', | ||
('Should not start with pandas',)), | ||
# Summary tests | ||
('BadSummaries', 'wrong_line', | ||
('should start in the line immediately after the opening quotes',)), | ||
|
@@ -667,7 +662,10 @@ def test_bad_generic_functions(self, func): | |
pytest.param('BadReturns', 'no_description', ('foo',), | ||
marks=pytest.mark.xfail), | ||
pytest.param('BadReturns', 'no_punctuation', ('foo',), | ||
marks=pytest.mark.xfail) | ||
marks=pytest.mark.xfail), | ||
# SeeAlso tests | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing space between |
||
('BadSeeAlso', 'prefix_pandas', | ||
('Should not start with pandas',)), | ||
]) | ||
def test_bad_examples(self, capsys, klass, func, msgs): | ||
result = validate_one(self._import_path(klass=klass, func=func)) # noqa:F821 | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you briefly describe the test here. It'll be more useful than this sentence (see other tests for reference). Also, make sure there are no two spaces together, and that the text finishes with a period.