chore: ruff format + fix

This commit is contained in:
Loïc Gremaud 2026-05-09 22:13:40 +02:00
parent 11229a3906
commit eb1eed852b
Signed by: Legrems
GPG Key ID: D4620E6DF3E0121D
14 changed files with 117 additions and 74 deletions

View File

@ -2,5 +2,5 @@ from django.apps import AppConfig
class AnimationsConfig(AppConfig): class AnimationsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField' default_auto_field = "django.db.models.BigAutoField"
name = 'animations' name = "animations"

View File

@ -4,23 +4,29 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
initial = True initial = True
dependencies = [ dependencies = []
]
operations = [ operations = [
migrations.CreateModel( migrations.CreateModel(
name='PuzzlePointsFactor', name="PuzzlePointsFactor",
fields=[ fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), (
('created_at', models.DateTimeField(auto_now_add=True)), "id",
('updated_at', models.DateTimeField(auto_now=True)), models.BigAutoField(
('cost', models.IntegerField()), auto_created=True,
('cycles', models.IntegerField()), primary_key=True,
('area', models.IntegerField()), serialize=False,
('special_notes', models.TextField(blank=True)), verbose_name="ID",
),
),
("created_at", models.DateTimeField(auto_now_add=True)),
("updated_at", models.DateTimeField(auto_now=True)),
("cost", models.IntegerField()),
("cycles", models.IntegerField()),
("area", models.IntegerField()),
("special_notes", models.TextField(blank=True)),
], ],
), ),
] ]

View File

@ -4,19 +4,26 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('animations', '0001_initial'), ("animations", "0001_initial"),
] ]
operations = [ operations = [
migrations.CreateModel( migrations.CreateModel(
name='PuzzlePointsValue', name="PuzzlePointsValue",
fields=[ fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), (
('created_at', models.DateTimeField(auto_now_add=True)), "id",
('updated_at', models.DateTimeField(auto_now=True)), models.BigAutoField(
('points', models.JSONField(default=[])), auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("created_at", models.DateTimeField(auto_now_add=True)),
("updated_at", models.DateTimeField(auto_now=True)),
("points", models.JSONField(default=[])),
], ],
), ),
] ]

View File

@ -0,0 +1,17 @@
# Generated by Django 5.2.7 on 2026-05-05 13:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("animations", "0002_puzzlepointsvalue"),
]
operations = [
migrations.AlterField(
model_name="puzzlepointsvalue",
name="points",
field=models.JSONField(default=list),
),
]

View File

@ -21,4 +21,4 @@ class PuzzlePointsValue(models.Model):
created_at = models.DateTimeField(auto_now_add=True) created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True) updated_at = models.DateTimeField(auto_now=True)
points = models.JSONField(default=[]) points = models.JSONField(default=list)

View File

@ -1,3 +1 @@
from django.test import TestCase
# Create your tests here. # Create your tests here.

View File

@ -1,3 +1 @@
from django.shortcuts import render
# Create your views here. # Create your views here.

View File

@ -27,7 +27,7 @@ class Command(BaseCommand):
api_key = SteamAPIKey.objects.filter(is_active=True).first() api_key = SteamAPIKey.objects.filter(is_active=True).first()
if not api_key: if not api_key:
self.stderr.write(f"No API key defined! Aborting...") self.stderr.write("No API key defined! Aborting...")
return return
self.stdout.write(f"Using api key: {api_key}") self.stdout.write(f"Using api key: {api_key}")

View File

@ -4,14 +4,13 @@ from django.db import migrations
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('submissions', '0007_submission_manual_validation_requested'), ("submissions", "0007_submission_manual_validation_requested"),
] ]
operations = [ operations = [
migrations.AlterUniqueTogether( migrations.AlterUniqueTogether(
name='puzzleresponse', name="puzzleresponse",
unique_together=set(), unique_together=set(),
), ),
] ]

View File

@ -5,16 +5,19 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('animations', '0001_initial'), ("animations", "0001_initial"),
('submissions', '0008_alter_puzzleresponse_unique_together'), ("submissions", "0008_alter_puzzleresponse_unique_together"),
] ]
operations = [ operations = [
migrations.AddField( migrations.AddField(
model_name='steamcollectionitem', model_name="steamcollectionitem",
name='points_factor', name="points_factor",
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='animations.puzzlepointsfactor'), field=models.ForeignKey(
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="animations.puzzlepointsfactor",
),
), ),
] ]

View File

@ -4,25 +4,30 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('submissions', '0009_steamcollectionitem_points_factor'), ("submissions", "0009_steamcollectionitem_points_factor"),
] ]
operations = [ operations = [
migrations.AlterField( migrations.AlterField(
model_name='puzzleresponse', model_name="puzzleresponse",
name='validated_area', name="validated_area",
field=models.IntegerField(blank=True, help_text='Manually validated area value'), field=models.IntegerField(
blank=True, help_text="Manually validated area value"
),
), ),
migrations.AlterField( migrations.AlterField(
model_name='puzzleresponse', model_name="puzzleresponse",
name='validated_cost', name="validated_cost",
field=models.IntegerField(blank=True, help_text='Manually validated cost value'), field=models.IntegerField(
blank=True, help_text="Manually validated cost value"
),
), ),
migrations.AlterField( migrations.AlterField(
model_name='puzzleresponse', model_name="puzzleresponse",
name='validated_cycles', name="validated_cycles",
field=models.IntegerField(blank=True, help_text='Manually validated cycles value'), field=models.IntegerField(
blank=True, help_text="Manually validated cycles value"
),
), ),
] ]

View File

@ -4,25 +4,24 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('submissions', '0010_alter_puzzleresponse_validated_area_and_more'), ("submissions", "0010_alter_puzzleresponse_validated_area_and_more"),
] ]
operations = [ operations = [
migrations.AlterField( migrations.AlterField(
model_name='puzzleresponse', model_name="puzzleresponse",
name='area', name="area",
field=models.IntegerField(blank=True, help_text='Area value from OCR'), field=models.IntegerField(blank=True, help_text="Area value from OCR"),
), ),
migrations.AlterField( migrations.AlterField(
model_name='puzzleresponse', model_name="puzzleresponse",
name='cost', name="cost",
field=models.IntegerField(blank=True, help_text='Cost value from OCR'), field=models.IntegerField(blank=True, help_text="Cost value from OCR"),
), ),
migrations.AlterField( migrations.AlterField(
model_name='puzzleresponse', model_name="puzzleresponse",
name='cycles', name="cycles",
field=models.IntegerField(blank=True, help_text='Cycles value from OCR'), field=models.IntegerField(blank=True, help_text="Cycles value from OCR"),
), ),
] ]

View File

@ -4,25 +4,33 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('submissions', '0011_alter_puzzleresponse_area_alter_puzzleresponse_cost_and_more'), (
"submissions",
"0011_alter_puzzleresponse_area_alter_puzzleresponse_cost_and_more",
),
] ]
operations = [ operations = [
migrations.AlterField( migrations.AlterField(
model_name='puzzleresponse', model_name="puzzleresponse",
name='validated_area', name="validated_area",
field=models.IntegerField(blank=True, help_text='Manually validated area value', null=True), field=models.IntegerField(
blank=True, help_text="Manually validated area value", null=True
),
), ),
migrations.AlterField( migrations.AlterField(
model_name='puzzleresponse', model_name="puzzleresponse",
name='validated_cost', name="validated_cost",
field=models.IntegerField(blank=True, help_text='Manually validated cost value', null=True), field=models.IntegerField(
blank=True, help_text="Manually validated cost value", null=True
),
), ),
migrations.AlterField( migrations.AlterField(
model_name='puzzleresponse', model_name="puzzleresponse",
name='validated_cycles', name="validated_cycles",
field=models.IntegerField(blank=True, help_text='Manually validated cycles value', null=True), field=models.IntegerField(
blank=True, help_text="Manually validated cycles value", null=True
),
), ),
] ]

View File

@ -5,16 +5,19 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('animations', '0002_puzzlepointsvalue'), ("animations", "0002_puzzlepointsvalue"),
('submissions', '0012_alter_puzzleresponse_validated_area_and_more'), ("submissions", "0012_alter_puzzleresponse_validated_area_and_more"),
] ]
operations = [ operations = [
migrations.AddField( migrations.AddField(
model_name='steamcollectionitem', model_name="steamcollectionitem",
name='points_value', name="points_value",
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='animations.puzzlepointsvalue'), field=models.ForeignKey(
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="animations.puzzlepointsvalue",
),
), ),
] ]