Type defintions for use in refactoring for redaction changes (#6803)

* Bump signedjson to 1.1

... so that we can use the type definitions

* Fix breakage caused by upgrade to signedjson 1.1

Thanks, @illicitonion...
This commit is contained in:
Richard van der Hoff 2020-01-30 11:25:59 +00:00 committed by GitHub
parent a855b7c3a8
commit 5a246611e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 8 deletions

View file

@ -17,7 +17,7 @@ import re
import string
import sys
from collections import namedtuple
from typing import Dict, Tuple, TypeVar
from typing import Any, Dict, Tuple, TypeVar
import attr
from signedjson.key import decode_verify_key_bytes
@ -43,6 +43,11 @@ T = TypeVar("T")
StateMap = Dict[Tuple[str, str], T]
# the type of a JSON-serialisable dict. This could be made stronger, but it will
# do for now.
JsonDict = Dict[str, Any]
class Requester(
namedtuple(
"Requester", ["user", "access_token_id", "is_guest", "device_id", "app_service"]