Skip to content

Commit a444219

Browse files
committed
update packages
1 parent dca22bf commit a444219

4 files changed

Lines changed: 458 additions & 377 deletions

File tree

app/api/decks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@litestar.get("/decks/")
1515
async 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/")
5252
async 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/")
7676
async 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

8383
ROUTER: typing.Final = litestar.Router(

app/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def build_app() -> litestar.Litestar:
2323
bootstrap_config = dataclasses.replace(
2424
settings.api_bootstrapper_config,
2525
application_config=AppConfig(
26-
exception_handlers={ # type: ignore[invalid-argument-type]
26+
exception_handlers={ # ty: ignore[invalid-argument-type]
2727
DuplicateKeyError: exceptions.duplicate_key_error_handler,
2828
},
2929
route_handlers=[ROUTER],

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
@pytest.fixture
2121
async def app() -> typing.AsyncIterator[litestar.Litestar]:
2222
app_ = build_app()
23-
async with LifespanManager(app_): # type: ignore[arg-type]
23+
async with LifespanManager(app_): # ty: ignore[invalid-argument-type]
2424
yield app_
2525

2626

2727
@pytest.fixture
2828
async def client(app: litestar.Litestar) -> typing.AsyncIterator[AsyncClient]:
2929
async with AsyncClient(
30-
transport=ASGITransport(app=app), # type: ignore[arg-type]
30+
transport=ASGITransport(app=app), # ty: ignore[invalid-argument-type]
3131
base_url="http://test",
3232
) as client:
3333
yield client

0 commit comments

Comments
 (0)