Some type annotations.

This commit is contained in:
Itamar Turner-Trauring 2021-11-16 11:09:08 -05:00
parent 41ec63f758
commit 671b670154

View File

@ -25,7 +25,7 @@ def _decode_cbor(response):
return fail(ClientException(response.code, response.phrase))
def swissnum_auth_header(swissnum):
def swissnum_auth_header(swissnum): # type: (bytes) -> bytes
"""Return value for ``Authentication`` header."""
return b"Tahoe-LAFS " + base64.encodestring(swissnum).strip()
@ -40,7 +40,7 @@ class StorageClient(object):
self._swissnum = swissnum
self._treq = treq
def _get_headers(self):
def _get_headers(self): # type: () -> Headers
"""Return the basic headers to be used by default."""
headers = Headers()
headers.addRawHeader(