mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-17 16:30:23 -04:00
Add types to synapse.util. (#10601)
This commit is contained in:
parent
ceab5a4bfa
commit
524b8ead77
41 changed files with 400 additions and 253 deletions
|
@ -24,7 +24,7 @@ from twisted.python.failure import Failure
|
|||
_already_patched = False
|
||||
|
||||
|
||||
def do_patch():
|
||||
def do_patch() -> None:
|
||||
"""
|
||||
Patch defer.inlineCallbacks so that it checks the state of the logcontext on exit
|
||||
"""
|
||||
|
@ -107,7 +107,7 @@ def do_patch():
|
|||
_already_patched = True
|
||||
|
||||
|
||||
def _check_yield_points(f: Callable, changes: List[str]):
|
||||
def _check_yield_points(f: Callable, changes: List[str]) -> Callable:
|
||||
"""Wraps a generator that is about to be passed to defer.inlineCallbacks
|
||||
checking that after every yield the log contexts are correct.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue