Unable to get argument checking to work?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 146
- PR merge metrics
- No merged PRs in 30d
Description
Pdoc3's homepage indicates the argument checking works.
I took this function:
def mdy_to_ymd_str(mdy):
"""
Convert from mm/dd/yyyy datetime date string to a yyyy-mm-dd string.
Args:
mdy: The DateTime date string (%m-%d-%Y)
Returns:
datetime string in yyyy-mm-dd format
>>> import datetime
>>> test = datetime.datetime(2018,1,1).strftime("%m-%d-%Y")
>>> mdy_to_ymd_str(test)
'2018-01-01'
"""
return datetime.datetime.strptime(mdy, "%m-%d-%Y").strftime("%Y-%m-%d")
and changed the definition to:
def mdy_to_ymd_str(mdy22):
And I did not receive any errors or warnings on the console when I ran pdoc3?
Am I misunderstanding how this should work?
Expected Behavior
mdy22 should be shown to be in conflict with the arguments declared for the function.
Actual Behavior
No warning, error, or other prompting indicating an conflict existed. pdoc3 build the HTML and seems to have just accepted the change without issue.
Steps to Reproduce
- Alter the definition of a function, ensuring it's conflicting with the args declaration
- run pdoc3
- Profit? By changing all the definition headers, and selling our services to restore said applications to functionality.
Additional info
- pdoc version:
pdoc3.exe 0.6.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior with the mdy_to_ymd_str function and its Args docstring using the pdoc3 command-line entry point. Compare the homepage's argument-checking description with pdoc version 0.6.3; done means a conflicting parameter name is reported or the documented behavior is clarified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100