Skip to content

Commit

Permalink
Fix running flake8 + remove some unused config
Browse files Browse the repository at this point in the history
  • Loading branch information
gdubicki committed Nov 21, 2022
1 parent d5adda5 commit 3412a52
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ coverage.xml
.tox
.mypy_cache
.pytest_cache
nosetests.xml

# Translations
*.mo
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion puppetboard/views/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 == '*':
Expand Down
2 changes: 1 addition & 1 deletion puppetboard/views/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down
10 changes: 0 additions & 10 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -17,8 +12,3 @@ pretty=True

[puppetboard.docker_settings]
ignore_errors = True

[nosetests]
with-coverage = 1
with-xunit = 1
cover-package = puppetboard
6 changes: 4 additions & 2 deletions wsgi.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3412a52

Please sign in to comment.