Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update flake8 configuration #116

Merged
merged 2 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ jobs:
pip install -r requirements/test.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
flake8 ddt.py test
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
4 changes: 2 additions & 2 deletions test/test_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def hello():
extra_attrs.sort()
assert len(extra_attrs) == 2
assert getattr(data_hello, extra_attrs[0]) == 1
assert getattr(data_hello, extra_attrs[1]) == (1,2)
assert getattr(data_hello, extra_attrs[1]) == (1, 2)


def test_file_data_decorator_with_dict():
Expand All @@ -137,7 +137,7 @@ def hello():
dh_keys = set(data_hello.__dict__.keys())
post_size = len(data_hello.__dict__)
assert post_size == pre_size + 2

extra_attrs = list(dh_keys - keys)
extra_attrs.sort()
assert len(extra_attrs) == 2
Expand Down
3 changes: 0 additions & 3 deletions test/test_named_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,3 @@ def test_missing_name_dict(self):
)
def _internal_test(value):
pass



5 changes: 5 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ commands =
pytest --cov=ddt --cov-report html
flake8 ddt.py test
sphinx-build -b html docs docs/_build

[flake8]
max-line-length = 127
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist,.tox,.venv
max-complexity = 10