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 ⧉", | 52 |
ALN043: You can only import things from a Component public module, see: https://www.notion.so/alaninsurance/Modular-monolith-a9d84f1318d34115bbd08b3648e5a587 ⧉", |
58 |
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 |
| 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. | 51 |
Listing of files of the most critical ALN**¶
ALN069 occurs 52 times¶
| File:line | Content |
|---|---|
| components/global_account/external/account.py:9 ⧉ | from components.fr.internal.models.account import ( # noqa: ALN069 |
| components/global_account/external/account.py:12 ⧉ | from components.fr.internal.models.company import ( # noqa: ALN069 |
| components/global_account/external/account.py:55 ⧉ | from components.fr.internal.models.account import ( # noqa: ALN069 |
| components/global_account/external/account.py:58 ⧉ | from components.fr.internal.models.company import ( # noqa: ALN069 |
| components/global_account/external/account.py:102 ⧉ | from components.fr.internal.models.account import ( # noqa: ALN069 |
| components/global_account/external/account.py:105 ⧉ | from components.fr.internal.models.company import ( # noqa: ALN069 |
| components/global_account/external/ccn.py:8 ⧉ | from components.fr.internal.models.ccn import ( # noqa: ALN069 |
| components/global_account/external/ccn.py:14 ⧉ | from components.fr.internal.models.ccn import ( # noqa: ALN069 |
| components/global_account/internal/actions/account.py:4 ⧉ | from components.fr.internal.models.company import ( # noqa: ALN069 |
| components/global_account/internal/actions/proposal.py:23 ⧉ | from components.fr.internal.models.enums.professional_category import ( # noqa: ALN069 |
| components/global_account/internal/actions/proposal.py:61 ⧉ | from components.offer_builder.internal.models.prevoyance_builder_product_for_budget import ( # noqa: ALN069 |
| components/global_account/internal/actions/builder_prospect.py:59 ⧉ | from components.fr.internal.models.company import ( # noqa: ALN069 |
| components/global_account/internal/actions/builder_prospect.py:73 ⧉ | from components.fr.internal.models.contract import ( # noqa: ALN069 |
| components/global_account/internal/actions/builder_prospect.py:76 ⧉ | from components.fr.internal.models.health_contract_version import ( # noqa: ALN069 |
| components/global_account/internal/actions/builder_prospect.py:110 ⧉ | from components.fr.internal.models.company import ( # noqa: ALN069 |
| components/global_account/internal/actions/tests/test_proposal.py:13 ⧉ | from components.fr.internal.models.company import Company # noqa: ALN069 |
| components/global_account/internal/actions/tests/test_proposal.py:14 ⧉ | from components.fr.internal.models.enums.professional_category import ( # noqa: ALN069 |
| components/global_account/internal/actions/tests/test_proposal.py:17 ⧉ | from components.fr.internal.offer.health.models.plan import Plan # noqa: ALN069 |
| components/global_account/internal/actions/tests/test_proposal.py:42 ⧉ | from components.offer_builder.internal.models.builder_product import ( # noqa: ALN069 |
| components/global_account/internal/actions/tests/test_proposal.py:45 ⧉ | from components.offer_builder.internal.models.factories.builder_coverage import ( # noqa: ALN069 |
| components/global_account/internal/actions/tests/test_proposal.py:48 ⧉ | from components.offer_builder.internal.models.factories.builder_product_version import ( # noqa: ALN069 |
| components/global_account/internal/actions/tests/test_proposal.py:51 ⧉ | from components.offer_builder.internal.models.factories.builder_target import ( # noqa: ALN069 |
| components/global_account/internal/actions/tests/test_proposal.py:54 ⧉ | from components.offer_builder.internal.models.factories.prevoyance_builder_product_for_budget import ( # noqa: ALN069 |
| components/global_account/internal/actions/tests/test_proposal.py:57 ⧉ | from components.offer_builder.internal.models.prevoyance_builder_product_for_budget import ( # noqa: ALN069 |
| components/global_account/internal/actions/tests/test_proposal.py:64 ⧉ | from components.fr.internal.models.contract import Contract # noqa: ALN069 |
| components/global_account/internal/actions/tests/test_proposal.py:65 ⧉ | from components.fr.internal.models.prevoyance_contract import ( # noqa: ALN069 |
| components/global_account/internal/actions/tests/test_account.py:8 ⧉ | from components.fr.internal.models.company import ( # noqa: ALN069 |
| components/global_account/internal/actions/tests/test_salesforce_sync.py:7 ⧉ | from components.fr.internal.models.account import ( # noqa: ALN069 |
| components/global_account/internal/actions/tests/test_salesforce_sync.py:10 ⧉ | from components.fr.internal.models.company import ( # noqa: ALN069 |
| components/global_account/internal/actions/tests/test_salesforce_sync.py:35 ⧉ | from components.offer_builder.internal.models.builder_product import ( # noqa: ALN069 |
| components/global_account/internal/actions/tests/test_salesforce_sync.py:38 ⧉ | from components.offer_builder.internal.models.factories.builder_coverage import ( # noqa: ALN069 |
| components/global_account/internal/actions/tests/test_salesforce_sync.py:41 ⧉ | from components.offer_builder.internal.models.factories.builder_product import ( # noqa: ALN069 |
| components/global_account/internal/actions/tests/test_salesforce_sync.py:44 ⧉ | from components.offer_builder.internal.models.factories.builder_product_version import ( # noqa: ALN069 |
| components/global_account/internal/actions/tests/test_salesforce_sync.py:47 ⧉ | from components.offer_builder.internal.models.factories.builder_target import ( # noqa: ALN069 |
| components/global_account/internal/queries/company.py:6 ⧉ | from components.fr.internal.models.company import ( # noqa: ALN069 |
| components/global_account/internal/country_specifics/fr/proposal/proposal.py:4 ⧉ | from components.contracting.external.models import ProfessionalCategory # noqa: ALN069 |
| components/global_account/internal/country_specifics/fr/proposal/proposal.py:23 ⧉ | from components.offer_builder.internal.models.prevoyance_builder_product_for_budget import ( # noqa: ALN069 |
| components/global_account/internal/country_specifics/fr/mappers/fr_account_mapper.py:1 ⧉ | from components.fr.internal.models.account import Account as AccountSQLA # noqa: ALN069 |
| components/global_account/internal/country_specifics/fr/mappers/company_prospect_to_builder_prospect_mapper.py:3 ⧉ | from components.fr.internal.models.company import Company as CompanySQLA # noqa: ALN069 |
| components/global_account/internal/country_specifics/fr/mappers/builder_prospect_mapper.py:9 ⧉ | from components.global_account.internal.models.builder_prospect import ( # noqa: ALN069 |
| components/global_account/internal/country_specifics/fr/repositories/fr_account_repository.py:11 ⧉ | from components.fr.internal.models.account import Account as AccountSQLA # noqa: ALN069 |
| components/global_account/internal/country_specifics/fr/repositories/fr_account_repository.py:12 ⧉ | from components.fr.internal.models.company import ( # noqa: ALN069 |
| components/global_account/internal/country_specifics/be/proposal/proposal.py:23 ⧉ | from components.offer_builder.internal.models.prevoyance_builder_product_for_budget import ( # noqa: ALN069 |
| components/global_account/internal/country_specifics/be/mappers/be_account_mapper.py:1 ⧉ | from components.be.internal.models.be_account import BeAccount # noqa: ALN069 |
| components/global_account/internal/country_specifics/be/mappers/be_company_and_builder_prospect_to_builder_prospect_mapper.py:3 ⧉ | from components.be.internal.models.be_company import BeCompany # noqa: ALN069 |
| components/global_account/internal/country_specifics/be/mappers/be_company_and_builder_prospect_to_builder_prospect_mapper.py:4 ⧉ | from components.global_account.internal.models.builder_prospect import ( # noqa: ALN069 |
| components/global_account/internal/country_specifics/be/mappers/be_company_to_entity_mapper.py:1 ⧉ | from components.be.internal.models.be_company import BeCompany # noqa: ALN069 |
| components/global_account/internal/country_specifics/be/mappers/builder_prospect_mapper.py:7 ⧉ | from components.global_account.internal.models.builder_prospect import ( # noqa: ALN069 |
| components/global_account/internal/country_specifics/be/mappers/tests/test_builder_prospect_mapper.py:4 ⧉ | from components.be.internal.models.tests.factories import ( # noqa: ALN069 |
| components/global_account/internal/country_specifics/be/repositories/be_account_repository.py:13 ⧉ | from components.be.internal.models.be_account import ( # noqa: ALN069 |
| components/global_account/internal/country_specifics/be/repositories/be_account_repository.py:16 ⧉ | from components.be.internal.models.be_company import ( # noqa: ALN069 |
| components/global_account/internal/country_specifics/be/repositories/tests/test_be_account_repository.py:6 ⧉ | from components.be.internal.models.tests.factories import ( # noqa: ALN069 |
ALN043 occurs 58 times¶
| File:line | Content |
|---|---|
| components/global_account/external/account.py:197 ⧉ | from components.fr.internal.business_logic.account.actions.account import ( # noqa: ALN043 |
| components/global_account/external/account.py:217 ⧉ | from components.fr.internal.business_logic.account.actions.account import ( # noqa: ALN043 |
| components/global_account/external/account.py:221 ⧉ | from components.fr.internal.business_logic.account.model_brokers import ( # noqa: ALN043 |
| components/global_account/external/company.py:3 ⧉ | from components.contracting.external.subscription.api.queries import ( # noqa: ALN043 |
| components/global_account/external/company.py:6 ⧉ | from components.contracting.external.subscriptor.api.company import ( # noqa: ALN043 |
| components/global_account/external/tests/test_account.py:7 ⧉ | from components.fr.internal.tests.factories.account import ( # noqa: ALN043 |
| components/global_account/external/tests/test_account.py:10 ⧉ | from components.fr.internal.tests.factories.company import ( # noqa: ALN043 |
| components/global_account/internal/actions/account.py:32 ⧉ | from components.offer_builder.internal.v1.actions.prospect import ( # noqa: ALN043 # TODO rework dependencies between global_account and offer_builder |
| components/global_account/internal/actions/proposal.py:22 ⧉ | from components.contracting.utils.validation import ValidationContext # noqa: ALN043 |
| components/global_account/internal/actions/proposal.py:55 ⧉ | from components.contracting.external.subscription.api.entities.subscription import ( # noqa: ALN043 |
| components/global_account/internal/actions/proposal.py:125 ⧉ | from components.offer_builder.internal.v1.queries.prevoyance import ( # noqa: ALN043 |
| components/global_account/internal/actions/salesforce_sync.py:4 ⧉ | from components.fr.internal.errors.error_code import ( # noqa: ALN043 |
| components/global_account/internal/actions/tests/test_proposal.py:18 ⧉ | from components.fr.internal.tests.factories.ccn import ( # noqa: ALN043 |
| components/global_account/internal/actions/tests/test_proposal.py:21 ⧉ | from components.fr.internal.tests.factories.company import ( # noqa: ALN043 |
| components/global_account/internal/actions/tests/test_proposal.py:24 ⧉ | from components.fr.internal.tests.factories.contract import ( # noqa: ALN043 |
| components/global_account/internal/actions/tests/test_proposal.py:27 ⧉ | from components.fr.internal.tests.factories.plan import PlanFullFactory # noqa: ALN043 |
| components/global_account/internal/actions/tests/test_proposal.py:28 ⧉ | from components.fr.internal.tests.factories.prevoyance_contract import ( # noqa: ALN043 |
| components/global_account/internal/actions/tests/test_proposal.py:31 ⧉ | from components.fr.internal.tests.factories.prevoyance_plan import ( # noqa: ALN043 |
| components/global_account/internal/actions/tests/test_proposal.py:34 ⧉ | from components.fr.internal.tests.factories.user import UserFactory # noqa: ALN043 |
| components/global_account/internal/actions/tests/test_account.py:11 ⧉ | from components.fr.internal.tests.factories.account import ( # noqa: ALN043 |
| components/global_account/internal/actions/tests/test_account.py:14 ⧉ | from components.fr.internal.tests.factories.company import ( # noqa: ALN043 |
| components/global_account/internal/actions/tests/test_builder_prospect.py:8 ⧉ | from components.fr.internal.tests.factories.account import ( # noqa: ALN043 |
| components/global_account/internal/actions/tests/test_builder_prospect.py:11 ⧉ | from components.fr.internal.tests.factories.company import ( # noqa: ALN043 |
| components/global_account/internal/actions/tests/test_salesforce_sync.py:4 ⧉ | from components.fr.internal.errors.error_code import ( # noqa: ALN043 |
| components/global_account/internal/actions/tests/test_salesforce_sync.py:13 ⧉ | from components.fr.internal.salesforce.internals.services.salesforce import ( # noqa: ALN043 # to fix |
| components/global_account/internal/actions/tests/test_salesforce_sync.py:16 ⧉ | from components.fr.internal.tests.factories.account import ( # noqa: ALN043 |
| components/global_account/internal/actions/tests/test_salesforce_sync.py:19 ⧉ | from components.fr.internal.tests.factories.company import ( # noqa: ALN043 |
| components/global_account/internal/actions/tests/test_salesforce_sync.py:22 ⧉ | from components.fr.internal.tests.factories.competitor_product import ( # noqa: ALN043 |
| components/global_account/internal/queries/builder_prospect.py:6 ⧉ | from components.fr.internal.business_logic.company.queries.franchise import ( # noqa: ALN043 |
| components/global_account/internal/presenters/admin.py:5 ⧉ | from components.fr.internal.business_logic.company.entities.admin import ( # noqa: ALN043 |
| components/global_account/internal/entities/company.py:6 ⧉ | from components.contracting.external.subscription.api.entities.subscription import ( # noqa: ALN043 |
| components/global_account/internal/entities/factories/company_prospect.py:4 ⧉ | from components.fr.internal.tests.factories.helpers import next_siren # noqa:ALN043 |
| components/global_account/internal/entities/factories/company_prospect.py:5 ⧉ | from components.global_account.public.entities.company_prospect import ( # noqa: ALN043 |
| components/global_account/internal/controllers/list_admins.py:42 ⧉ | from components.fr.internal.business_logic.company.queries.admin import ( # noqa: ALN043 |
| components/global_account/internal/controllers/synchronise_prospect.py:44 ⧉ | from components.fr.internal.salesforce.api.main import ( # noqa: ALN043 |
| components/global_account/internal/controllers/create_proposal.py:58 ⧉ | from components.fr.internal.queuing.config import ( # noqa: ALN043 |
| components/global_account/internal/controllers/tests/test_accounts.py:5 ⧉ | from components.fr.internal.controllers.tests.helpers import ( # noqa: ALN043 |
| components/global_account/internal/country_specifics/salesforce_client_factory.py:12 ⧉ | from components.fr.internal.salesforce.internals.services.salesforce import ( # noqa: ALN043 |
| components/global_account/internal/country_specifics/salesforce_client_factory.py:18 ⧉ | from components.be.internal.services.salesforce import ( # noqa: ALN043 |
| components/global_account/internal/country_specifics/fr/proposal/proposal.py:5 ⧉ | from components.contracting.external.subscription.api.entities.subscription import ( # noqa: ALN043 |
| components/global_account/internal/country_specifics/fr/proposal/proposal.py:9 ⧉ | from components.contracting.subcomponents.proposal.plugins.health_amendment_fr.settings import ( # noqa: ALN043 |
| components/global_account/internal/country_specifics/fr/proposal/proposal.py:12 ⧉ | from components.contracting.subcomponents.proposal.plugins.prevoyance_amendment_fr.settings import ( # noqa: ALN043 |
| components/global_account/internal/country_specifics/fr/mappers/builder_prospect_mapper.py:3 ⧉ | from components.fr.internal.business_logic.company.queries.company import ( # noqa: ALN043 |
| components/global_account/internal/country_specifics/fr/mappers/tests/test_builder_prospect_mapper.py:4 ⧉ | from components.fr.internal.tests.factories.account import ( # noqa: ALN043 |
| components/global_account/internal/country_specifics/fr/mappers/tests/test_builder_prospect_mapper.py:7 ⧉ | from components.fr.internal.tests.factories.company import ( # noqa: ALN043 |
| components/global_account/internal/country_specifics/fr/repositories/fr_account_repository.py:8 ⧉ | from components.fr.internal.business_logic.company.queries.company import ( # noqa: ALN043 |
| components/global_account/internal/country_specifics/fr/repositories/fr_account_repository.py:95 ⧉ | from components.fr.internal.business_logic.account.actions.account import ( # noqa: ALN043 |
| components/global_account/internal/country_specifics/fr/repositories/tests/test_fr_account_repository.py:6 ⧉ | from components.fr.internal.tests.factories.account import ( # noqa: ALN043 |
| components/global_account/internal/country_specifics/fr/repositories/tests/test_fr_account_repository.py:9 ⧉ | from components.fr.internal.tests.factories.ccn import CCNFactory # noqa: ALN043 |
| components/global_account/internal/country_specifics/fr/repositories/tests/test_fr_account_repository.py:10 ⧉ | from components.fr.internal.tests.factories.company import ( # noqa: ALN043 |
| components/global_account/internal/country_specifics/be/proposal/proposal.py:8 ⧉ | from components.contracting.external.subscription.api.entities.subscription import ( # noqa: ALN043 |
| components/global_account/internal/country_specifics/be/proposal/proposal.py:11 ⧉ | from components.contracting.external.subscriptor.be.company import ( # noqa: ALN043 |
| components/global_account/internal/country_specifics/be/proposal/proposal.py:16 ⧉ | from components.contracting.subcomponents.account_hub.internal.presenters.enums import ( # noqa: ALN043 |
| components/global_account/internal/country_specifics/be/proposal/proposal.py:19 ⧉ | from components.contracting.subcomponents.proposal.plugins.health_amendment_be.settings import ( # noqa: ALN043 |
| components/global_account/internal/country_specifics/be/repositories/be_account_repository.py:8 ⧉ | from components.be.internal.account.queries.account import ( # noqa: ALN043 |
| components/global_account/internal/country_specifics/be/repositories/be_account_repository.py:11 ⧉ | from components.be.internal.company.actions.account import get_account # noqa: ALN043 |
| components/global_account/internal/country_specifics/be/repositories/be_account_repository.py:12 ⧉ | from components.be.internal.company.queries.company import get_companies # noqa: ALN043 |
| components/global_account/bootstrap/flask_admin_configuration.py:3 ⧉ | from components.fr.internal.admin.consts import ( # noqa: ALN043 |