Skip to content

Commit

Permalink
Merge pull request #7 from ATIX-AG/feature/common-flake8-config
Browse files Browse the repository at this point in the history
Common flake8 config
  • Loading branch information
m-bucher authored Mar 14, 2024
2 parents 5b5a417 + 0cd4720 commit 27308af
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
extend-ignore =
# module level import not at top of file
E402,
max-line-length = 159
5 changes: 2 additions & 3 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:

# test_requirements contains tools needed for flake8, etc.
- name: Install requirements
run: pip3 install flake8==3.8.4
run: pip3 install -r test_requirements.txt
- name: Run linting test
run: flake8 --max-line-length=159 --ignore=F821,F401,E402 .

run: flake8 .
3 changes: 2 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ python:
- docker
image: ${CI_REGISTRY}/hub/lint/python:main
script:
- flake8 --max-line-length=159 --ignore=F821,F401,E402 .
- pip install -r test_requirements.txt
- flake8 .

unittest:
stage: test
Expand Down
2 changes: 1 addition & 1 deletion errata_server/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .errata_server import main
from .errata_server import main # noqa: F401
1 change: 1 addition & 0 deletions test_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ pycodestyle
pytest
pytest-asyncio==0.14.0
coverage
flake8==3.8.4

0 comments on commit 27308af

Please sign in to comment.