Skip to content

Code quality

ALN** occurrences by order of importance

NOQA Number of occurrences
ALN069: You can't import models from other components, see: https://www.notion.so/alaninsurance/Modular-monolith-a9d84f1318d34115bbd08b3648e5a587 ⧉", 8
ALN043: You can only import things from a Component public module, see: https://www.notion.so/alaninsurance/Modular-monolith-a9d84f1318d34115bbd08b3648e5a587 ⧉", 3
ALN027: This class checks that no protected attribute access is used. 1
ALN049: app is a globally shared fixture with the same controllers as the production one, registering blueprints will impact other tests 1
ALN077: Check for usage of backref in SQLAlchemy relationships and suggest using back_populates instead. 2

Listing of files of the most critical ALN**

ALN069 occurs 8 times

File:line Content
components/medical_secrecy/internal/commands/tests/test_delete_orphaned_worker_jobs.py:12 ⧉ from components.occupational_health.internal.models.tests.factories import ( # noqa: ALN069
components/medical_secrecy/internal/business_logic/queries/notes.py:77 ⧉ from components.occupational_health.internal.models.occupational_health_profile import ( # noqa: ALN069
components/medical_secrecy/internal/business_logic/queries/tests/test_notes.py:17 ⧉ from components.occupational_health.internal.models.tests.factories import ( # noqa: ALN069
components/medical_secrecy/internal/business_logic/actions/notes.py:158 ⧉ from components.occupational_health.internal.models.occupational_health_profile import ( # noqa: ALN069
components/medical_secrecy/internal/business_logic/actions/notes.py:218 ⧉ from components.occupational_health.internal.models.occupational_health_profile import ( # noqa: ALN069
components/medical_secrecy/internal/business_logic/actions/notes.py:289 ⧉ from components.occupational_health.internal.models.occupational_health_profile import ( # noqa: ALN069
components/medical_secrecy/internal/business_logic/actions/export_dmst_activity.py:32 ⧉ # importing the model from another component (ALN069 modular monolith rule)
components/medical_secrecy/internal/business_logic/actions/tests/test_notes.py:21 ⧉ from components.occupational_health.internal.models.tests.factories import ( # noqa: ALN069

ALN043 occurs 3 times

File:line Content
components/medical_secrecy/conftest.py:30 ⧉ from components.employment.bootstrap.bootstrap import ( # noqa: ALN043 # we should fix that linter someday
components/medical_secrecy/conftest.py:33 ⧉ from components.ins.bootstrap.bootstrap import ( # noqa: ALN043 # we should fix that linter someday
components/medical_secrecy/conftest.py:39 ⧉ from components.occupational_health.bootstrap.bootstrap import ( # noqa: ALN043 # we should fix that linter someday