-
Notifications
You must be signed in to change notification settings - Fork 290
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
html5parser documentation pass #374
Conversation
This documents the html5parser module for #307. |
Codecov Report
@@ Coverage Diff @@
## master #374 +/- ##
==========================================
- Coverage 90.76% 90.75% -0.02%
==========================================
Files 50 50
Lines 6950 6942 -8
Branches 1328 1328
==========================================
- Hits 6308 6300 -8
Misses 483 483
Partials 159 159
Continue to review full report at Codecov.
|
@gsnedders, @jgraham Can either of you review this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor things.
html5lib/html5parser.py
Outdated
@@ -219,32 +267,52 @@ def normalizedTokens(self): | |||
def parse(self, stream, *args, **kwargs): | |||
"""Parse a HTML document into a well-formed tree | |||
|
|||
stream - a filelike object or string containing the HTML to be parsed | |||
:arg stream: a filelike object or string containing the HTML to be parsed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"filelike" -> "file-like" (plus three others below)
html5lib/html5parser.py
Outdated
regardless of any BOM or later declaration (such as in a meta | ||
element). | ||
|
||
:arg scripting: treat noscript elements as if javascript was turned on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"javascript" -> "JavaScript" (plus below)
Can you squash the commit addressing review comments? |
The public API should all be documented. Anything that isn't documented with a docstring or starts with a _ isn't part of the public API. Given that, we shouldn't be autodoc'ing undocumented members. We do want to document __init__ since that's how the classes get built. So we explicitly add that to autodoc. I think this is a good base to build on. If it isn't, we can adjust things and maybe explicitly specify what should and shouldn't be documented.
^^^ That squashes the last two commits. |
@gsnedders Can you update the review for this, please? |
Thank you! |
This fixes some issues in building documentation in general and adjusts the autodoc settings to generate docs for the supported public API.
This improves the documentation of the html5parser module.
Are there other things in the html5parser module that should be part of the public API? Are there better examples to include?