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 ⧉", |
11 |
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 ⧉", |
2 |
| 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. | 4 |
Listing of files of the most critical ALN**¶
ALN069 occurs 8 times¶
| File:line | Content |
|---|---|
| components/instant_quote/external/user.py:14 ⧉ | from components.fr.internal.models.alan_employee import ( # noqa: ALN069 |
| components/instant_quote/external/builder_product.py:17 ⧉ | from components.offer_builder.internal.models.builder_coverage import ( # noqa: ALN069 |
| components/instant_quote/external/builder_product.py:20 ⧉ | from components.offer_builder.internal.models.builder_pricing import ( # noqa: ALN069 |
| components/instant_quote/external/builder_product.py:23 ⧉ | from components.offer_builder.internal.models.builder_product_version import ( # noqa: ALN069 |
| components/instant_quote/external/builder_product.py:83 ⧉ | from components.offer_builder.internal.models.builder_product_version import ( # noqa: ALN069 |
| components/instant_quote/external/competitor_product.py:16 ⧉ | from components.offer_builder.competitor_product.models.competitor_product import ( # noqa: ALN069 |
| components/instant_quote/external/competitor_product.py:19 ⧉ | from components.offer_builder.competitor_product.models.competitor_product_price import ( # noqa: ALN069 |
| components/instant_quote/external/competitor_product.py:65 ⧉ | from components.offer_builder.competitor_product.models.competitor_product import ( # noqa: ALN069 |
ALN043 occurs 11 times¶
| File:line | Content |
|---|---|
| components/instant_quote/external/builder_product.py:26 ⧉ | from components.offer_builder.internal.v1.queries.builder_pricing import ( # noqa: ALN043 |
| components/instant_quote/external/builder_product.py:71 ⧉ | from components.offer_builder.internal.v1.queries.get_builder_product_coverage_table import ( # noqa: ALN043 |
| components/instant_quote/external/builder_product.py:86 ⧉ | from components.offer_builder.shared.enums.coverage_level import ( # noqa: ALN043 |
| components/instant_quote/external/competitor_product.py:68 ⧉ | from components.offer_builder.competitor_product.queries.get_competitor_product_coverage_table import ( # noqa: ALN043 |
| components/instant_quote/external/estimated_cost.py:13 ⧉ | from components.offer_builder.shared.enums.price_structure_type import ( # noqa: ALN043 |
| components/instant_quote/public/controllers/presenters/instant_quote.py:18 ⧉ | from components.fr.subcomponents.ccn_compliance.internal.entities.ccn_collective_agreement import ( # noqa: ALN039 ALN043 # only for type checking |
| components/instant_quote/public/controllers/presenters/instant_quote.py:73 ⧉ | from components.fr.subcomponents.ccn_compliance.protected.ccn_collective_agreements_for_compliance_checks import ( # noqa: ALN039 ALN043 |
| components/instant_quote/internal/instant_quote.py:17 ⧉ | from components.fr.subcomponents.ccn_compliance.internal.entities.ccn_collective_agreement import ( # noqa: ALN043 |
| components/instant_quote/internal/instant_quote.py:50 ⧉ | from components.fr.subcomponents.ccn_compliance.protected.ccn_collective_agreements_for_compliance_checks import ( # noqa: ALN043 |
| components/instant_quote/internal/instant_quote.py:89 ⧉ | from components.fr.internal.errors.error_code import ErrorCode # noqa: ALN043 |
| components/instant_quote/internal/helpers/token_generator.py:22 ⧉ | from components.fr.internal.errors.error_code import ErrorCode # noqa: ALN043 |
ALN039 occurs 2 times¶
| File:line | Content |
|---|---|
| components/instant_quote/public/controllers/presenters/instant_quote.py:18 ⧉ | from components.fr.subcomponents.ccn_compliance.internal.entities.ccn_collective_agreement import ( # noqa: ALN039 ALN043 # only for type checking |
| components/instant_quote/public/controllers/presenters/instant_quote.py:73 ⧉ | from components.fr.subcomponents.ccn_compliance.protected.ccn_collective_agreements_for_compliance_checks import ( # noqa: ALN039 ALN043 |