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 ⧉", | 9 |
ALN043: You can only import things from a Component public module, see: https://www.notion.so/alaninsurance/Modular-monolith-a9d84f1318d34115bbd08b3648e5a587 ⧉", |
26 |
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 ⧉", |
7 |
| ALN027: This class checks that no protected attribute access is used. | 3 |
| ALN049: app is a globally shared fixture with the same controllers as the production one, registering blueprints will impact other tests | 1 |
| ALN059: Checks that all component dependencies are declared in the root of a component | 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. | 11 |
Listing of files of the most critical ALN**¶
ALN069 occurs 9 times¶
| File:line | Content |
|---|---|
| components/shop/internal/business_logic/admin_business_logic/vouchers.py:11 ⧉ | from components.gamification.internal.models.voucher import ( # noqa: ALN069 |
| components/shop/internal/business_logic/admin_business_logic/vouchers.py:29 ⧉ | from components.fr.internal.models.user import User # noqa: ALN069 |
| components/shop/internal/business_logic/admin_business_logic/testimonials.py:8 ⧉ | from components.fr.internal.models.user import User # noqa: ALN069 |
| components/shop/internal/business_logic/suppliers/weiss_optik/weiss_optik_entities.py:8 ⧉ | from components.eyewear.internal.models.eyewear_contact_lens_product_variation import ( # noqa: ALN069 |
| components/shop/internal/business_logic/suppliers/weiss_optik/weiss_optik_catalog_synchronizer.py:12 ⧉ | from components.eyewear.internal.models.eyewear_contact_lens_order import ( # noqa: ALN069 |
| components/shop/internal/business_logic/suppliers/weiss_optik/weiss_optik_catalog_synchronizer.py:15 ⧉ | from components.eyewear.internal.models.eyewear_contact_lens_product_new import ( # noqa: ALN069 |
| components/shop/internal/business_logic/suppliers/weiss_optik/weiss_optik_catalog_synchronizer.py:18 ⧉ | from components.eyewear.internal.models.eyewear_contact_lens_product_variation import ( # noqa: ALN069 |
| components/shop/internal/business_logic/helpers/slack_helpers.py:20 ⧉ | from components.eyewear.internal.models.eyewear_contact_lens_order import ( # noqa: ALN069 |
| components/shop/internal/business_logic/helpers/slack_helpers.py:23 ⧉ | from components.eyewear.internal.models.eyewear_contact_lens_product_variation import ( # noqa: ALN069 |
ALN043 occurs 26 times¶
| File:line | Content |
|---|---|
| components/shop/internal/business_logic/admin_business_logic/orders.py:6 ⧉ | from components.fr.internal.shareable_features.permissions import ( # noqa: ALN043 |
| components/shop/internal/business_logic/admin_business_logic/testimonials.py:9 ⧉ | from components.fr.internal.shareable_features.query import ( # noqa: ALN043 |
| components/shop/internal/business_logic/admin_business_logic/tests/test_vouchers.py:14 ⧉ | from components.fr.internal.tests.factories.user import ( # noqa: ALN043, ALN059 |
| components/shop/internal/business_logic/emails/shop_email_manager.py:12 ⧉ | from components.fr.internal.mail.async_mailer import async_mailer # noqa: ALN043 |
| components/shop/internal/business_logic/emails/shop_email_manager.py:13 ⧉ | from components.fr.internal.mail.mailer import MailerParams # noqa: ALN043 |
| components/shop/internal/business_logic/emails/shop_email_manager.py:14 ⧉ | from components.fr.internal.mail.personalization import Personalization # noqa: ALN043 |
| components/shop/internal/business_logic/tests/test_shop_testimonials.py:3 ⧉ | from components.fr.internal.tests.factories.user import ( # noqa: ALN043 |
| components/shop/internal/business_logic/entities/shop_entities.py:8 ⧉ | from components.gamification.internal.helpers.berries import ( # noqa: ALN043 |
| components/shop/internal/business_logic/entities/contact_lens_entities.py:8 ⧉ | from components.eyewear.internal.entities.contact_lens_cart import ( # noqa: ALN043 |
| components/shop/internal/business_logic/entities/contact_lens_entities.py:11 ⧉ | from components.eyewear.internal.entities.contact_lens_order import ( # noqa: ALN043 |
| components/shop/internal/business_logic/entities/contact_lens_entities.py:14 ⧉ | from components.eyewear.internal.enums import ( # noqa: ALN043 |
| components/shop/internal/business_logic/entities/contact_lens_entities.py:31 ⧉ | from components.shop.internal.saleor.generated.fragments import ( # noqa: ALN043 |
| components/shop/internal/business_logic/suppliers/supplier_action_manager.py:4 ⧉ | from components.eyewear.internal.helpers.laposte import ( # noqa: ALN043 |
| components/shop/internal/business_logic/suppliers/weiss_optik/weiss_optik_order_updater.py:9 ⧉ | from components.eyewear.internal.business_logic.admin_business_logic.contact_lens_order_package import ( # noqa: ALN043 |
| components/shop/internal/business_logic/suppliers/weiss_optik/weiss_optik_catalog_synchronizer.py:7 ⧉ | from components.eyewear.internal.enums import ( # noqa: ALN043 |
| components/shop/internal/business_logic/suppliers/weiss_optik/weiss_optik_catalog_synchronizer.py:1083 ⧉ | from components.eyewear.internal.helpers.assets import ( # noqa: ALN043 |
| components/shop/internal/business_logic/suppliers/weiss_optik/weiss_optik_catalog_synchronizer.py:1983 ⧉ | from components.eyewear.internal.business_logic.admin_business_logic.contact_lens_order import ( # noqa: ALN043 |
| components/shop/internal/business_logic/helpers/slack_helpers.py:15 ⧉ | from components.eyewear.internal.helpers.dashboards import ( # noqa: ALN043 |
| components/shop/internal/business_logic/helpers/tests/test_prescription_helpers.py:7 ⧉ | _get_refracted_correction_for_contact_lenses, # noqa: ALN043 |
| components/shop/internal/business_logic/webhooks/order_events.py:5 ⧉ | from components.fr.internal.queuing.config import MAIN_QUEUE # noqa: ALN039, ALN043 |
| components/shop/internal/business_logic/webhooks/fulfillment_events.py:5 ⧉ | from components.fr.internal.queuing.config import MAIN_QUEUE # noqa: ALN039, ALN043 |
| components/shop/tests/commands/send_test_cancellation_email.py:80 ⧉ | from components.fr.internal.mail.mailer import MailerParams # noqa: ALN039, ALN043 |
| components/shop/tests/commands/send_test_cancellation_email.py:81 ⧉ | from components.fr.internal.mail.personalization import ( # noqa: ALN039, ALN043 |
| components/shop/public/controllers/admin_testimonial.py:72 ⧉ | from components.fr.internal.shareable_features.query import ( # noqa: ALN039,ALN043 |
| components/shop/public/controllers/saleor_checkout.py:11 ⧉ | from components.shop.internal.business_logic.entities.prescription_entities import ( # noqa: ALN043 |
| components/shop/public/controllers/invoicing.py:8 ⧉ | from components.fr.internal.queuing.config import MAIN_QUEUE # noqa: ALN039, ALN043 |
ALN039 occurs 7 times¶
| File:line | Content |
|---|---|
| components/shop/internal/business_logic/webhooks/order_events.py:5 ⧉ | from components.fr.internal.queuing.config import MAIN_QUEUE # noqa: ALN039, ALN043 |
| components/shop/internal/business_logic/webhooks/fulfillment_events.py:5 ⧉ | from components.fr.internal.queuing.config import MAIN_QUEUE # noqa: ALN039, ALN043 |
| components/shop/tests/commands/send_test_cancellation_email.py:80 ⧉ | from components.fr.internal.mail.mailer import MailerParams # noqa: ALN039, ALN043 |
| components/shop/tests/commands/send_test_cancellation_email.py:81 ⧉ | from components.fr.internal.mail.personalization import ( # noqa: ALN039, ALN043 |
| components/shop/public/globalization/shop_adapter.py:14 ⧉ | from components.fr.internal.shop.public.shop_adapter import ( # noqa: ALN039 |
| components/shop/public/controllers/admin_testimonial.py:72 ⧉ | from components.fr.internal.shareable_features.query import ( # noqa: ALN039,ALN043 |
| components/shop/public/controllers/invoicing.py:8 ⧉ | from components.fr.internal.queuing.config import MAIN_QUEUE # noqa: ALN039, ALN043 |