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 ⧉", | 35 |
ALN043: You can only import things from a Component public module, see: https://www.notion.so/alaninsurance/Modular-monolith-a9d84f1318d34115bbd08b3648e5a587 ⧉", |
32 |
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 ⧉", |
37 |
| ALN027: This class checks that no protected attribute access is used. | 5 |
| ALN049: app is a globally shared fixture with the same controllers as the production one, registering blueprints will impact other tests | 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. | 9 |
Listing of files of the most critical ALN**¶
ALN069 occurs 35 times¶
| File:line | Content |
|---|---|
| components/shop/internal/business_logic/suppliers/weiss_optik/weiss_optik_catalog_synchronizer.py:13 ⧉ | 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:16 ⧉ | 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:19 ⧉ | from components.eyewear.internal.models.eyewear_contact_lens_product_variation import ( # 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/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 |
| 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:26 ⧉ | 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/public/auth/saleor_alaner_authorization.py:121 ⧉ | from components.fr.internal.models.alan_employee import ( # noqa: ALN039,ALN069 |
| components/shop/public/auth/saleor_alaner_authorization.py:124 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/invoice_documents.py:42 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/shop_favorites.py:26 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/shop_favorites.py:61 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/shop_favorites.py:98 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/saleor_checkout.py:31 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/saleor_checkout.py:57 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/saleor_checkout.py:107 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/testimonial.py:24 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039, ALN069 |
| components/shop/public/controllers/testimonial.py:91 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039, ALN069 |
| components/shop/public/controllers/shop_user.py:36 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/shop_user.py:76 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/shop_user.py:101 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/shop_user.py:144 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/tests/test_invoice_documents.py:15 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/tests/test_admin_testimonial_smorest_migration.py:17 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039, ALN069 |
| components/shop/public/controllers/tests/test_shop_favorites_smorest_migration.py:19 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/tests/test_admin_cancellation_mail_smorest_migration.py:18 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039, ALN069 |
| components/shop/public/controllers/tests/test_admin_vouchers.py:22 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039, ALN069 |
| components/shop/public/controllers/tests/test_saleor_checkout_migration.py:26 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/tests/test_shop_user_smorest_migration.py:23 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/tests/test_shop_user_smorest_migration.py:45 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/tests/test_admin_order.py:20 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039, ALN069 |
| components/shop/public/controllers/tests/test_testimonial_smorest_migration.py:17 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039, ALN069 |
| components/shop/public/controllers/tests/test_saleor_admin_token_smorest_migration.py:20 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
ALN043 occurs 32 times¶
| File:line | Content |
|---|---|
| components/shop/internal/business_logic/webhooks/order_events.py:5 ⧉ | from components.fr.internal.queuing.config import MAIN_QUEUE # noqa: ALN043 |
| components/shop/internal/business_logic/webhooks/fulfillment_events.py:5 ⧉ | from components.fr.internal.queuing.config import MAIN_QUEUE # noqa: ALN043 |
| components/shop/internal/business_logic/suppliers/supplier_action_manager.py:6 ⧉ | 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:8 ⧉ | from components.eyewear.internal.enums import ( # noqa: ALN043 |
| components/shop/internal/business_logic/suppliers/weiss_optik/weiss_optik_catalog_synchronizer.py:1090 ⧉ | from components.eyewear.internal.helpers.assets import ( # noqa: ALN043 |
| components/shop/internal/business_logic/suppliers/weiss_optik/weiss_optik_catalog_synchronizer.py:2034 ⧉ | from components.eyewear.internal.business_logic.admin_business_logic.contact_lens_order import ( # noqa: ALN043 |
| 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/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/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:15 ⧉ | from components.eyewear.internal.helpers.dashboards import ( # noqa: ALN043 |
| components/shop/internal/business_logic/admin_business_logic/process_partner_invoice.py:3 ⧉ | from components.fr.internal.shareable_features.permissions 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/admin_business_logic/parcel_label.py:14 ⧉ | 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:15 ⧉ | from components.fr.internal.tests.factories.user import ( # noqa: ALN043 |
| components/shop/tests/commands/send_test_cancellation_email.py:80 ⧉ | from components.fr.internal.mail.mailer import MailerParams # noqa: ALN043 |
| components/shop/tests/commands/send_test_cancellation_email.py:81 ⧉ | from components.fr.internal.mail.personalization import ( # noqa: ALN043 |
| components/shop/public/controllers/invoicing.py:7 ⧉ | from components.fr.internal.queuing.config import MAIN_QUEUE # noqa: ALN039, ALN043 |
| components/shop/public/controllers/admin_testimonial.py:69 ⧉ | from components.fr.internal.shareable_features.query import ( # noqa: ALN039,ALN043 |
| components/shop/public/controllers/tests/test_shop_favorites_smorest_migration.py:7 ⧉ | from components.fr.internal.controllers.tests.helpers import ( # noqa: ALN039,ALN043 |
| components/shop/public/controllers/tests/test_shop_favorites_smorest_migration.py:10 ⧉ | from components.fr.internal.tests.factories.user import ( # noqa: ALN039,ALN043 |
| components/shop/public/controllers/tests/test_saleor_checkout_migration.py:7 ⧉ | from components.fr.internal.controllers.tests.helpers import ( # noqa: ALN039,ALN043 |
| components/shop/public/controllers/tests/test_saleor_checkout_migration.py:10 ⧉ | from components.fr.internal.tests.factories.user import ( # noqa: ALN039,ALN043 |
| components/shop/public/controllers/tests/test_shop_user_smorest_migration.py:5 ⧉ | from components.fr.internal.controllers.tests.helpers import ( # noqa: ALN039,ALN043 |
| components/shop/public/controllers/tests/test_shop_user_smorest_migration.py:8 ⧉ | from components.fr.internal.tests.factories.user import ( # noqa: ALN039,ALN043 |
| components/shop/public/controllers/tests/test_testimonial_smorest_migration.py:7 ⧉ | from components.fr.internal.controllers.tests.helpers import ( # noqa: ALN039,ALN043 |
| components/shop/public/controllers/tests/test_testimonial_smorest_migration.py:10 ⧉ | from components.fr.internal.tests.factories.user import ( # noqa: ALN039,ALN043 |
ALN039 occurs 37 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/auth/saleor_alaner_authorization.py:121 ⧉ | from components.fr.internal.models.alan_employee import ( # noqa: ALN039,ALN069 |
| components/shop/public/auth/saleor_alaner_authorization.py:124 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/invoice_documents.py:42 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/invoicing.py:7 ⧉ | from components.fr.internal.queuing.config import MAIN_QUEUE # noqa: ALN039, ALN043 |
| components/shop/public/controllers/shop_favorites.py:26 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/shop_favorites.py:61 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/shop_favorites.py:98 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/saleor_checkout.py:31 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/saleor_checkout.py:57 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/saleor_checkout.py:107 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/testimonial.py:24 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039, ALN069 |
| components/shop/public/controllers/testimonial.py:91 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039, ALN069 |
| components/shop/public/controllers/admin_testimonial.py:69 ⧉ | from components.fr.internal.shareable_features.query import ( # noqa: ALN039,ALN043 |
| components/shop/public/controllers/shop_user.py:36 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/shop_user.py:76 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/shop_user.py:101 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/shop_user.py:144 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/tests/test_invoice_documents.py:15 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/tests/test_admin_testimonial_smorest_migration.py:17 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039, ALN069 |
| components/shop/public/controllers/tests/test_shop_favorites_smorest_migration.py:7 ⧉ | from components.fr.internal.controllers.tests.helpers import ( # noqa: ALN039,ALN043 |
| components/shop/public/controllers/tests/test_shop_favorites_smorest_migration.py:10 ⧉ | from components.fr.internal.tests.factories.user import ( # noqa: ALN039,ALN043 |
| components/shop/public/controllers/tests/test_shop_favorites_smorest_migration.py:19 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/tests/test_admin_cancellation_mail_smorest_migration.py:18 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039, ALN069 |
| components/shop/public/controllers/tests/test_admin_vouchers.py:22 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039, ALN069 |
| components/shop/public/controllers/tests/test_saleor_checkout_migration.py:7 ⧉ | from components.fr.internal.controllers.tests.helpers import ( # noqa: ALN039,ALN043 |
| components/shop/public/controllers/tests/test_saleor_checkout_migration.py:10 ⧉ | from components.fr.internal.tests.factories.user import ( # noqa: ALN039,ALN043 |
| components/shop/public/controllers/tests/test_saleor_checkout_migration.py:26 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/tests/test_shop_user_smorest_migration.py:5 ⧉ | from components.fr.internal.controllers.tests.helpers import ( # noqa: ALN039,ALN043 |
| components/shop/public/controllers/tests/test_shop_user_smorest_migration.py:8 ⧉ | from components.fr.internal.tests.factories.user import ( # noqa: ALN039,ALN043 |
| components/shop/public/controllers/tests/test_shop_user_smorest_migration.py:23 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/tests/test_shop_user_smorest_migration.py:45 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |
| components/shop/public/controllers/tests/test_admin_order.py:20 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039, ALN069 |
| components/shop/public/controllers/tests/test_testimonial_smorest_migration.py:7 ⧉ | from components.fr.internal.controllers.tests.helpers import ( # noqa: ALN039,ALN043 |
| components/shop/public/controllers/tests/test_testimonial_smorest_migration.py:10 ⧉ | from components.fr.internal.tests.factories.user import ( # noqa: ALN039,ALN043 |
| components/shop/public/controllers/tests/test_testimonial_smorest_migration.py:17 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039, ALN069 |
| components/shop/public/controllers/tests/test_saleor_admin_token_smorest_migration.py:20 ⧉ | from components.fr.internal.models.user import User # noqa: ALN039,ALN069 |