Unverified Commit 6d81ab8b authored by Rahul Amaram's avatar Rahul Amaram Committed by GitHub
Browse files

Fix Lint doc config (#1385)

parent 16de2b5b
......@@ -29,7 +29,7 @@ set +e
exit_status=0
printf "\x1b[34mRunning flake8:\x1b[0m\n"
flake8 torchaudio test build_tools/setup_helpers
flake8 torchaudio test build_tools/setup_helpers docs/source/conf.py
status=$?
exit_status="$((exit_status+status))"
if [ "${status}" -ne 0 ]; then
......
......@@ -20,8 +20,6 @@
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import torch
import torchaudio
import pytorch_sphinx_theme
# -- General configuration ------------------------------------------------
......@@ -135,6 +133,7 @@ html_logo = '_static/img/pytorch-logo-dark.svg'
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
def setup(app):
# NOTE: in Sphinx 1.8+ `html_css_files` is an official configuration value
# and can be moved outside of this function (and the setup(app) function
......@@ -145,7 +144,7 @@ def setup(app):
# In Sphinx 1.8 it was renamed to `add_css_file`, 1.7 and prior it is
# `add_stylesheet` (deprecated in 1.8).
add_css = getattr(app, 'add_css_file', getattr(app, 'add_stylesheet'))
add_css = getattr(app, 'add_css_file', app.add_stylesheet)
for css_file in html_css_files:
add_css(css_file)
......@@ -226,7 +225,7 @@ def patched_make_field(self, types, domain, items, **kw):
# `kw` catches `env=None` needed for newer sphinx while maintaining
# backwards compatibility when passed along further down!
# type: (List, unicode, Tuple) -> nodes.field
# type: (list, str, tuple) -> nodes.field
def handle_item(fieldarg, content):
par = nodes.paragraph()
par += addnodes.literal_strong('', fieldarg) # Patch: this line added
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment