Skip to content

Commit e10b92a

Browse files
committed
remove useless comments
1 parent 62e0912 commit e10b92a

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

stackcoin/stackcoin/client.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ def __init__(
5656
timeout=timeout,
5757
)
5858

59-
# -- context manager -------------------------------------------------- #
60-
6159
async def __aenter__(self) -> Client:
6260
return self
6361

@@ -73,8 +71,6 @@ async def close(self) -> None:
7371
"""Close the underlying HTTP connection pool."""
7472
await self._http.aclose()
7573

76-
# -- shared helpers --------------------------------------------------- #
77-
7874
@staticmethod
7975
def _raise_for_error(resp: httpx.Response) -> None:
8076
"""Raise :class:`StackCoinError` on any 4xx/5xx response."""
@@ -87,8 +83,6 @@ def _raise_for_error(resp: httpx.Response) -> None:
8783
message = body.get("message")
8884
raise StackCoinError(resp.status_code, error, message)
8985

90-
# -- users ------------------------------------------------------------ #
91-
9286
async def get_me(self) -> User:
9387
"""Return the authenticated user's profile."""
9488
resp = await self._http.get("/api/user/me")
@@ -111,8 +105,6 @@ async def get_users(self, *, discord_id: str | None = None) -> list[User]:
111105
wrapper = UsersResponse.model_validate(resp.json())
112106
return wrapper.users or []
113107

114-
# -- send ------------------------------------------------------------- #
115-
116108
async def send(
117109
self,
118110
to_user_id: int,
@@ -136,8 +128,6 @@ async def send(
136128
self._raise_for_error(resp)
137129
return SendStkResponse.model_validate(resp.json())
138130

139-
# -- requests --------------------------------------------------------- #
140-
141131
async def create_request(
142132
self,
143133
to_user_id: int,
@@ -189,8 +179,6 @@ async def deny_request(self, request_id: int) -> RequestActionResponse:
189179
self._raise_for_error(resp)
190180
return RequestActionResponse.model_validate(resp.json())
191181

192-
# -- transactions ----------------------------------------------------- #
193-
194182
async def get_transactions(self) -> list[Transaction]:
195183
"""Return transactions for the authenticated user."""
196184
resp = await self._http.get("/api/transactions")
@@ -204,8 +192,6 @@ async def get_transaction(self, transaction_id: int) -> Transaction:
204192
self._raise_for_error(resp)
205193
return Transaction.model_validate(resp.json())
206194

207-
# -- events ----------------------------------------------------------- #
208-
209195
async def get_events(self, *, since_id: int = 0) -> list[AnyEvent]:
210196
"""Return typed events since the given ID."""
211197
params: dict[str, Any] = {}
@@ -216,8 +202,6 @@ async def get_events(self, *, since_id: int = 0) -> list[AnyEvent]:
216202
wrapper = EventsResponse.model_validate(resp.json())
217203
return [e.root for e in wrapper.events]
218204

219-
# -- discord guilds --------------------------------------------------- #
220-
221205
async def get_discord_guilds(self) -> list[DiscordGuild]:
222206
"""Return all Discord guilds."""
223207
resp = await self._http.get("/api/discord/guilds")

0 commit comments

Comments
 (0)