-
Notifications
You must be signed in to change notification settings - Fork 51
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
Include documented aliases in output #313
Comments
I'de like to work on this issue. This is a major thing that pydoctor does not do yet. I'm just not sure about skipping undocumented aliases tho ? |
To clarify the difference between aliases and constants, we could do the following:
|
I'm working on this issue and I have a somewhat generic question: import sys
Class A:
if sys.version_info[0] < 3:
alias = B.a
else:
alias = B.b
Class B:
a = 3
b = 4 try:
import .ssl as _ssl
except ImportError:
alias = None
else:
alias = _ssl Should the Meaning that, changing the declaration as follows would mean that it would be documented. import sys
Class A:
alias = None
if sys.version_info[0] < 3:
alias = B.a
else:
alias = B.b
Class B:
a = 3
b = 4 alias = None
try:
import .ssl as _ssl
except ImportError:
alias = None
else:
alias = _ssl Thanks for answers! PS : I'm asking because there are lots of these cases (especially for modules - but I assume it should work the same for classes) in Twisted and it looks like it's mostly used for sorting out imports that might raise an ImportError. Aliases were originally not created a |
Now that I'm thinking about it, I think we should probably create an alias entry even if the aliases are not defined at the root level of the context. But only show them if they are documented. |
From
src/twisted/words/protocols/jabber/client.py
: (irrelevant parts cut out)Currently pydoctor will handle
INVALID_USER_EVENT
andAUTH_FAILED_EVENT
as aliases, which means that it keeps track of the indirections, but doesn't include them in the output. However, as they are documented names, they should be given documentation entries.From
src/twisted/python/constants.py
:Since these names are explicitly exported via
__all__
, they should end up in the output. But currently the documentation fortwisted.python.constants
is empty.So I think aliases should sometimes be
Documentables
.The text was updated successfully, but these errors were encountered: