style: formater le depot avec ruff format

QUA-002, premiere moitie. **Ce commit ne fait que reformater** : aucun
changement de comportement, aucune ligne de logique touchee. 72 fichiers,
4 restaient deja conformes. Il est isole exprès, pour que `git log -p` sur
les commits voisins reste lisible.

`quote-style = "preserve"` etait deja pose dans pyproject.toml, ce qui
evite le brassage guillemets simples / doubles : le diff porte sur les
retours a la ligne, l indentation des appels longs et les virgules
finales, pas sur le style de chaine.

Verification : 263 tests passent avant et apres, ruff check propre.

L activation en CI arrive dans le commit suivant, separement, pour que ce
diff-ci ne contienne rien d autre.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
GGThed
2026-08-08 15:53:10 -04:00
co-authored by Claude Opus 5
parent 2f40290f00
commit 7cec18c139
72 changed files with 2658 additions and 1449 deletions
+22 -18
View File
@@ -25,7 +25,10 @@ from app.extensions import db
def match_factory(app):
"""Create a tryout with one player_scrim match and one participant."""
from app.models import (
Match, MatchParticipant, Tryout, TryoutRegistration,
Match,
MatchParticipant,
Tryout,
TryoutRegistration,
)
def _make(owner_id, player_id, *, description=None, username=None):
@@ -39,24 +42,30 @@ def match_factory(app):
player.username = username
tryout = Tryout(
title='Spring tryout', game='Valorant', date=date(2030, 5, 1),
created_by=owner_id, status='upcoming',
title='Spring tryout',
game='Valorant',
date=date(2030, 5, 1),
created_by=owner_id,
status='upcoming',
)
db.session.add(tryout)
db.session.flush()
db.session.add(TryoutRegistration(
tryout_id=tryout.id, player_id=player_id))
db.session.add(TryoutRegistration(tryout_id=tryout.id, player_id=player_id))
match = Match(
tryout_id=tryout.id, title='Scrim A', description=description,
date=date(2030, 5, 2), start_time=time(18, 0), end_time=time(19, 0),
match_type='player_scrim', created_by=owner_id,
tryout_id=tryout.id,
title='Scrim A',
description=description,
date=date(2030, 5, 2),
start_time=time(18, 0),
end_time=time(19, 0),
match_type='player_scrim',
created_by=owner_id,
)
db.session.add(match)
db.session.flush()
db.session.add(MatchParticipant(
match_id=match.id, player_id=player_id))
db.session.add(MatchParticipant(match_id=match.id, player_id=player_id))
db.session.commit()
return tryout.id, match.id
@@ -68,9 +77,7 @@ def _match_event(payload):
class TestCalendarEventPayload:
def test_description_is_returned_verbatim(
self, app, client, as_role, make_user, match_factory
):
def test_description_is_returned_verbatim(self, app, client, as_role, make_user, match_factory):
player_id = make_user('player')
admin_id = as_role('admin')
match_factory(admin_id, player_id, description='Bring your own peripherals')
@@ -92,9 +99,7 @@ class TestCalendarEventPayload:
assert '<br>' not in props['description']
assert props['participants'] not in props['description']
def test_an_empty_description_stays_empty(
self, app, client, as_role, make_user, match_factory
):
def test_an_empty_description_stays_empty(self, app, client, as_role, make_user, match_factory):
player_id = make_user('player')
admin_id = as_role('admin')
match_factory(admin_id, player_id, description=None)
@@ -132,8 +137,7 @@ class TestLegacyHostileData:
):
player_id = make_user('player')
admin_id = as_role('admin')
match_factory(admin_id, player_id,
description='Normal text', username=self.PAYLOAD)
match_factory(admin_id, player_id, description='Normal text', username=self.PAYLOAD)
props = _match_event(client.get('/matches/api/events').get_json())['extendedProps']