mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 22:14:55 -04:00
Stop sub-classing object (#8249)
This commit is contained in:
parent
9f8abdcc38
commit
c619253db8
168 changed files with 293 additions and 292 deletions
|
@ -74,7 +74,7 @@ except Exception:
|
|||
get_thread_id = threading.get_ident
|
||||
|
||||
|
||||
class ContextResourceUsage(object):
|
||||
class ContextResourceUsage:
|
||||
"""Object for tracking the resources used by a log context
|
||||
|
||||
Attributes:
|
||||
|
@ -179,7 +179,7 @@ class ContextResourceUsage(object):
|
|||
LoggingContextOrSentinel = Union["LoggingContext", "_Sentinel"]
|
||||
|
||||
|
||||
class _Sentinel(object):
|
||||
class _Sentinel:
|
||||
"""Sentinel to represent the root context"""
|
||||
|
||||
__slots__ = ["previous_context", "finished", "request", "scope", "tag"]
|
||||
|
@ -226,7 +226,7 @@ class _Sentinel(object):
|
|||
SENTINEL_CONTEXT = _Sentinel()
|
||||
|
||||
|
||||
class LoggingContext(object):
|
||||
class LoggingContext:
|
||||
"""Additional context for log formatting. Contexts are scoped within a
|
||||
"with" block.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue