mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-19 06:44:06 -04:00
Another batch of type annotations (#12726)
This commit is contained in:
parent
39bed28b28
commit
aec69d2481
11 changed files with 144 additions and 79 deletions
|
@ -16,6 +16,8 @@
|
|||
import logging
|
||||
import traceback
|
||||
from io import StringIO
|
||||
from types import TracebackType
|
||||
from typing import Optional, Tuple, Type
|
||||
|
||||
|
||||
class LogFormatter(logging.Formatter):
|
||||
|
@ -28,10 +30,14 @@ class LogFormatter(logging.Formatter):
|
|||
where it was caught are logged).
|
||||
"""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
def formatException(self, ei):
|
||||
def formatException(
|
||||
self,
|
||||
ei: Tuple[
|
||||
Optional[Type[BaseException]],
|
||||
Optional[BaseException],
|
||||
Optional[TracebackType],
|
||||
],
|
||||
) -> str:
|
||||
sio = StringIO()
|
||||
(typ, val, tb) = ei
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue