-
-
Notifications
You must be signed in to change notification settings - Fork 167
Correctly validate parameters under the "Other Parameters" section #337
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
Conversation
So |
I'm not sure what it means either but I don't think it should be repeated. Your fix of adding |
All right, I had to make the "PR03" test a bit more complicated, as otherwise that example still failed. The new test makes sure the order of the parameters within each section is consistent with the order in the signature (whereas previously it was using a concatenation of the parameters in each section). |
I wonder if this part was intentional, in that in theory the infrequently used parameters should come at the end of the args/kwargs list in the signature... |
Actually before this PR they were not considered at all (completely neglected), then my initial changes concatenated them. However this leads to an error for the following signature (taken from the An alternative fix would have been to keep the concatenation and move the |
Reverted some of the previous changes, so now once again the signature order has to exactly match the concatenation of the Parameters order and the Other Parameters order. |
Thanks @dcbr |
The "PR01" error is falsely raised when validating doc strings with parameter definitions under the "Other Parameters" section (e.g. for infrequently used parameters). This PR makes sure such parameters are correctly recognized by the validation script (and an extra test is added that previously failed but is now properly supported).