From 6bbcf49b749e75690ebff04be8f422cd104bc810 Mon Sep 17 00:00:00 2001 From: Anthony Lin Date: Tue, 17 Oct 2017 18:49:04 +0000 Subject: [PATCH] Fix PEP8 Issues in Shipyard This patch cleans up docs/*.py and update tox.ini's exclude target as well as specifying pep8 to scan *.py files only. Change-Id: Ic81cc81edd9da682581d9deb0a7a5404bb7aa4d9 --- docs/source/conf.py | 5 +++-- tox.ini | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index c88dae35..0c4e290a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -19,6 +19,7 @@ # import os # import sys # sys.path.insert(0, os.path.abspath('.')) +import sphinx_rtd_theme # -- General configuration ------------------------------------------------ @@ -96,7 +97,6 @@ todo_include_todos = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -import sphinx_rtd_theme html_theme = "sphinx_rtd_theme" html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] @@ -165,6 +165,7 @@ man_pages = [ texinfo_documents = [ (master_doc, 'Shipyard', u'Shipyard Documentation', author, 'Shipyard', - 'Directed acyclic graph controller for Kubernetes and OpenStack CP life-cycle management.', + 'Directed acyclic graph controller for Kubernetes' + ' and OpenStack CP life-cycle management.', 'Miscellaneous'), ] diff --git a/tox.ini b/tox.ini index 2a4bb40a..92f5e6d0 100644 --- a/tox.ini +++ b/tox.ini @@ -25,13 +25,14 @@ commands = oslo-config-generator --config-file=generator/config-generator.conf commands = oslopolicy-sample-generator --config-file=generator/policy-generator.conf [flake8] +filename = *.py # NOTE(Bryan Strassner) ignoring F841 because of the airflow example pattern # of naming variables even if they aren't used for DAGs and Operators. # Doing so adds readability and context in this case. ignore = F841 # NOTE(Bryan Strassner) excluding 3rd party and generated code that is brought into the # codebase. -exclude = *plugins/rest_api_plugin.py,*lib/python*,*egg,.git*,*.md,.tox*,alembic/env.py,build/* +exclude = .venv,.git,.tox,build,dist,*plugins/rest_api_plugin.py,*lib/python*,*egg,alembic/env.py,docs [testenv:docs] whitelist_externals=rm