-
-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
DOC: Improve GL03 message re: blank lines at end of docstrings. #23649
DOC: Improve GL03 message re: blank lines at end of docstrings. #23649
Conversation
Hello @douglatornell! Thanks for submitting the PR.
|
Did you run the tests Also, if you feel like it, may be you can add a test for the blank line at the end, to make sure we're giving that error. And if we don't have one with the two blank lines, you can add it too. But happy to merge this PR as it is too, if no test is failing. |
Codecov Report
@@ Coverage Diff @@
## master #23649 +/- ##
==========================================
+ Coverage 92.23% 92.28% +0.05%
==========================================
Files 161 161
Lines 51408 51451 +43
==========================================
+ Hits 47416 47484 +68
+ Misses 3992 3967 -25
Continue to review full report at Codecov.
|
Thanks for the review! Yes, I ran the tests locally to make sure that I hadn't broken anything, and they passed with the exception of 4(?) that are marked as expected failures. I will take a look tomorrow at the possibility of adding test(s) and get update this PR one way or the other. |
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.
lgtm, I'd merge and add tests for this in a separate PR
Sorry @datapythonista, I didn't see your message about adding the tests in a new branch/PR before I pushed them into this one. How do you want me to proceed from here? |
Don't worry, the changes are also all right here, doesn't make a difference, as this is not yet merged. I think your tests are saying that does docstrings are correct (which is not the case). But I don't see them failing in the CI. I'm in my phone and can't check well right now, but I think the tests should say that the error messages are generated. |
I added 2 methods to the It's all kind of inverted, but it is in the style of the test module, and resulted in a smaller diff than if I had added a new docstring collection class and new test method (which is what I started to do, but stopped as I gained understanding of the test module). |
Sorry, my bad. From the phone I couldn't check well, and I thought they were checked with the Ideally I'd test them with |
Okay, I'll take a look at putting them in |
@douglatornell do you have time to make the update to the tests? |
@datapythonista yes. I have a flight later today and am hoping to do them then. |
@datapythonista bad linebreak tests moved into |
Thanks for the update @douglatornell. I'll ask one more change here if you don't mind. There is something wrong in the tests (not your code, but in master) that is the name So, if I can ask you to move back the two new examples of line breaks to Thanks! CC @WillAyd |
This reverts commit e727568.
Sorry @douglatornell, I think I wasn't clear in my last comment. Moving the methods with the docstrings back to But the code to call the tests (in the parametrization of Does this make sense? |
@datapythonista I have reverted the commit that put the new extra linebreak tests into I was going to change the name of I don't know the history of the |
The I don't think the tests need a major refactoring. May be merging the two tests you mention can make sense (I didn't check in detail), but other than that I think we should be all right. I'd rename What do you think? |
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.
Thanks for the update @douglatornell, looks perfect now.
thanks @douglatornell |
…fixed * upstream/master: DOC: more consistent flake8-commands in contributing.rst (pandas-dev#23724) DOC: Fixed the doctsring for _set_axis_name (GH 22895) (pandas-dev#22969) DOC: Improve GL03 message re: blank lines at end of docstrings. (pandas-dev#23649) TST: add tests for keeping dtype in Series.update (pandas-dev#23604) TST: For GH4861, Period and datetime in multiindex (pandas-dev#23776) TST: move .str-test to strings.py & parametrize it; precursor to pandas-dev#23582 (pandas-dev#23777) STY: isort tests/scalar, tests/tslibs, import libwindow instead of _window (pandas-dev#23787) BUG: fixed .str.contains(..., na=False) for categorical series (pandas-dev#22170) BUG: Maintain column order with groupby.nth (pandas-dev#22811) API/DEPR: replace kwarg "pat" with "sep" in str.[r]partition (pandas-dev#23767) CLN: Finish isort core (pandas-dev#23765) TST: Mark test_pct_max_many_rows with pytest.mark.single (pandas-dev#23799)
re: conversation with @datapythonista in issue #23632
git diff upstream/master -u -- "*.py" | flake8 --diff