You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cyclic imports between app/desktop/server/core flagged by pylint (R0401) #42
pylint src/profiles reports 16 cyclic-import warnings rooted in profiles.app reaching into every layer while those layers (or their shared models) are also imported transitively from it. Representative chain:
It works today because the cycles close on import-order luck (module-level imports at the bottom of app.py, lazy imports elsewhere), but it violates the AGENTS.md boundary rule ("Aucune dépendance circulaire entre modules") and makes refactoring fragile.
Likely levers:
app.py is the hub: extract the server bootstrap wiring (routes needing server_state, static mount, port discovery) into a dedicated bootstrap module so app.py only calls it, instead of importing route modules transitively.
core.config.models is imported by everything including app — keep it dependency-free (the cycle enters through service/matcher chains).
Consider making profiles/__init__ (which resolves __version__) not import subpackages.
Acceptance: pylint src/profiles reports zero R0401 without new import-outside-toplevel workarounds beyond the documented lazy imports.
Activity