Fix linting and make it play nicely with venv

This commit is contained in:
Adam Gleave 2020-07-02 18:14:54 -07:00
parent 4aa66ed34a
commit 2affbd6856
3 changed files with 6 additions and 3 deletions

1
.gitignore vendored
View file

@ -22,6 +22,7 @@ keys/
# Virtualenv
/env
/venv
*.sublime-project

View file

@ -1,4 +1,5 @@
SHELL=/bin/bash
LINT_PATHS=stable_baselines3/ tests/ docs/conf.py setup.py
pytest:
./scripts/run_tests.sh
@ -9,9 +10,9 @@ type:
lint:
# stop the build if there are Python syntax errors or undefined names
# see https://lintlyci.github.io/Flake8Rules/
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 ${LINT_PATHS} --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings.
flake8 . --count --exit-zero --statistics
flake8 ${LINT_PATHS} --count --exit-zero --statistics
doc:
cd docs && make html

View file

@ -19,7 +19,7 @@ from unittest.mock import MagicMock
# We CANNOT enable 'sphinxcontrib.spelling' because ReadTheDocs.org does not support
# PyEnchant.
try:
import sphinxcontrib.spelling
import sphinxcontrib.spelling # noqa: F401
enable_spell_check = True
except ImportError:
enable_spell_check = False
@ -129,6 +129,7 @@ html_logo = '_static/img/logo.png'
def setup(app):
app.add_stylesheet("css/baselines_theme.css")
# 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.