mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 07:06:41 +00:00
Type check fixes.
This commit is contained in:
parent
aca35a553d
commit
d8f176bb8f
@ -5,7 +5,17 @@ HTTP client that talks to the HTTP storage server.
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from typing import Union, Optional, Sequence, Mapping, BinaryIO, cast, TypedDict, Set
|
||||
from typing import (
|
||||
Union,
|
||||
Optional,
|
||||
Sequence,
|
||||
Mapping,
|
||||
BinaryIO,
|
||||
cast,
|
||||
TypedDict,
|
||||
Set,
|
||||
Dict,
|
||||
)
|
||||
from base64 import b64encode
|
||||
from io import BytesIO
|
||||
from os import SEEK_END
|
||||
@ -506,14 +516,14 @@ class StorageClientGeneral(object):
|
||||
url = self._client.relative_url("/storage/v1/version")
|
||||
response = await self._client.request("GET", url)
|
||||
decoded_response = cast(
|
||||
Mapping[bytes, object],
|
||||
Dict[bytes, object],
|
||||
await self._client.decode_cbor(response, _SCHEMAS["get_version"]),
|
||||
)
|
||||
# Add some features we know are true because the HTTP API
|
||||
# specification requires them and because other parts of the storage
|
||||
# client implementation assumes they will be present.
|
||||
cast(
|
||||
Mapping[bytes, object],
|
||||
Dict[bytes, object],
|
||||
decoded_response[b"http://allmydata.org/tahoe/protocols/storage/v1"],
|
||||
).update(
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user