Skip to content

Fix validation bug when parameter type is set of options. #347

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 2 commits into from
Jan 7, 2022

Conversation

rossbar
Copy link
Contributor

@rossbar rossbar commented Jan 6, 2022

Fixes #341

The docstring validation checks the parameter type and warns when certain keywords are used instead of the preferred abbreviation (e.g. integer instead of int). However, this validation check results in false positives if one of these special keywords is specified as a member of a set of valid options, see e.g. the example in #341.

This PR fixes the false positive by skipping the keyword validation when the parameter description is a set of options.

@larsoner
Copy link
Collaborator

larsoner commented Jan 7, 2022

Seems like a reasonable solution, thanks @rossbar !

@larsoner larsoner merged commit b5b7e25 into numpy:main Jan 7, 2022
@jarrodmillman jarrodmillman added this to the 1.2.0 milestone Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to specify that parameter can equal the string 'integer'?
3 participants