Skip to content
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

WIP: point Sphinx directly at real modules #415

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

djpohly
Copy link
Contributor

@djpohly djpohly commented Jun 18, 2022

See comments in #411.

This requires "annotations" from __future__, which doesn't exist in
Python 3.6.  Might be nice to have someday though.
@ptmcg
Copy link
Member

ptmcg commented Jun 18, 2022

I'm inclined to keep the replaced_by_pep8 decorator, as it gives a good place to emit a DeprecationWarning when I do the 3.1.0 release.

@djpohly
Copy link
Contributor Author

djpohly commented Jun 18, 2022

That makes sense. What would you think about still referencing the individual modules directly for Sphinx? It would make it more straightforward to include documentation for module-level variables like alphanums, empty, common_html_entity, or ParseAction.

The alternative, if we wanted to document any variables, would be to put their documentation directly in __init__.py, separate from the actual definition. Either of the following options would keep mypy happy:

common_html_entity: ParserElement = common_html_entity
"""Convenience parser for common HTML entities"""
common_html_entity: ParserElement  # type: ignore[no-redef]
"""Convenience parser for common HTML entities"""

@ptmcg
Copy link
Member

ptmcg commented Jun 19, 2022

Looking at this, but late now - will pick up some time tomorrow.

@ptmcg
Copy link
Member

ptmcg commented Nov 5, 2022

Please don't remove the replaced_by_pep8 decorators. As I said, I'm going to use those to emit DeprecationWarnings starting in pyparsing 3.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants