-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix private subpackages causing orphan pages
Fixes #446
- Loading branch information
Showing
7 changed files
with
148 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fix private subpackages causing orphan pages |
13 changes: 13 additions & 0 deletions
13
tests/python/pypackageexample/package/_private_subpackage/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"""This is a docstring.""" | ||
|
||
from .submodule import function as aliased_function | ||
from .submodule import not_in_all_function | ||
|
||
__all__ = ( | ||
"aliased_function", | ||
"function", | ||
) | ||
|
||
|
||
def function(foo, bar): | ||
"""A module level function""" |
41 changes: 41 additions & 0 deletions
41
tests/python/pypackageexample/package/_private_subpackage/submodule.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
"""Example module | ||
This is a description | ||
""" | ||
|
||
DATA = 42 | ||
|
||
|
||
def function(foo, bar): | ||
"""A module level function""" | ||
|
||
|
||
def _private_function(): | ||
"""A function that shouldn't get rendered.""" | ||
|
||
|
||
def not_in_all_function(): | ||
"""A function that doesn't exist in __all__ when imported.""" | ||
|
||
|
||
class Class(object): | ||
"""This is a class.""" | ||
|
||
class_var = 42 | ||
"""Class var docstring""" | ||
|
||
class NestedClass(object): | ||
"""A nested class just to test things out""" | ||
|
||
@classmethod | ||
def a_classmethod(): | ||
"""A class method""" | ||
return True | ||
|
||
def method_okay(self, foo=None, bar=None): | ||
"""This method should parse okay""" | ||
return True | ||
|
||
|
||
class MyException(Exception): | ||
"""This is an exception.""" |
13 changes: 13 additions & 0 deletions
13
tests/python/pypackageexample/package/_private_subpackage/subpackage/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"""This is a docstring.""" | ||
|
||
from .submodule import function as aliased_function | ||
from .submodule import not_in_all_function | ||
|
||
__all__ = ( | ||
"aliased_function", | ||
"function", | ||
) | ||
|
||
|
||
def function(foo, bar): | ||
"""A module level function""" |
41 changes: 41 additions & 0 deletions
41
tests/python/pypackageexample/package/_private_subpackage/subpackage/submodule.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
"""Example module | ||
This is a description | ||
""" | ||
|
||
DATA = 42 | ||
|
||
|
||
def function(foo, bar): | ||
"""A module level function""" | ||
|
||
|
||
def _private_function(): | ||
"""A function that shouldn't get rendered.""" | ||
|
||
|
||
def not_in_all_function(): | ||
"""A function that doesn't exist in __all__ when imported.""" | ||
|
||
|
||
class Class(object): | ||
"""This is a class.""" | ||
|
||
class_var = 42 | ||
"""Class var docstring""" | ||
|
||
class NestedClass(object): | ||
"""A nested class just to test things out""" | ||
|
||
@classmethod | ||
def a_classmethod(): | ||
"""A class method""" | ||
return True | ||
|
||
def method_okay(self, foo=None, bar=None): | ||
"""This method should parse okay""" | ||
return True | ||
|
||
|
||
class MyException(Exception): | ||
"""This is an exception.""" |