Active la regle isort (I) de ruff. 45 fichiers reordonnes, aucun changement de comportement : la suite passe avant comme apres. app/models/__init__.py en est exclu. Ses imports sont ranges en onze couches commentees qui decrivent le graphe de dependances ; trier par ordre alphabetique laisse chaque titre au-dessus d un import qu il ne decrit pas, et ce fichier n a qu un role, etre lu. Commit isole, comme le formatage : un diff de brassage ne doit pas servir de couverture a un changement de comportement.
37 lines
1.2 KiB
Python
37 lines
1.2 KiB
Python
"""User-facing routes, split by subject.
|
|
|
|
Was a single 1 699-line module covering account administration, profiles,
|
|
availability calendars, contracts, one-on-one sessions and coach notes —
|
|
six subjects that shared nothing but a URL prefix (ARCH-004).
|
|
|
|
Importing this package registers every route on `users_bp`, so app.py
|
|
keeps its single `from app.routes.users import users_bp`. The blueprint
|
|
itself lives in blueprint.py to keep that import one-directional.
|
|
"""
|
|
|
|
# Imported for their side effect: each module attaches its routes to
|
|
# users_bp. Order does not matter; none of them import each other.
|
|
from app.routes.users import (
|
|
accounts, # noqa: F401,E402
|
|
availability, # noqa: F401,E402
|
|
contracts, # noqa: F401,E402
|
|
notes, # noqa: F401,E402
|
|
one_on_one, # noqa: F401,E402
|
|
profile, # noqa: F401,E402
|
|
)
|
|
|
|
# Re-exported because tests and other modules reach for them by name.
|
|
from app.routes.users._shared import ( # noqa: F401,E402
|
|
ALLOWED_CONTRACT_EXTENSIONS,
|
|
ALLOWED_SIGNED_EXTENSIONS,
|
|
pdf_upload_error,
|
|
)
|
|
from app.routes.users.blueprint import users_bp
|
|
|
|
__all__ = [
|
|
'ALLOWED_CONTRACT_EXTENSIONS',
|
|
'ALLOWED_SIGNED_EXTENSIONS',
|
|
'pdf_upload_error',
|
|
'users_bp',
|
|
]
|