1414@litestar .get ("/decks/" )
1515async def list_decks (decks_repository : DecksRepository ) -> schemas .Decks :
1616 objects = await decks_repository .list ()
17- return schemas .Decks (items = objects ) # type : ignore[arg -type]
17+ return schemas .Decks (items = objects ) # ty : ignore[invalid-argument -type]
1818
1919
2020@litestar .get ("/decks/{deck_id:int}/" )
@@ -51,7 +51,7 @@ async def create_deck(data: schemas.DeckCreate, decks_repository: DecksRepositor
5151@litestar .get ("/decks/{deck_id:int}/cards/" )
5252async def list_cards (deck_id : int , cards_repository : CardsRepository ) -> schemas .Cards :
5353 objects = await cards_repository .list (models .Card .deck_id == deck_id )
54- return schemas .Cards (items = objects ) # type : ignore[arg -type]
54+ return schemas .Cards (items = objects ) # ty : ignore[invalid-argument -type]
5555
5656
5757@litestar .get ("/cards/{card_id:int}/" , return_dto = PydanticDTO [schemas .Card ])
@@ -69,15 +69,15 @@ async def create_cards(
6969 objects = await cards_repository .create_many (
7070 data = [models .Card (** card .model_dump (), deck_id = deck_id ) for card in data ],
7171 )
72- return schemas .Cards (items = objects ) # type : ignore[arg -type]
72+ return schemas .Cards (items = objects ) # ty : ignore[invalid-argument -type]
7373
7474
7575@litestar .put ("/decks/{deck_id:int}/cards/" )
7676async def update_cards (deck_id : int , data : list [schemas .Card ], cards_repository : CardsRepository ) -> schemas .Cards :
7777 objects = await cards_repository .upsert_many (
7878 data = [models .Card (** card .model_dump (exclude = {"deck_id" }), deck_id = deck_id ) for card in data ],
7979 )
80- return schemas .Cards (items = objects ) # type : ignore[arg -type]
80+ return schemas .Cards (items = objects ) # ty : ignore[invalid-argument -type]
8181
8282
8383ROUTER : typing .Final = litestar .Router (
0 commit comments