Drop the redundant 'X as X' import aliases

The 'import X as X' form is the explicit-re-export idiom for mypy's
no_implicit_reexport, which this repo doesn't enable (commented out in
mypy.ini), so plain imports re-export just as well. ContextResourceUsage
is the one name not otherwise used in the module, so it keeps a noqa to
mark the intentional re-export for ruff.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JFbRtswu7rsHrttJFauUUb
This commit is contained in:
Erik Johnston
2026-07-16 16:00:28 +00:00
co-authored by Claude Fable 5
parent 429baac202
commit 7c4e749138
+7 -6
View File
@@ -53,12 +53,13 @@ from twisted.python.threadpool import ThreadPool
from synapse.logging.loggers import ExplicitlyConfiguredLogger
from synapse.synapse_rust.logcontext import (
DEBUG_LOGGER_NAME,
SENTINEL_CONTEXT as SENTINEL_CONTEXT,
ContextResourceUsage as ContextResourceUsage,
LoggingContext as LoggingContext,
_Sentinel as _Sentinel,
current_context as current_context,
set_current_context as set_current_context,
SENTINEL_CONTEXT,
# Not used in this module, but re-exported: callers import it from here.
ContextResourceUsage, # noqa: F401
LoggingContext,
_Sentinel,
current_context,
set_current_context,
)
from synapse.util.stringutils import random_string_insecure_fast