mirror of
https://github.com/RGBCube/GitHubWrapper
synced 2025-07-04 21:37:36 +00:00
Cleaned up docs/
- Linted - Changed Github-Api-Wrapper to GitHub-API-Wrapper
This commit is contained in:
parent
a33985c69b
commit
f6b9852167
10 changed files with 219 additions and 174 deletions
|
@ -15,7 +15,13 @@ from sphinx.util.typing import RoleFunction
|
|||
|
||||
def make_link_role(resource_links: Dict[str, str]) -> RoleFunction:
|
||||
def role(
|
||||
typ: str, rawtext: str, text: str, lineno: int, inliner: Inliner, options: Dict = {}, content: List[str] = []
|
||||
typ: str,
|
||||
rawtext: str,
|
||||
text: str,
|
||||
lineno: int,
|
||||
inliner: Inliner,
|
||||
options: Dict = {},
|
||||
content: List[str] = [],
|
||||
) -> Tuple[List[Node], List[system_message]]:
|
||||
|
||||
text = utils.unescape(text)
|
||||
|
@ -30,10 +36,10 @@ def make_link_role(resource_links: Dict[str, str]) -> RoleFunction:
|
|||
|
||||
|
||||
def add_link_role(app: Sphinx) -> None:
|
||||
app.add_role('resource', make_link_role(app.config.resource_links))
|
||||
app.add_role("resource", make_link_role(app.config.resource_links))
|
||||
|
||||
|
||||
def setup(app: Sphinx) -> Dict[str, Any]:
|
||||
app.add_config_value('resource_links', {}, 'env')
|
||||
app.connect('builder-inited', add_link_role)
|
||||
return {'version': sphinx.__display_version__, 'parallel_read_safe': True}
|
||||
app.add_config_value("resource_links", {}, "env")
|
||||
app.connect("builder-inited", add_link_role)
|
||||
return {"version": sphinx.__display_version__, "parallel_read_safe": True}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue