style(discord): trim rename comments

(cherry picked from commit c98bba083850baef0e0ba1d3844703fe8c795924)
This commit is contained in:
Benjamin Rousseau
2026-09-12 19:52:23 -04:00
committed by Teknium
parent fa787be2bd
commit 27180c8d2c
2 changed files with 2 additions and 7 deletions
+2 -5
View File
@@ -435,11 +435,8 @@ class GatewayTopicThreadsMixin:
copied_source = source
with suppress(Exception):
copied_source = dataclasses.replace(source)
# ``dataclasses.replace`` intentionally copies only declared fields.
# Preserve the in-process transport-owner ref that build_source()
# stamps on live inbound events; multiplex routed profiles need it
# for side effects such as Discord thread rename, because the
# runtime profile may not own the Discord adapter/token.
# Keep the live transport owner; multiplex routes may run under a
# profile that does not own the Discord adapter/token.
transport_ref = getattr(source, "_transport_adapter_ref", None)
if transport_ref is not None:
setattr(copied_source, "_transport_adapter_ref", transport_ref)
@@ -119,8 +119,6 @@ def test_title_thread_copy_preserves_transport_adapter_ref(monkeypatch):
return None
def fake_schedule(coro, loop, logger=None, log_message=None):
# The test only inspects the source passed into make_coro; close the
# coroutine so pytest does not warn about an unawaited object.
coro.close()
return None