mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-23 02:10:34 -04:00
Use auto_attribs/native type hints for attrs classes. (#11692)
This commit is contained in:
parent
b92a2ff797
commit
10a88ba91c
40 changed files with 300 additions and 307 deletions
|
@ -23,19 +23,19 @@ from synapse.types import JsonDict
|
|||
from synapse.util import json_encoder, stringutils
|
||||
|
||||
|
||||
@attr.s(slots=True)
|
||||
@attr.s(slots=True, auto_attribs=True)
|
||||
class UIAuthSessionData:
|
||||
session_id = attr.ib(type=str)
|
||||
session_id: str
|
||||
# The dictionary from the client root level, not the 'auth' key.
|
||||
clientdict = attr.ib(type=JsonDict)
|
||||
clientdict: JsonDict
|
||||
# The URI and method the session was intiatied with. These are checked at
|
||||
# each stage of the authentication to ensure that the asked for operation
|
||||
# has not changed.
|
||||
uri = attr.ib(type=str)
|
||||
method = attr.ib(type=str)
|
||||
uri: str
|
||||
method: str
|
||||
# A string description of the operation that the current authentication is
|
||||
# authorising.
|
||||
description = attr.ib(type=str)
|
||||
description: str
|
||||
|
||||
|
||||
class UIAuthWorkerStore(SQLBaseStore):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue