mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-01 13:46:06 -04:00
Misc typing fixes for tests
, part 1 of N (#11323)
* Annotate HomeserverTestCase.servlets * Correct annotation of federation_auth_origin * Use AnyStr custom_headers instead of a Union This allows (str, str) and (bytes, bytes). This disallows (str, bytes) and (bytes, str) * DomainSpecificString.SIGIL is a ClassVar
This commit is contained in:
parent
95547e5300
commit
4c96ce396e
7 changed files with 53 additions and 29 deletions
|
@ -16,7 +16,16 @@ import json
|
|||
import logging
|
||||
from collections import deque
|
||||
from io import SEEK_END, BytesIO
|
||||
from typing import Callable, Dict, Iterable, MutableMapping, Optional, Tuple, Union
|
||||
from typing import (
|
||||
AnyStr,
|
||||
Callable,
|
||||
Dict,
|
||||
Iterable,
|
||||
MutableMapping,
|
||||
Optional,
|
||||
Tuple,
|
||||
Union,
|
||||
)
|
||||
|
||||
import attr
|
||||
from typing_extensions import Deque
|
||||
|
@ -222,9 +231,7 @@ def make_request(
|
|||
federation_auth_origin: Optional[bytes] = None,
|
||||
content_is_form: bool = False,
|
||||
await_result: bool = True,
|
||||
custom_headers: Optional[
|
||||
Iterable[Tuple[Union[bytes, str], Union[bytes, str]]]
|
||||
] = None,
|
||||
custom_headers: Optional[Iterable[Tuple[AnyStr, AnyStr]]] = None,
|
||||
client_ip: str = "127.0.0.1",
|
||||
) -> FakeChannel:
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue