mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat(fastapi): include all models in aurweb.models package
This gives developers the ability to import models without importing them directly from their module: from aurweb.models import Ban, AccountType This provides more conciseness: from aurweb import models def some_func(ban: models.Ban): pass def some_other_func(user: models.User): pass This more aligns with a Django-style of core model bases. NOTE: Docker images must be rebuilt with this change, as setup.cfg has changed. Old Docker images will cause flake8 violation reports. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
c572a97d1c
commit
6d59a97955
2 changed files with 32 additions and 1 deletions
|
@ -32,6 +32,7 @@ per-file-ignores =
|
|||
aurweb/routers/accounts.py:C901
|
||||
test/test_ssh_pub_key.py:E501
|
||||
aurweb/routers/packages.py:E741
|
||||
aurweb/models/__init__.py:F401
|
||||
|
||||
[isort]
|
||||
line_length = 127
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue