Runs black
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
''' defines activitypub collections (lists) '''
|
||||
""" defines activitypub collections (lists) """
|
||||
from dataclasses import dataclass, field
|
||||
from typing import List
|
||||
|
||||
@ -7,38 +7,46 @@ from .base_activity import ActivityObject
|
||||
|
||||
@dataclass(init=False)
|
||||
class OrderedCollection(ActivityObject):
|
||||
''' structure of an ordered collection activity '''
|
||||
""" structure of an ordered collection activity """
|
||||
|
||||
totalItems: int
|
||||
first: str
|
||||
last: str = None
|
||||
name: str = None
|
||||
owner: str = None
|
||||
type: str = 'OrderedCollection'
|
||||
type: str = "OrderedCollection"
|
||||
|
||||
|
||||
@dataclass(init=False)
|
||||
class OrderedCollectionPrivate(OrderedCollection):
|
||||
''' an ordered collection with privacy settings '''
|
||||
""" an ordered collection with privacy settings """
|
||||
|
||||
to: List[str] = field(default_factory=lambda: [])
|
||||
cc: List[str] = field(default_factory=lambda: [])
|
||||
|
||||
|
||||
@dataclass(init=False)
|
||||
class Shelf(OrderedCollectionPrivate):
|
||||
''' structure of an ordered collection activity '''
|
||||
type: str = 'Shelf'
|
||||
""" structure of an ordered collection activity """
|
||||
|
||||
type: str = "Shelf"
|
||||
|
||||
|
||||
@dataclass(init=False)
|
||||
class BookList(OrderedCollectionPrivate):
|
||||
''' structure of an ordered collection activity '''
|
||||
""" structure of an ordered collection activity """
|
||||
|
||||
summary: str = None
|
||||
curation: str = 'closed'
|
||||
type: str = 'BookList'
|
||||
curation: str = "closed"
|
||||
type: str = "BookList"
|
||||
|
||||
|
||||
@dataclass(init=False)
|
||||
class OrderedCollectionPage(ActivityObject):
|
||||
''' structure of an ordered collection activity '''
|
||||
""" structure of an ordered collection activity """
|
||||
|
||||
partOf: str
|
||||
orderedItems: List
|
||||
next: str = None
|
||||
prev: str = None
|
||||
type: str = 'OrderedCollectionPage'
|
||||
type: str = "OrderedCollectionPage"
|
||||
|
Reference in New Issue
Block a user