Skip to content

Commit

Permalink
install flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
JKatzwinkel committed Jun 2, 2023
1 parent 6c63ddc commit 4d01dea
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@ jobs:
- name: run tests
run: python -mpytest

- name: lint
run: python -mflake8

...

2 changes: 1 addition & 1 deletion oai_status/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def list_sets(base_url: str = 'https://oai.sbb.berlin/') -> bool:
"""
try:
assert Document(f'{base_url}?verb=ListSets').xpath('//ListSets/set/setSpec')
except:
except BaseException:
return False
return True

Expand Down
18 changes: 17 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ dependencies = [

[project.optional-dependencies]
dev = [
'pytest-cov'
'pytest-cov',
'flake8-multiline-containers',
'flake8-pyproject',
'flake8-simplify',
]

[tool.setuptools]
Expand All @@ -23,7 +26,20 @@ packages = [
oai-status = 'oai_status:main'
oai-list-records = 'oai_status.list_records:main'


[tool.pytest.ini_options]
addopts = '''
--doctest-modules --cov-report=term-missing --cov=oai_status/
'''


[tool.coverage.report]
fail_under = 96
precision = 2


[tool.flake8]
max-line-length = 100
exclude = [
'build', '.venv'
]

0 comments on commit 4d01dea

Please sign in to comment.