Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7927 from jnothman/name-case-clash
Add autosummary_filename_map config to avoid clashes
- Loading branch information
Showing
7 changed files
with
74 additions
and
1 deletion.
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
21 changes: 21 additions & 0 deletions
21
tests/roots/test-ext-autosummary-filename-map/autosummary_dummy_module.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,21 @@ | ||
from os import path # NOQA | ||
from typing import Union | ||
|
||
|
||
class Foo: | ||
class Bar: | ||
pass | ||
|
||
def __init__(self): | ||
pass | ||
|
||
def bar(self): | ||
pass | ||
|
||
@property | ||
def baz(self): | ||
pass | ||
|
||
|
||
def bar(x: Union[int, str], y: int = 1) -> None: | ||
pass |
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,11 @@ | ||
import os | ||
import sys | ||
|
||
sys.path.insert(0, os.path.abspath('.')) | ||
|
||
extensions = ['sphinx.ext.autosummary'] | ||
autosummary_generate = True | ||
autosummary_filename_map = { | ||
"autosummary_dummy_module": "module_mangled", | ||
"autosummary_dummy_module.bar": "bar" | ||
} |
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,9 @@ | ||
|
||
.. autosummary:: | ||
:toctree: generated | ||
:caption: An autosummary | ||
|
||
autosummary_dummy_module | ||
autosummary_dummy_module.Foo | ||
autosummary_dummy_module.Foo.bar | ||
autosummary_dummy_module.bar |
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