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 ⧉", | 4 |
ALN043: You can only import things from a Component public module, see: https://www.notion.so/alaninsurance/Modular-monolith-a9d84f1318d34115bbd08b3648e5a587 ⧉", |
10 |
| ALN009: Checks that models do not import business logic | 1 |
| ALN017: Do not use top of file imports for business_logic or services in controllers, admin_tools or models, unless for typing. See this Notion page : https://www.notion.so/alaninsurance/Imports-and-start-up-time-WIP-5495c8713847434986ef03ad09158bf1 ⧉ | 1 |
ALN072: Functions decorated with @enqueueable should not use non-primitive type arguments. The function is used by RQ and the arguments must be serializable and robust for code moves/refactors. |
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. | 25 |
Listing of files of the most critical ALN**¶
ALN069 occurs 4 times¶
| File:line | Content |
|---|---|
| components/ca/internal/tests/factories/factories.py:88 ⧉ | from components.gamification.internal.models.player import Player # noqa: ALN069 |
| components/ca/internal/claim_management/claim_engine/steps/reimbursement_payment/business_logic/actions/tests/test_submit_reimbursement_payment.py:19 ⧉ | from components.payment_gateway.subcomponents.accounts.models.tests.factories import ( # noqa: ALN069 for testing purposes |
| components/ca/internal/claim_management/claim_engine/steps/settlement/business_logic/actions/tests/test_reprocess_settlement_payments.py:20 ⧉ | from components.payment_gateway.subcomponents.accounts.models.tests.factories import ( # noqa: ALN069 for testing purposes |
| components/ca/bootstrap/dependencies/gamification.py:174 ⧉ | from components.gamification.internal.models.player import ( # noqa: ALN069 |
ALN043 occurs 10 times¶
| File:line | Content |
|---|---|
| components/ca/conftest.py:16 ⧉ | from components.authentication.bootstrap.bootstrap import ( # noqa: ALN043 allowed in conftest |
| components/ca/conftest.py:20 ⧉ | from components.employment.bootstrap.bootstrap import ( # noqa: ALN043 allowed in conftest |
| components/ca/conftest.py:23 ⧉ | from components.global_profile.bootstrap.bootstrap import ( # noqa: ALN043 allowed in conftest |
| components/ca/conftest.py:26 ⧉ | from components.onboarding.bootstrap.bootstrap import ( # noqa: ALN043 allowed in conftest |
| components/ca/conftest.py:29 ⧉ | from components.payment_gateway.bootstrap.bootstrap import ( # noqa: ALN043 allowed in conftest |
| components/ca/internal/user/profile/repository.py:5 ⧉ | from components.global_profile.internal.domain.entities import ( # noqa: ALN043 |
| components/ca/internal/user/profile/repository.py:8 ⧉ | from components.global_profile.internal.infrastructure.repository import ( # noqa: ALN043 |
| components/ca/internal/tests/factories/factories.py:90 ⧉ | from components.global_profile.internal.domain.tests.factories import ( # noqa: ALN043 |
| components/ca/internal/tests/factories/factories.py:93 ⧉ | from components.global_profile.internal.infrastructure.repository import ( # noqa: ALN043 |
| components/ca/internal/helpers/tests/base_test_app.py:21 ⧉ | from components.onboarding.bootstrap.testing import ( # noqa: ALN043 |