From eb131ead894f681c4df1854bfa28bdb8ff6c8647 Mon Sep 17 00:00:00 2001 From: Nikita Titov Date: Fri, 21 Sep 2018 23:18:48 +0300 Subject: [PATCH] [docs] run pycodestyle for docs folder (#1687) * run pytest for docs folder too * fixed pylint error and some minor style issues --- .ci/test.sh | 2 +- docs/conf.py | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.ci/test.sh b/.ci/test.sh index d0083067052..c5d9b0cea2b 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -46,7 +46,7 @@ fi if [[ $TASK == "pylint" ]]; then 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 fi diff --git a/docs/conf.py b/docs/conf.py index d3205a15b43..7481a3f7547 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,8 +15,8 @@ # 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 -# 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 os import sys @@ -34,12 +34,10 @@ from mock import Mock # Python 2.x MOCK_MODULES = ['numpy', 'scipy', 'scipy.sparse', - 'sklearn', 'matplotlib', 'pandas', 'graphviz', -] + 'sklearn', 'matplotlib', 'pandas', 'graphviz'] for mod_name in MOCK_MODULES: sys.modules[mod_name] = Mock() - # -- General configuration ------------------------------------------------ os.environ['LIGHTGBM_BUILD_DOC'] = '1' @@ -72,7 +70,7 @@ # General information about the project. project = 'LightGBM' -copyright = '%s, Microsoft Corporation' % (str(datetime.datetime.now().year)) +copyright = '%s, Microsoft Corporation' % str(datetime.datetime.now().year) author = 'Microsoft Corporation' # The version info for the project you're documenting, acts as replacement for @@ -109,13 +107,11 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -# html_theme = 'sphinx_rtd_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 # documentation. -# html_theme_options = { 'includehidden': False, } @@ -125,7 +121,6 @@ # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] - # -- Options for HTMLHelp output ------------------------------------------ # Output file base name for HTML help builder.