mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 05:28:04 +00:00
some more fixes for mypy
This commit is contained in:
parent
03674bd452
commit
f34e01649d
@ -19,7 +19,7 @@ from ...util.jsonbytes import dumps_bytes
|
||||
from ..common_util import run_cli
|
||||
from ..no_network import GridTestMixin
|
||||
from .common import CLITestMixin
|
||||
from .wormholetesting import IWormhole, MemoryWormholeServer, memory_server
|
||||
from .wormholetesting import IWormhole, MemoryWormholeServer, TestingHelper, memory_server
|
||||
|
||||
# Logically:
|
||||
# JSONable = dict[str, Union[JSONable, None, int, float, str, list[JSONable]]]
|
||||
|
@ -32,7 +32,7 @@ For example::
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Iterator, Optional, Sequence, Tuple
|
||||
from typing import Iterator, Optional, List, Tuple
|
||||
from collections.abc import Awaitable
|
||||
from inspect import getargspec
|
||||
from itertools import count
|
||||
@ -158,7 +158,7 @@ class _WormholeApp(object):
|
||||
appid/relay_url scope.
|
||||
"""
|
||||
wormholes: dict[WormholeCode, IWormhole] = field(default=Factory(dict))
|
||||
_waiting: dict[WormholeCode, Sequence[Deferred]] = field(default=Factory(dict))
|
||||
_waiting: dict[WormholeCode, List[Deferred]] = field(default=Factory(dict))
|
||||
_counter: Iterator[int] = field(default=Factory(count))
|
||||
|
||||
def allocate_code(self, wormhole: IWormhole, code: Optional[WormholeCode]) -> WormholeCode:
|
||||
@ -244,7 +244,7 @@ class _MemoryWormhole(object):
|
||||
)
|
||||
self._code = self._view.allocate_code(self, None)
|
||||
waiters = self._waiting_for_code
|
||||
self._waiting_for_code = None
|
||||
self._waiting_for_code = []
|
||||
for d in waiters:
|
||||
d.callback(self._code)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user