asweigart / asweigart/pyinputplus
Allow, block regex parameter name inconsistency
- Dominant language
- Python
- Stars
- 114
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
Hi @asweigart,
Thank you for the python books and this module. While trying pyinputplus.inputStr() while reading the readme.md I noticed the following inconsistency.
The readme file states:
```
whitelistRegexes (Sequence, None): A sequence of regex str that will explicitly pass validation, even if they aren't numbers. Defaults to None
blacklistRegexes (Sequence, None): A sequence of regex str or (regex_str, response_str) tuples that, if matched, will explicitly fail validation. Defaults to None.
```
The parameters() function in __init__.py
```
def parameters():
"""
Common parameters for all ``input*()`` functions in PyInputPlus:
...
* ``allowlistRegexes`` (Sequence, None): A sequence of regex str that will explicitly pass validation.
* ``blocklistRegexes`` (Sequence, None): A sequence of regex str or ``(regex_str, error_msg_str)`` tuples that, if matched, will explicitly fail validation.
...
"""
```
However, the named parameters in the actual functions are `allowRegexes` and `blockRegexes`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Compare the parameter names documented in README.md with the parameters() documentation in __init__.py and the allowRegexes/blockRegexes names used by the input*() functions. Confirm the intended public naming, then make the references consistent; done means the README, common-parameter documentation, and function signatures no longer contradict one another.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100