diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 682624714..9cee0c8d2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,7 +34,8 @@ jobs: mypy --install-types --non-interactive puppetboard/ test/ - name: Test run: | - pytest --cov=. --cov-report=xml --flake8 --strict-markers --mypy -v puppetboard test + pytest --cov=. --cov-report=xml --strict-markers --mypy -v puppetboard test + flake8 -v . - name: Upload coverage to Codecov uses: codecov/codecov-action@v2 with: diff --git a/.gitignore b/.gitignore index 183860487..4b08c6343 100644 --- a/.gitignore +++ b/.gitignore @@ -32,7 +32,6 @@ coverage.xml .tox .mypy_cache .pytest_cache -nosetests.xml # Translations *.mo diff --git a/README.md b/README.md index d1947f7c0..bed493d25 100644 --- a/README.md +++ b/README.md @@ -242,7 +242,8 @@ You're advised to do this inside a virtualenv specifically created to work on Pu You can run the tests with: ```bash -pytest --cov=. --cov-report=xml --flake8 --strict-markers --mypy puppetboard test +pytest --cov=. --cov-report=xml --strict-markers --mypy puppetboard test +flake8 -v . ``` You can run the app it in development mode by simply executing: diff --git a/puppetboard/views/index.py b/puppetboard/views/index.py index 7cf66f5be..98d685a30 100644 --- a/puppetboard/views/index.py +++ b/puppetboard/views/index.py @@ -24,7 +24,7 @@ def index(env): 'avg_resources_node': 0, } - if(env != app.config['DEFAULT_ENVIRONMENT']): + if env != app.config['DEFAULT_ENVIRONMENT']: check_env(env, envs) if env == '*': diff --git a/puppetboard/views/query.py b/puppetboard/views/query.py index 67ba5f396..b97f4f77d 100644 --- a/puppetboard/views/query.py +++ b/puppetboard/views/query.py @@ -32,7 +32,7 @@ def query(env): abort(403) envs = environments() - if(env != app.config['DEFAULT_ENVIRONMENT']): + if env != app.config['DEFAULT_ENVIRONMENT']: check_env(env, envs) form = QueryForm(meta={ diff --git a/setup.cfg b/setup.cfg index ae50eb148..e350ed19d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,11 +1,6 @@ [bdist_wheel] universal = 1 -[bdist_rpm] -build_requires = python-setuptools -requires = python-flask - python-flask-wtf - python-pypuppetdb [flake8] max-line-length=100 exclude=venv,dist,build @@ -17,8 +12,3 @@ pretty=True [puppetboard.docker_settings] ignore_errors = True - -[nosetests] -with-coverage = 1 -with-xunit = 1 -cover-package = puppetboard diff --git a/wsgi.py b/wsgi.py index 07e8b2dde..5c0a55215 100644 --- a/wsgi.py +++ b/wsgi.py @@ -1,3 +1,5 @@ from __future__ import absolute_import -import os -from puppetboard.app import app as application +# noinspection PyUnresolvedReferences +import os # noqa: F401 +# noinspection PyUnresolvedReferences +from puppetboard.app import app as application # noqa: F401