"include/vscode:/vscode.git/clone" did not exist on "a5fd974724f4f221c000fe819dd81cbf87e0c77b"
Unverified Commit eb131ead authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[docs] run pycodestyle for docs folder (#1687)

* run pytest for docs folder too

* fixed pylint error and some minor style issues
parent 44ed4270
...@@ -46,7 +46,7 @@ fi ...@@ -46,7 +46,7 @@ fi
if [[ $TASK == "pylint" ]]; then if [[ $TASK == "pylint" ]]; then
conda install -y -n $CONDA_ENV pycodestyle conda install -y -n $CONDA_ENV pycodestyle
pycodestyle --ignore=E501,W503 --exclude=./compute,./docs,./.nuget . || exit -1 pycodestyle --ignore=E501,W503 --exclude=./compute,./.nuget . || exit -1
exit 0 exit 0
fi fi
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
# If extensions (or modules to document with autodoc) are in another directory, # If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the # add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here. # documentation root, use os.path.abspath to make it absolute.
#
import datetime import datetime
import os import os
import sys import sys
...@@ -34,12 +34,10 @@ except ImportError: ...@@ -34,12 +34,10 @@ except ImportError:
from mock import Mock # Python 2.x from mock import Mock # Python 2.x
MOCK_MODULES = ['numpy', 'scipy', 'scipy.sparse', MOCK_MODULES = ['numpy', 'scipy', 'scipy.sparse',
'sklearn', 'matplotlib', 'pandas', 'graphviz', 'sklearn', 'matplotlib', 'pandas', 'graphviz']
]
for mod_name in MOCK_MODULES: for mod_name in MOCK_MODULES:
sys.modules[mod_name] = Mock() sys.modules[mod_name] = Mock()
# -- General configuration ------------------------------------------------ # -- General configuration ------------------------------------------------
os.environ['LIGHTGBM_BUILD_DOC'] = '1' os.environ['LIGHTGBM_BUILD_DOC'] = '1'
...@@ -72,7 +70,7 @@ master_doc = 'index' ...@@ -72,7 +70,7 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = 'LightGBM' project = 'LightGBM'
copyright = '%s, Microsoft Corporation' % (str(datetime.datetime.now().year)) copyright = '%s, Microsoft Corporation' % str(datetime.datetime.now().year)
author = 'Microsoft Corporation' author = 'Microsoft Corporation'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
...@@ -109,13 +107,11 @@ autoclass_content = 'both' ...@@ -109,13 +107,11 @@ autoclass_content = 'both'
# The theme to use for HTML and HTML Help pages. See the documentation for # The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes. # a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme' html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme # Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the # further. For a list of options available for each theme, see the
# documentation. # documentation.
#
html_theme_options = { html_theme_options = {
'includehidden': False, 'includehidden': False,
} }
...@@ -125,7 +121,6 @@ html_theme_options = { ...@@ -125,7 +121,6 @@ html_theme_options = {
# so a file named "default.css" will overwrite the builtin "default.css". # so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static'] html_static_path = ['_static']
# -- Options for HTMLHelp output ------------------------------------------ # -- Options for HTMLHelp output ------------------------------------------
# Output file base name for HTML help builder. # Output file base name for HTML help builder.
......
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