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 ⧉", | 3 |
ALN043: You can only import things from a Component public module, see: https://www.notion.so/alaninsurance/Modular-monolith-a9d84f1318d34115bbd08b3648e5a587 ⧉", |
6 |
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 ⧉", |
4 |
| ALN077: Check for usage of backref in SQLAlchemy relationships and suggest using back_populates instead. | 3 |
| 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. | 13 |
Listing of files of the most critical ALN**¶
ALN069 occurs 3 times¶
| File:line | Content |
|---|---|
| components/id_verification/internal/controllers/webhooks/tests/test_onfido.py:10 ⧉ | from components.fr.internal.models.block_reimbursements_reason import ( # noqa: ALN039, ALN069 |
| components/id_verification/internal/controllers/webhooks/tests/test_onfido.py:13 ⧉ | from components.fr.internal.models.policy import Policy # noqa: ALN039, ALN069 |
| components/id_verification/internal/business_logic/actions/notification.py:17 ⧉ | from components.fr.internal.models.user import User # noqa: ALN069 |
ALN043 occurs 6 times¶
| File:line | Content |
|---|---|
| components/id_verification/internal/controllers/webhooks/tests/test_onfido.py:14 ⧉ | from components.fr.internal.tests.factories.contract import ( # noqa: ALN039, ALN043 |
| components/id_verification/internal/controllers/webhooks/tests/test_onfido.py:18 ⧉ | from components.fr.internal.tests.factories.policy import ( # noqa: ALN039, ALN043 |
| components/id_verification/internal/business_logic/actions/notification.py:4 ⧉ | from components.fr.internal.mail.async_mailer import ( # noqa: ALN043 |
| components/id_verification/internal/business_logic/actions/notification.py:8 ⧉ | from components.fr.internal.mail.mailer import ( # noqa: ALN043 |
| components/id_verification/internal/business_logic/actions/notification.py:11 ⧉ | from components.fr.internal.mail.personalization import ( # noqa: ALN043 |
| components/id_verification/internal/business_logic/actions/notification.py:14 ⧉ | from components.fr.internal.mail.templates import ( # noqa: ALN043 |
ALN039 occurs 4 times¶
| File:line | Content |
|---|---|
| components/id_verification/internal/controllers/webhooks/tests/test_onfido.py:10 ⧉ | from components.fr.internal.models.block_reimbursements_reason import ( # noqa: ALN039, ALN069 |
| components/id_verification/internal/controllers/webhooks/tests/test_onfido.py:13 ⧉ | from components.fr.internal.models.policy import Policy # noqa: ALN039, ALN069 |
| components/id_verification/internal/controllers/webhooks/tests/test_onfido.py:14 ⧉ | from components.fr.internal.tests.factories.contract import ( # noqa: ALN039, ALN043 |
| components/id_verification/internal/controllers/webhooks/tests/test_onfido.py:18 ⧉ | from components.fr.internal.tests.factories.policy import ( # noqa: ALN039, ALN043 |