mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 21:34:51 -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
|
@ -28,14 +28,14 @@ logger = logging.getLogger(__name__)
|
|||
MAX_LIMIT = 1000
|
||||
|
||||
|
||||
@attr.s(slots=True)
|
||||
@attr.s(slots=True, auto_attribs=True)
|
||||
class PaginationConfig:
|
||||
"""A configuration object which stores pagination parameters."""
|
||||
|
||||
from_token = attr.ib(type=Optional[StreamToken])
|
||||
to_token = attr.ib(type=Optional[StreamToken])
|
||||
direction = attr.ib(type=str)
|
||||
limit = attr.ib(type=Optional[int])
|
||||
from_token: Optional[StreamToken]
|
||||
to_token: Optional[StreamToken]
|
||||
direction: str
|
||||
limit: Optional[int]
|
||||
|
||||
@classmethod
|
||||
async def from_request(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue