mirror of https://github.com/openXC7/prjxray.git
docs: Fixing lint errors.
Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
This commit is contained in:
parent
03f901d010
commit
ca42a39317
|
|
@ -47,7 +47,7 @@ templates_path = ['_templates']
|
|||
# You can specify multiple suffix as a list of string:
|
||||
source_suffix = ['.rst', '.md']
|
||||
source_parsers = {
|
||||
'.md': 'recommonmark.parser.CommonMarkParser',
|
||||
'.md': 'recommonmark.parser.CommonMarkParser',
|
||||
}
|
||||
|
||||
# The master toctree document.
|
||||
|
|
@ -182,6 +182,7 @@ texinfo_documents = [
|
|||
# Example configuration for intersphinx: refer to the Python standard library.
|
||||
intersphinx_mapping = {'https://docs.python.org/': None}
|
||||
|
||||
|
||||
def setup(app):
|
||||
MarkdownCodeSymlinks.find_links()
|
||||
app.add_config_value(
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import logging
|
|||
import os
|
||||
|
||||
from recommonmark import transform
|
||||
|
||||
"""
|
||||
Allow linking of Markdown documentation from the source code tree into the Sphinx
|
||||
documentation tree.
|
||||
|
|
@ -14,6 +13,7 @@ We also want links from two Markdown documents found in the Sphinx docs to
|
|||
work, so that is also fixed up.
|
||||
"""
|
||||
|
||||
|
||||
def path_contains(parent_path, child_path):
|
||||
"""Check a path contains another path.
|
||||
|
||||
|
|
@ -159,11 +159,12 @@ Document Root: {}
|
|||
self.config['github_code_repo'], dst_rsrc)
|
||||
else:
|
||||
url = os.path.relpath(
|
||||
os.path.join(self.docs_root_dir, self.mapping['code2docs'][dst_rsrc]),
|
||||
os.path.join(
|
||||
self.docs_root_dir, self.mapping['code2docs'][dst_rsrc]),
|
||||
start=src_dir)
|
||||
base_url, ext = os.path.splitext(url)
|
||||
assert ext in (".md", ".markdown"), (
|
||||
"Unknown extension {}""".format(ext))
|
||||
assert ext in (".md",
|
||||
".markdown"), ("Unknown extension {}".format(ext))
|
||||
url = "{}.html".format(base_url)
|
||||
|
||||
print("---")
|
||||
|
|
@ -173,9 +174,6 @@ Document Root: {}
|
|||
return url
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import doctest
|
||||
doctest.testmod()
|
||||
|
|
|
|||
Loading…
Reference in New Issue