re-apply ruff TCH rules

This commit is contained in:
imperosol
2026-09-07 13:32:13 +02:00
parent d93afffbc3
commit 7bd79d1d55
63 changed files with 288 additions and 88 deletions
@@ -1,11 +1,14 @@
# Generated by Django 4.2.17 on 2024-12-08 13:30
from operator import attrgetter
from typing import TYPE_CHECKING
import django.db.models.deletion
from django.db import migrations, models
from django.db.migrations.state import StateApps
from django.db.models import Count
if TYPE_CHECKING:
from django.db.migrations.state import StateApps
def delete_duplicates(apps: StateApps, schema_editor):
"""Delete cards of users with more than one student cards.
@@ -1,7 +1,11 @@
# Generated by Django 4.2.17 on 2024-12-15 17:53
from typing import TYPE_CHECKING
from django.db import migrations, models
from django.db.migrations.state import StateApps
if TYPE_CHECKING:
from django.db.migrations.state import StateApps
def move_priority_to_order(apps: StateApps, schema_editor):
@@ -1,9 +1,13 @@
# Generated by Django 5.2.8 on 2025-11-19 17:59
from typing import TYPE_CHECKING
from django.db import migrations, models
from django.db.migrations.state import StateApps
from django.db.models import Case, When
if TYPE_CHECKING:
from django.db.migrations.state import StateApps
def migrate_selling_payment_method(apps: StateApps, schema_editor):
# 0 <=> SITH_ACCOUNT is the default value, so no need to migrate it
@@ -1,13 +1,16 @@
# Generated by Django 5.2.8 on 2026-02-10 15:40
from operator import attrgetter
from typing import TYPE_CHECKING
import django.utils.timezone
from django.db import migrations, models
from django.db.migrations.state import StateApps
from django.db.models import OuterRef, Subquery
from counter.models import Selling
if TYPE_CHECKING:
from django.db.migrations.state import StateApps
def apply_product_history_dates(apps: StateApps, schema_editor):
"""Approximate a posteriori the value of created_at and updated_at."""
+5 -1
View File
@@ -1,11 +1,15 @@
# Generated by Django 5.2.11 on 2026-02-18 13:30
from typing import TYPE_CHECKING
import django.db.models.deletion
from django.db import migrations, models
from django.db.migrations.state import StateApps
import counter.fields
if TYPE_CHECKING:
from django.db.migrations.state import StateApps
def migrate_prices(apps: StateApps, schema_editor):
Product = apps.get_model("counter", "Product")