Skip to content

Commit

Permalink
Use flake8 in project
Browse files Browse the repository at this point in the history
  • Loading branch information
tsundvoll committed Apr 19, 2022
1 parent 7a0da4e commit 736f693
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Python package

on:
push:
push:
branches:
- main
pull_request:
Expand All @@ -17,22 +17,27 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Lint
run: |
black --check .
mypy .
- name: Optional linting
continue-on-error: true
run: |
flake8 .
- name: Test with pytest
run: |
pytest
Expand Down
10 changes: 10 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ no_strict_optional = True
no_site_packages = True
ignore_missing_imports = True

[flake8]
filename =
./src/*,
./tests/*,
exclude = .git, __pycache__, *.egg-info, *.json, *.conf, *.env,
per-file-ignores =
__init__.py: F401,
ignore =
W503
max-line-length = 88

[tool:pytest]
python_files = test_*.py
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
extras_require={
"dev": [
"black",
"flake8",
"mypy",
"myst-parser",
"pytest-dotenv",
Expand Down

0 comments on commit 736f693

Please sign in to comment.