Skip to content
Draft
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
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.1
hooks:
- id: ruff
- id: ruff-check
args:
- --config=backend/pyproject.toml
- --fix
- id: ruff-format

Expand Down
Empty file added backend/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion backend/apps/api/rest/v0/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from ninja.pagination import RouterPaginated
from ninja.throttling import AuthRateThrottle

from apps.api.rest.auth.api_key import ApiKey as ApiKey
from apps.api.rest.auth.api_key import ApiKey
from apps.api.rest.v0.chapter import router as chapter_router
from apps.api.rest.v0.committee import router as committee_router
from apps.api.rest.v0.event import router as event_router
Expand Down
12 changes: 8 additions & 4 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ lint.per-file-ignores."**/__init__.py" = [
"D104", # https://docs.astral.sh/ruff/rules/undocumented-public-package/
"F401", # https://docs.astral.sh/ruff/rules/unused-import/
]
lint.per-file-ignores."**/apps/api/rest/**/*.py" = [
"ARG001", # https://docs.astral.sh/ruff/rules/unused-function-argument/
"B008", # https://docs.astral.sh/ruff/rules/function-call-in-default-argument/
]

lint.per-file-ignores."**/management/commands/*.py" = [
"D101", # https://docs.astral.sh/ruff/rules/undocumented-public-class/
"D102", # https://docs.astral.sh/ruff/rules/undocumented-public-method/
Expand Down Expand Up @@ -117,10 +122,9 @@ lint.per-file-ignores."**/tests/**/*.py" = [
"SLF001", # https://docs.astral.sh/ruff/rules/private-member-access/
]

lint.per-file-ignores."apps/api/rest/**/*.py" = [
"ARG001", # https://docs.astral.sh/ruff/rules/unused-function-argument/
"B008", # https://docs.astral.sh/ruff/rules/function-call-in-default-argument/
]
lint.isort.known-first-party = [ "apps", "settings" ]
lint.isort.known-third-party = [ "django" ]
lint.isort.section-order = [ "future", "standard-library", "third-party", "first-party", "local-folder" ]

[tool.pytest.ini_options]
DJANGO_CONFIGURATION = "Test"
Expand Down