Runs black

This commit is contained in:
Mouse Reeve
2021-03-08 08:49:10 -08:00
parent a07f955781
commit 70296e760b
198 changed files with 10239 additions and 8572 deletions

View File

@ -1,70 +1,75 @@
''' book and author data '''
""" book and author data """
from dataclasses import dataclass, field
from typing import List
from .base_activity import ActivityObject
from .image import Image
@dataclass(init=False)
class Book(ActivityObject):
''' serializes an edition or work, abstract '''
""" serializes an edition or work, abstract """
title: str
sortTitle: str = ''
subtitle: str = ''
description: str = ''
sortTitle: str = ""
subtitle: str = ""
description: str = ""
languages: List[str] = field(default_factory=lambda: [])
series: str = ''
seriesNumber: str = ''
series: str = ""
seriesNumber: str = ""
subjects: List[str] = field(default_factory=lambda: [])
subjectPlaces: List[str] = field(default_factory=lambda: [])
authors: List[str] = field(default_factory=lambda: [])
firstPublishedDate: str = ''
publishedDate: str = ''
firstPublishedDate: str = ""
publishedDate: str = ""
openlibraryKey: str = ''
librarythingKey: str = ''
goodreadsKey: str = ''
openlibraryKey: str = ""
librarythingKey: str = ""
goodreadsKey: str = ""
cover: Image = None
type: str = 'Book'
type: str = "Book"
@dataclass(init=False)
class Edition(Book):
''' Edition instance of a book object '''
""" Edition instance of a book object """
work: str
isbn10: str = ''
isbn13: str = ''
oclcNumber: str = ''
asin: str = ''
isbn10: str = ""
isbn13: str = ""
oclcNumber: str = ""
asin: str = ""
pages: int = None
physicalFormat: str = ''
physicalFormat: str = ""
publishers: List[str] = field(default_factory=lambda: [])
editionRank: int = 0
type: str = 'Edition'
type: str = "Edition"
@dataclass(init=False)
class Work(Book):
''' work instance of a book object '''
lccn: str = ''
defaultEdition: str = ''
""" work instance of a book object """
lccn: str = ""
defaultEdition: str = ""
editions: List[str] = field(default_factory=lambda: [])
type: str = 'Work'
type: str = "Work"
@dataclass(init=False)
class Author(ActivityObject):
''' author of a book '''
""" author of a book """
name: str
born: str = None
died: str = None
aliases: List[str] = field(default_factory=lambda: [])
bio: str = ''
openlibraryKey: str = ''
librarythingKey: str = ''
goodreadsKey: str = ''
wikipediaLink: str = ''
type: str = 'Author'
bio: str = ""
openlibraryKey: str = ""
librarythingKey: str = ""
goodreadsKey: str = ""
wikipediaLink: str = ""
type: str = "Author"