Stop sub-classing object (#8249)

This commit is contained in:
Patrick Cloke 2020-09-04 06:54:56 -04:00 committed by GitHub
parent 9f8abdcc38
commit c619253db8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
168 changed files with 293 additions and 292 deletions

View file

@ -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.