mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-07 10:56:49 +00:00
Minor type annotation improvements.
This commit is contained in:
parent
2bc8cdf852
commit
9db5a397e1
@ -2,6 +2,8 @@
|
||||
HTTP client that talks to the HTTP storage server.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Union, Set, Optional
|
||||
|
||||
from base64 import b64encode
|
||||
@ -214,7 +216,7 @@ class StorageClient(object):
|
||||
self._treq = treq
|
||||
|
||||
@classmethod
|
||||
def from_nurl(cls, nurl: DecodedURL, reactor, persistent: bool = True) -> "StorageClient":
|
||||
def from_nurl(cls, nurl: DecodedURL, reactor, persistent: bool = True) -> StorageClient:
|
||||
"""
|
||||
Create a ``StorageClient`` for the given NURL.
|
||||
|
||||
|
@ -27,7 +27,7 @@ def get_content_type(headers: Headers) -> Optional[str]:
|
||||
return content_type
|
||||
|
||||
|
||||
def swissnum_auth_header(swissnum): # type: (bytes) -> bytes
|
||||
def swissnum_auth_header(swissnum: bytes) -> bytes:
|
||||
"""Return value for ``Authentication`` header."""
|
||||
return b"Tahoe-LAFS " + b64encode(swissnum).strip()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user