Skip to content

Commit 55da69a

Browse files
ci: weekly check. (#1272)
* ci: weekly check. updates: - [github.com/psf/black: 22.12.0 → 23.1.0](psf/black@22.12.0...23.1.0) * ci: correct from checks. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent c890be5 commit 55da69a

File tree

17 files changed

+1
-34
lines changed

17 files changed

+1
-34
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repos:
2929
- id: check-merge-conflict
3030
name: Merge Conflicts
3131
- repo: https://github.com/psf/black
32-
rev: 22.12.0
32+
rev: 23.1.0
3333
hooks:
3434
- id: black
3535
name: Black Formatting

interactions/api/cache.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ def merge(self, item: _T, id: Optional["Key"] = None) -> None:
6666
continue
6767
# we can only assume that discord did not provide it, falsely deleting is worse than not deleting
6868
if getattr(old_item, attrib) != getattr(item, attrib):
69-
7069
if isinstance(getattr(item, attrib), list) and not isinstance(
7170
getattr(old_item, attrib), list
7271
): # could be None

interactions/api/dispatch.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def dispatch(self, name: str, /, *args, **kwargs) -> None:
3737
if converters := getattr(event, "_converters", None):
3838
_kwargs = kwargs.copy()
3939
for key, value in _kwargs.items():
40-
4140
if key in converters.keys():
4241
del kwargs[key]
4342
kwargs[converters[key]] = value

interactions/api/error.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,6 @@ def __init__(self, code: int = 0, message: str = None, severity: int = 0, **kwar
317317
self.log(self.message)
318318

319319
if _fmt_error:
320-
321320
_flag: bool = (
322321
self.message.lower() in self.lookup(self.code).lower()
323322
) # creativity is hard

interactions/api/gateway/client.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ async def _manage_heartbeat(self) -> None:
241241
"""Manages the heartbeat loop."""
242242
log.debug(f"Sending heartbeat every {self.__heartbeater.delay / 1000} seconds...")
243243
while not self.__heartbeat_event.is_set():
244-
245244
log.debug("Sending heartbeat...")
246245
if not self.__heartbeater.event.is_set():
247246
log.debug("HEARTBEAT_ACK missing, reconnecting...")
@@ -967,7 +966,6 @@ async def __receive_packet(self, ignore_lock: bool = False) -> Optional[Dict[str
967966
buffer = bytearray()
968967

969968
while True:
970-
971969
if not ignore_lock:
972970
# meaning if we're reconnecting or something because of tasks
973971
await self.__closed.wait()
@@ -1007,7 +1005,6 @@ async def __receive_packet(self, ignore_lock: bool = False) -> Optional[Dict[str
10071005
await self._reconnect(True)
10081006

10091007
elif packet.type == WSMsgType.CLOSING:
1010-
10111008
if ignore_lock:
10121009
raise LibraryException(
10131010
message="Discord unexpectedly closing on receiving by force.", severity=50
@@ -1065,7 +1062,6 @@ async def _send_packet(self, data: Dict[str, Any]) -> None:
10651062
await self._client.send_str(packet)
10661063
else:
10671064
async with self.reconnect_lock: # needs to lock while it reconnects.
1068-
10691065
if data["op"] != OpCodeType.HEARTBEAT.value:
10701066
# This is because the ratelimiter limits already accounts for this.
10711067
await self._ratelimiter.block()

interactions/api/http/interaction.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ async def create_interaction_response(
236236

237237
file_data = None
238238
if files:
239-
240239
file_data = MultipartWriter("form-data")
241240
part = file_data.append_json(data)
242241
part.set_content_disposition("form-data", name="payload_json")
@@ -295,7 +294,6 @@ async def edit_interaction_response(
295294
# ^ again, I don't know if python will let me
296295
file_data = None
297296
if files:
298-
299297
file_data = MultipartWriter("form-data")
300298
part = file_data.append_json(data)
301299
part.set_content_disposition("form-data", name="payload_json")

interactions/api/http/message.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ async def create_message(
8484

8585
data = None
8686
if files is not MISSING and len(files) > 0:
87-
8887
data = MultipartWriter("form-data")
8988
part = data.append_json(payload)
9089
part.set_content_disposition("form-data", name="payload_json")
@@ -172,7 +171,6 @@ async def edit_message(
172171
"""
173172
data = None
174173
if files is not MISSING and len(files) > 0:
175-
176174
data = MultipartWriter("form-data")
177175
part = data.append_json(payload)
178176
part.set_content_disposition("form-data", name="payload_json")

interactions/api/http/thread.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ async def create_thread_in_forum(
231231

232232
data = None
233233
if files is not MISSING and files and len(files) > 0: # edge case `None`
234-
235234
data = MultipartWriter("form-data")
236235
part = data.append_json(payload)
237236
part.set_content_disposition("form-data", name="payload_json")

interactions/api/http/user.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111

1212
class UserRequest:
13-
1413
_req: _Request
1514
cache: Cache
1615

interactions/api/http/webhook.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313

1414
class WebhookRequest:
15-
1615
_req: _Request
1716
cache: Cache
1817

@@ -121,7 +120,6 @@ async def execute_webhook(
121120

122121
data = None
123122
if files is not MISSING and len(files) > 0:
124-
125123
data = MultipartWriter("form-data")
126124
part = data.append_json(payload)
127125
part.set_content_disposition("form-data", name="payload_json")

0 commit comments

Comments
 (0)