Use inline type hints in http/federation/, storage/ and util/ (#10381)

This commit is contained in:
Jonathan de Jong 2021-07-15 18:46:54 +02:00 committed by GitHub
parent 3acf85c85f
commit bdfde6dca1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 149 additions and 161 deletions

View file

@ -41,7 +41,7 @@ def do_patch():
@functools.wraps(f)
def wrapped(*args, **kwargs):
start_context = current_context()
changes = [] # type: List[str]
changes: List[str] = []
orig = orig_inline_callbacks(_check_yield_points(f, changes))
try:
@ -131,7 +131,7 @@ def _check_yield_points(f: Callable, changes: List[str]):
gen = f(*args, **kwargs)
last_yield_line_no = gen.gi_frame.f_lineno
result = None # type: Any
result: Any = None
while True:
expected_context = current_context()