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

black and flake8 configurations are stored in pyproject.toml #44

Merged
merged 2 commits into from
Jul 5, 2024
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
5 changes: 0 additions & 5 deletions .flake8

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install dependencies
run: pip install black
- name: Check code formatting with black
run: black ./datanar/ --check --verbose --diff --line-length 79
run: black ./datanar/ --check --verbose --diff

flake8-test:
runs-on: ubuntu-latest
Expand All @@ -28,7 +28,7 @@ jobs:
- name: Install dependencies
run: pip install -r requirements/test.txt
- name: Check code formatting with flake8
run: flake8 ./datanar/ --config=.flake8
run: flake8 ./datanar/

django-test:
runs-on: ubuntu-latest
Expand Down
24 changes: 24 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[tool.flake8]
max-line-length = 79
inline-quotes="double"
import-order-style="google"
per-file-ignores = [
"*/migrations/*:E501",
"LN001",
"C812",
"DALL000",
]
application-import-names = [
"api",
"dashboard",
"core",
"datanar",
"homepage",
"qr_codes",
"redirects",
"statistic",
"users",
]

[tool.black]
line-length = 79
2 changes: 1 addition & 1 deletion requirements/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ celery==5.0.0
Django==4.2.13
django-allauth==0.63.3
django-cleanup==8.1.0
django-user-agents==0.4.0
django-settings-export==1.2.1
django-tz-detect==0.5.0
django-user-agents==0.4.0
djangorestframework==3.15.2
geoip2==4.8.0
gunicorn==22.0.0
Expand Down
1 change: 1 addition & 0 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ flake8-dunder-all==0.4.1
flake8-eradicate==1.5.0
flake8-import-order==0.18.2
flake8-print==5.0.0
Flake8-pyproject==1.2.3
flake8-quotes==3.4.0
flake8-return==1.2.0
flake8-use-pathlib==0.3.0
Expand Down
Loading