-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Added test case for importing a class from a private submodule into a public one #190
Changes from all commits
1775419
baa2716
c7e52e1
23d4849
7673171
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Importing a class from a private submodule to a public submodule | ||
at the same level of hierarchy in the module. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.. automodapi:: sphinx_automodapi.tests.example_module.public |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Camelot | ||
======= | ||
|
||
.. currentmodule:: sphinx_automodapi.tests.example_module.public | ||
|
||
.. autoclass:: Camelot | ||
:show-inheritance: | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Spam | ||
==== | ||
|
||
.. currentmodule:: sphinx_automodapi.tests.example_module.public | ||
|
||
.. autoclass:: Spam | ||
:show-inheritance: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
sphinx_automodapi.tests.example_module.public Module | ||
---------------------------------------------------- | ||
|
||
.. automodule:: sphinx_automodapi.tests.example_module.public | ||
|
||
Classes | ||
^^^^^^^ | ||
|
||
.. automodsumm:: sphinx_automodapi.tests.example_module.public | ||
:classes-only: | ||
:toctree: api | ||
|
||
Class Inheritance Diagram | ||
^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
.. automod-diagram:: sphinx_automodapi.tests.example_module.public | ||
:private-bases: | ||
:parts: 1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.. currentmodule:: sphinx_automodapi.tests.example_module.public | ||
|
||
.. autosummary:: | ||
:toctree: api | ||
|
||
Camelot | ||
Spam |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class Camelot: | ||
""" | ||
It's a silly place anyway | ||
""" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from ._private import Camelot | ||
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. Can we have a test where we import from a non-private module? I mean those cases worked (before this PR), so I just want to make sure that keeps being the case. 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. Sounds good, will adjust the test |
||
from .classes import Spam | ||
|
||
__all__ = [ | ||
'Camelot', | ||
'Spam' | ||
] |
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.
@nstarman we actually generate the stub files ourselves and they contain individual eg autoclass calls so the fix has to be and is in our code.
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.
Then all LGTM. The results files seem reasonable :)