When writing my first extension, I found it hard to figure out these functions.
I figured documenting their inputs/outputs would help future authors who
are new to the codebase.
Details
- Reviewers
lothiraldan durin42 - Group Reviewers
hg-reviewers - Commits
- rHGb22a0d9e0a83: docs: add args/returns docs for some cmdutil, context, and registrar functions
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
Looking good, just need a bunch of fixes. Also, did you tried generating the documentation, I'm not sure how 'parameters' would render in the documentation.
mercurial/context.py | ||
---|---|---|
637 | I think there is a mistake here, immediate changesets of the current changeset. | |
638 | s/decendents/descendants | |
mercurial/registrar.py | ||
131–132 | Should optionalrepo also be highlighted? `optionalrepo` | |
135–136 | Should inferrepo also be highlighted? `inferrepo` |
I see you used the word string at few places, do you mean the Python string? If yes, that won't be true on Python 3 as most of the things are bytes.
Ah good to know. I don't have much non-ascii stuff, so didn't notice. Ascii only unicode strings work OK -- if thats intentional/desired/supported, it should probably be doc'd as something like "bytes or ascii-encodable string" so callers don't think they have to use b'foo' or 'foo'.encode() everywhere. I've changed it to "bytes" for now -- let me know if you want "bytes or ascii-encodable string" (or equiv).
I ran make doc, but didn't see it output generated docs based on the code itself. Is there a command I missed? I was just assuming the format is RST for the doc strings, since that seems to be the popular format these days.
I think there is a mistake here, immediate changesets of the current changeset.