mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:56:06 -04:00
Use inline type hints in tests/
(#10350)
This PR is tantamount to running: python3.8 -m com2ann -v 6 tests/ (com2ann requires python 3.8 to run)
This commit is contained in:
parent
89cfc3dd98
commit
93729719b8
18 changed files with 62 additions and 63 deletions
|
@ -52,7 +52,7 @@ class FakeChannel:
|
|||
_reactor = attr.ib()
|
||||
result = attr.ib(type=dict, default=attr.Factory(dict))
|
||||
_ip = attr.ib(type=str, default="127.0.0.1")
|
||||
_producer = None # type: Optional[Union[IPullProducer, IPushProducer]]
|
||||
_producer: Optional[Union[IPullProducer, IPushProducer]] = None
|
||||
|
||||
@property
|
||||
def json_body(self):
|
||||
|
@ -316,8 +316,10 @@ class ThreadedMemoryReactorClock(MemoryReactorClock):
|
|||
|
||||
self._tcp_callbacks = {}
|
||||
self._udp = []
|
||||
lookups = self.lookups = {} # type: Dict[str, str]
|
||||
self._thread_callbacks = deque() # type: Deque[Callable[[], None]]
|
||||
self.lookups: Dict[str, str] = {}
|
||||
self._thread_callbacks: Deque[Callable[[], None]] = deque()
|
||||
|
||||
lookups = self.lookups
|
||||
|
||||
@implementer(IResolverSimple)
|
||||
class FakeResolver:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue