-
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
Intersphinx features #764
base: master
Are you sure you want to change the base?
Intersphinx features #764
Changes from all commits
009c49d
c9cafff
9f4b258
6a25195
c3692a9
323a98a
8e3244d
13a9314
4af7de8
c2b2339
8bc7c18
92c98d8
1dad5f6
a30353e
e3bcda6
3da2cd3
3f8dbd8
6971745
ef7f528
6677852
fb20cad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -436,17 +436,10 @@ def _importNames(self, modname: str, names: Iterable[ast.alias]) -> None: | |
_localNameToFullName[asname] = f'{modname}.{orgname}' | ||
|
||
def visit_Import(self, node: ast.Import) -> None: | ||
"""Process an import statement. | ||
|
||
The grammar for the statement is roughly: | ||
|
||
mod_as := DOTTEDNAME ['as' NAME] | ||
import_stmt := 'import' mod_as (',' mod_as)* | ||
""" | ||
Process an import statement. | ||
|
||
and this is translated into a node which is an instance of Import wih | ||
an attribute 'names', which is in turn a list of 2-tuples | ||
(dotted_name, as_name) where as_name is None if there was no 'as foo' | ||
part of the statement. | ||
See L{import}. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So this is an implicit external link to the following intersphinx inventory
It might not be the best idea to allow these kind of links implicitely. The epytext standard did not cover this. The wiser thing to do would probably be not to touch the epytext parser at first, or maybe only by changing some error message to suggest using restructuredtext instead (until a new inline markup for epytext is added for such kind of links) |
||
""" | ||
if not isinstance(self.builder.current, model.CanContainImportsDocumentable): | ||
# processing import statement in odd context | ||
|
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.
Should be clear that this feature is only supported for restructuredtext, google and numpy docfornat at the moment. It juste doesn’t work for epytext