-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Umair Khan
committed
Mar 23, 2024
1 parent
bd42ef8
commit 903a24b
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: flake8 Lint | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
flake8-lint: | ||
runs-on: ubuntu-latest | ||
name: Flake8 Lint | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python environment | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
poetry lock --no-update | ||
poetry install | ||
pip install black | ||
pip install isort | ||
- name: Run Black | ||
run: black ./ --config pyproject.toml | ||
|
||
- name: Run Isort | ||
run: isort . | ||
|
||
- name: Setup flake8 annotations | ||
uses: rbialon/flake8-annotations@v1 | ||
|
||
- name: Link and annotate with Flake8 | ||
uses: py-actions/flake8@v2 | ||
with: | ||
ignore: "E203, E701" # Will add F401 to ignore list after testing | ||
exclude: ".git, .github, build, dist, docs, venv, .venv, env, .env, .idea, .vscode" | ||
max-line-length: "119" | ||
path: "./" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,6 +76,7 @@ exclude = ''' | |
/( | ||
\.git | ||
| \.github | ||
| .tox | ||
| build | ||
| dist | ||
| docs | ||
|