Skip to content

Commit 7b95ae0

Browse files
committed
update: use latest ruff and mypy
1 parent ce02fc2 commit 7b95ae0

File tree

4 files changed

+40
-42
lines changed

4 files changed

+40
-42
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ dependencies = [
2929

3030
[dependency-groups]
3131
dev = [
32-
"mypy[faster-cache]==1.16.0",
33-
"ruff==0.11.13",
32+
"mypy[faster-cache]==1.18.1",
33+
"ruff==0.13.0",
3434
"pytest==8.4.0",
3535
"pytest-cov==6.1.1",
3636
"pytest-asyncio==1.0.0",

src/ttt/entities/core/game/cell_number.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from dataclasses import dataclass
2-
from typing import ClassVar, cast
2+
from typing import ClassVar
33

44
from ttt.entities.math.vector import Vector
55
from ttt.entities.tools.assertion import assert_, not_none
@@ -44,9 +44,9 @@ def __int__(self) -> int:
4444
@classmethod
4545
def of_board_position(cls, board_position: Vector) -> "CellNumber":
4646
int_ = CellNumber._int_by_board_position.get(board_position)
47-
int_ = cast(int, not_none(int_, InvalidCellNumberError))
47+
int_ = not_none(int_, InvalidCellNumberError)
4848

4949
return CellNumber(int_)
5050

5151
def board_position(self) -> "Vector":
52-
return cast(Vector, CellNumber._board_position_by_int[int(self)])
52+
return CellNumber._board_position_by_int[int(self)]

src/ttt/infrastructure/nats/paid_stars_purchase_payment_inbox.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from collections.abc import AsyncIterator
22
from dataclasses import dataclass, field
33
from types import TracebackType
4-
from typing import ClassVar, Self, cast
4+
from typing import ClassVar, Self
55

66
from nats.js import JetStreamContext
77
from pydantic import TypeAdapter
@@ -39,7 +39,4 @@ async def push(self, payment: PaidStarsPurchasePayment) -> None:
3939

4040
async def __aiter__(self) -> AsyncIterator[PaidStarsPurchasePayment]:
4141
async for message in at_least_once_messages(self._subscription):
42-
yield cast(
43-
PaidStarsPurchasePayment,
44-
self._adapter.validate_json(message.data),
45-
)
42+
yield self._adapter.validate_json(message.data)

uv.lock

Lines changed: 33 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)