Skip to content

Commit 0100cf0

Browse files
committed
fix: resolve unused-unpacked-variable (RUF059)
1 parent a89de33 commit 0100cf0

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ repos:
3030
- id: check-merge-conflict
3131
name: Merge Conflicts
3232
- repo: https://github.com/astral-sh/ruff-pre-commit
33-
rev: 'v0.11.10'
33+
rev: 'v0.14.6'
3434
hooks:
3535
- id: ruff
3636
args: [--fix, --exit-non-zero-on-fix]

interactions/client/auto_shard_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ async def _on_websocket_ready(self, event: events.RawGatewayEvent) -> None:
140140
"""
141141
connection_data = event.data
142142
expected_guilds = {to_snowflake(guild["id"]) for guild in connection_data["guilds"]}
143-
shard_id, total_shards = connection_data["shard"]
143+
shard_id, _ = connection_data["shard"]
144144
connection_state = next((state for state in self._connection_states if state.shard_id == shard_id), None)
145145

146146
if expected_guilds:

interactions/client/utils/cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def expire(self) -> None:
119119

120120
timestamp = time.monotonic()
121121
while True:
122-
key, item = self._first_item()
122+
_, item = self._first_item()
123123
if item.is_expired(timestamp):
124124
self._expire_first()
125125
else:

interactions/ext/sentry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def default_sentry_filter(event: dict[str, Any], hint: dict[str, Any]) -> Option
3737
return None
3838

3939
if "exc_info" in hint:
40-
exc_type, exc_value, tb = hint["exc_info"]
40+
exc_value = hint["exc_info"][1]
4141
if isinstance(exc_value, KeyboardInterrupt):
4242
# We don't need to report a ctrl+c
4343
return None

0 commit comments

Comments
 (0)