-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
TST: Allow for multiple variables on the same line in docstring validation #28811
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
TST: Allow for multiple variables on the same line in docstring validation #28811
Conversation
Allow for multiple variables to share the same type and description in documentation. For example, `i, j, k : int` Would be three variables, i, j, and k, which are all ints.
This was generating errors because it got fixed in master after I made the branch. I'm sure this will be a merge conflict, and I can work it out there first.
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 add test(s) for this change? There is a test directory next to the validation script you can put those in
Added a test for if the spacing is off on a multivariable oneline parameter descriptoin
I put in a test for if spacing is off. Other than that, it's a little hard to test because I can't have a test with more than one wrong parameter. The validation script uses sets, so the order can change between runs. |
Can you not put a test in |
Oh, yeah. I'll do that real quick. Sorry, didn't cross my mind. |
Adds a test for if multiple variables are typed and described on the same line in a docstring.
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.
minor comment otherwise lgtm @datapythonista if you have any thouhts
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.
nice PR, just couple of typos, but this is very useful
Removed the functionality of tests, since it isn't important for documentation. Fixed a couple of small typos.
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.
OK by me - merge whenever happy @datapythonista
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.
Looks good to me as well, thanks a lot for the contribution!
Thanks @Nabel0721 ! |
Allow for multiple variables to share the same type and description in documentation. For example,
i, j, k : int
Would be three variables, i, j, and k, which are all ints.black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff