Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upCan module argument be optional with `--http`? #36
Comments
KyleKing
changed the title
HTTP
Can module argument be optional with `--http`?
Feb 24, 2019
kernc
added
the
question
label
Feb 24, 2019
This comment has been minimized.
This comment has been minimized.
This was disabled intentionally and should remain thus at least for non-
I don't think it can be made optional for as long as the type is set to the checking function: Lines 93 to 109 in 24a561c There simply is no way of knowing whether the user intended a switch parameter or the next argument. That said, pdoc uses the default if simply : is passed to --http, as documented.
This was introduced in stead of a flood of separate switches for as little used a feature. At the time, I thought
More than one module can be specified. What then? It isn't that hard to click through another hyperlink. Or even just leave the tab in development open. |
This comment has been minimized.
This comment has been minimized.
|
Thanks for the feedback. I missed the shortcut on just passing |
KyleKing commentedFeb 24, 2019
In pdoc,
pdoc --httpwould create a summary of all modules in that environment.However, in pdoc3, the same command
pdoc3 --httpreturns an error that no module was specified (and no argument no http), so you launch with something likepdoc3 csv --http localhost:8000and have to navigate to http://localhost:8000/csv/Three questions:
localhost:8000if no arguments are provided to --http?(base) 05:20 [PDOC] ¿ pdoc csv --http localhost:8000 Starting pdoc server on localhost:8000 pdoc server ready at http://localhost:8000/csv/ # ^ instead of "pdoc server ready at http://localhost:8000/"