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 ⧉", 5
ALN043: You can only import things from a Component public module, see: https://www.notion.so/alaninsurance/Modular-monolith-a9d84f1318d34115bbd08b3648e5a587 ⧉", 2
ALN039: The module public cannot import other components (or from apps/), it's meant to be the public interface of the component #{self.component_name}, see: https://www.notion.so/alaninsurance/Modular-monolith-a9d84f1318d34115bbd08b3648e5a587 ⧉", 5
ALN077: Check for usage of backref in SQLAlchemy relationships and suggest using back_populates instead. 2
ALN085: Enforces SQLAlchemy 2.0 query style by detecting deprecated patterns that will be removed in SQLAlchemy 2.0. This linter checks for: 1. Usage of session.query() which is deprecated in favor of session.scalar(), session.scalars(), or session.execute() Note: Other SQLAlchemy 2.0 deprecation warnings are already being turned into errors at runtime by the _turn_sql_alchemy_warning_into_errors function in backend/shared/models/orm/sqlalchemy.py. 19

Listing of files of the most critical ALN**

ALN069 occurs 5 times

File:line Content
components/encryption/public/commands.py:29 ⧉ from components.clinic.internal.models.clinic_user import ( # noqa: ALN039,ALN069
components/encryption/public/commands.py:32 ⧉ from components.clinic.internal.models.medical_conversation import ( # noqa: ALN039,ALN069
components/encryption/public/commands.py:183 ⧉ from components.clinic.internal.models.clinic_user import ( # noqa: ALN039,ALN069
components/encryption/public/commands.py:186 ⧉ from components.clinic.internal.models.medical_admin import ( # noqa: ALN039,ALN069
components/encryption/public/commands.py:189 ⧉ from components.clinic.internal.models.medical_conversation import ( # noqa: ALN039,ALN069

ALN043 occurs 2 times

File:line Content
components/encryption/internal/controllers/tests/test_encryption_devices.py:12 ⧉ from components.fr.internal.tests.factories.user import UserFactory # noqa: ALN043
components/encryption/internal/controllers/tests/test_encryption.py:11 ⧉ from components.fr.internal.tests.factories.user import ( # noqa: ALN043

ALN039 occurs 5 times

File:line Content
components/encryption/public/commands.py:29 ⧉ from components.clinic.internal.models.clinic_user import ( # noqa: ALN039,ALN069
components/encryption/public/commands.py:32 ⧉ from components.clinic.internal.models.medical_conversation import ( # noqa: ALN039,ALN069
components/encryption/public/commands.py:183 ⧉ from components.clinic.internal.models.clinic_user import ( # noqa: ALN039,ALN069
components/encryption/public/commands.py:186 ⧉ from components.clinic.internal.models.medical_admin import ( # noqa: ALN039,ALN069
components/encryption/public/commands.py:189 ⧉ from components.clinic.internal.models.medical_conversation import ( # noqa: ALN039,ALN069