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 ⧉", 11
ALN043: You can only import things from a Component public module, see: https://www.notion.so/alaninsurance/Modular-monolith-a9d84f1318d34115bbd08b3648e5a587 ⧉", 6
ALN021: Foreign keys must use models, not string. See this Notion page : https://www.notion.so/alaninsurance/Imports-5495c8713847434986ef03ad09158bf1 ⧉ 2
ALN041: As the model '{node.name}' is in a component it must be part of specific schema that is declared in components/{self.component_name}/models/helpers.py", 1

Listing of files of the most critical ALN**

ALN069 occurs 11 times

File:line Content
components/billing_occupational_health/internal/domain/tests/test_repository.py:9 ⧉ from components.occupational_health.internal.models.tests.factories import ( # noqa: ALN069
components/billing_occupational_health/internal/models/subscription_fee.py:9 ⧉ from components.fr.internal.billing.models.invoice import ( # noqa: ALN069
components/billing_occupational_health/internal/models/subscription_fee.py:17 ⧉ from components.occupational_health.internal.models.occupational_health_profile import ( # noqa: ALN069
components/billing_occupational_health/internal/models/tests/factories.py:6 ⧉ from components.occupational_health.internal.models.tests.factories import ( # noqa: ALN069
components/billing_occupational_health/internal/services/tests/test_subscription_fee.py:24 ⧉ from components.occupational_health.internal.models.tests.factories import ( # noqa: ALN069
components/billing_occupational_health/internal/business_logic/invoice_logic_dependencies.py:83 ⧉ from components.fr.internal.billing.models.installment_plan import ( # noqa: ALN069
components/billing_occupational_health/internal/business_logic/queries/invoices_data.py:11 ⧉ from components.fr.internal.billing.models.invoice import ( # noqa: ALN069
components/billing_occupational_health/internal/business_logic/actions/generate.py:27 ⧉ from components.fr.internal.billing.models.invoice import ( # noqa: ALN069
components/billing_occupational_health/internal/business_logic/actions/invoice_appendix.py:33 ⧉ from components.fr.internal.billing.models.invoice import Invoice # noqa: ALN069
components/billing_occupational_health/internal/business_logic/actions/invoice_appendix.py:81 ⧉ from components.fr.internal.billing.models.invoice import Invoice # noqa: ALN069
components/billing_occupational_health/internal/business_logic/actions/payment.py:7 ⧉ from components.fr.internal.billing.models.payment import Payment # noqa: ALN069

ALN043 occurs 6 times

File:line Content
components/billing_occupational_health/internal/controllers/tests/test_payments_smorest_migration.py:9 ⧉ from components.fr.internal.tests.factories.fr_alan_employee_factory import ( # noqa: ALN043
components/billing_occupational_health/internal/controllers/tests/test_payments_smorest_migration.py:12 ⧉ from components.fr.internal.tests.factories.user import UserFactory # noqa: ALN043
components/billing_occupational_health/internal/business_logic/invoice_logic_dependencies.py:77 ⧉ from components.fr.internal.billing.business_logic.queries.invoice import ( # noqa: ALN043
components/billing_occupational_health/internal/business_logic/invoice_logic_dependencies.py:80 ⧉ from components.fr.internal.billing.business_logic.queries.payment import ( # noqa: ALN043
components/billing_occupational_health/internal/business_logic/actions/generate.py:23 ⧉ from components.fr.internal.billing.business_logic.actions.create_installment_plans import ( # noqa: ALN043
components/billing_occupational_health/internal/business_logic/actions/tests/test_payment.py:6 ⧉ from components.fr.internal.billing.tests.factories.invoice import ( # noqa: ALN043