Skip to content

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 ⧉", 7
ALN043: You can only import things from a Component public module, see: https://www.notion.so/alaninsurance/Modular-monolith-a9d84f1318d34115bbd08b3648e5a587 ⧉", 23
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
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 7 times

File:line Content
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/admin_business_logic/testimonials.py:8 ⧉ from components.fr.internal.models.user import User # noqa: ALN069
components/shop/internal/business_logic/helpers/slack_helpers.py:10 ⧉ from components.eyewear.internal.models.eyewear_contact_lens_order import ( # noqa: ALN069
components/shop/internal/business_logic/helpers/slack_helpers.py:13 ⧉ from components.eyewear.internal.models.eyewear_contact_lens_product_variation import ( # noqa: ALN069

ALN043 occurs 23 times

File:line Content
components/shop/public/controllers/saleor_checkout.py:8 ⧉ from components.shop.internal.business_logic.entities.prescription_entities import ( # noqa: ALN043
components/shop/public/controllers/admin_testimonial.py:72 ⧉ from components.fr.internal.shareable_features.query import ( # noqa: ALN039,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:8 ⧉ 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:1042 ⧉ from components.eyewear.internal.helpers.assets import ( # noqa: ALN043
components/shop/internal/business_logic/suppliers/weiss_optik/weiss_optik_catalog_synchronizer.py:1847 ⧉ from components.eyewear.internal.business_logic.admin_business_logic.contact_lens_order 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/entities/shop_entities.py:6 ⧉ from components.gamification.internal.helpers.berries 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/orders.py:6 ⧉ from components.fr.internal.shareable_features.permissions import ( # 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/helpers/slack_helpers.py:6 ⧉ 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/fulfillment_events.py:5 ⧉ from components.fr.internal.queuing.config import MAIN_QUEUE # noqa: ALN039, 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/emails/shop_email_manager.py:7 ⧉ from components.fr.internal.business_logic.feature import ( # noqa: ALN043
components/shop/internal/business_logic/emails/shop_email_manager.py:10 ⧉ from components.fr.internal.mail.async_mailer import async_mailer # noqa: ALN043
components/shop/internal/business_logic/emails/shop_email_manager.py:11 ⧉ from components.fr.internal.mail.mailer import MailerParams # noqa: ALN043
components/shop/internal/business_logic/emails/shop_email_manager.py:12 ⧉ from components.fr.internal.mail.personalization import Personalization # noqa: ALN043

ALN039 occurs 4 times

File:line Content
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/internal/business_logic/webhooks/fulfillment_events.py:5 ⧉ from components.fr.internal.queuing.config import MAIN_QUEUE # noqa: ALN039, ALN043
components/shop/internal/business_logic/webhooks/order_events.py:5 ⧉ from components.fr.internal.queuing.config import MAIN_QUEUE # noqa: ALN039, ALN043