Skip to content

Commit 2e311fd

Browse files
Copilotevroon
andauthored
Fix pyrefly 1.2.0 type-check failure (#1811)
The backend Actions job failed after upgrading Pyrefly to 1.2.0, which rejected `NewType` identifiers as keys in the foreign-key validation lookup. - **Typing:** Update the lookup annotation to accept runtime `NewType` keys without changing behavior. ```python check_lookup: dict[Any, CheckCallableT] = { StageId: check_stage_belongs_to_tournament, TeamId: check_team_belongs_to_tournament, } ``` Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: evroon <11857441+evroon@users.noreply.github.com>
1 parent c242bb2 commit 2e311fd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

backend/bracket/sql/validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ async def check_foreign_keys_belong_to_tournament(
115115
"""
116116
stages = await get_full_tournament_details(tournament_id)
117117

118-
check_lookup: dict[type[Any], CheckCallableT] = { # pyrefly: ignore [bad-assignment]
118+
check_lookup: dict[Any, CheckCallableT] = {
119119
StageId: check_stage_belongs_to_tournament,
120120
TeamId: check_team_belongs_to_tournament,
121121
StageItemId: check_stage_item_belongs_to_tournament,

0 commit comments

Comments
 (0)