Python formatting

This commit is contained in:
Mouse Reeve 2021-04-06 18:17:33 -07:00
parent ac27111f05
commit fec3d63e46
3 changed files with 37 additions and 23 deletions

View file

@ -9,6 +9,7 @@ from .image import Image
@dataclass(init=False)
class BookData(ActivityObject):
""" shared fields for all book data and authors"""
openlibraryKey: str = None
inventaireId: str = None
librarythingKey: str = None

View file

@ -49,7 +49,6 @@ class Connector(AbstractConnector):
Mapping("died", remote_field="wdt:P570", formatter=get_first),
] + shared_mappings
def get_remote_id(self, value):
""" convert an id/uri into a url """
return "{:s}?action=by-uris&uris={:s}".format(self.books_url, value)

View file

@ -7,43 +7,57 @@ from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('bookwyrm', '0062_auto_20210406_1731'),
("bookwyrm", "0062_auto_20210406_1731"),
]
operations = [
migrations.AddField(
model_name='author',
name='bnf_id',
field=bookwyrm.models.fields.CharField(blank=True, max_length=255, null=True),
model_name="author",
name="bnf_id",
field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
),
migrations.AddField(
model_name='author',
name='gutenberg_id',
field=bookwyrm.models.fields.CharField(blank=True, max_length=255, null=True),
model_name="author",
name="gutenberg_id",
field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
),
migrations.AddField(
model_name='author',
name='inventaire_id',
field=bookwyrm.models.fields.CharField(blank=True, max_length=255, null=True),
model_name="author",
name="inventaire_id",
field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
),
migrations.AddField(
model_name='author',
name='isni',
field=bookwyrm.models.fields.CharField(blank=True, max_length=255, null=True),
model_name="author",
name="isni",
field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
),
migrations.AddField(
model_name='author',
name='viaf_id',
field=bookwyrm.models.fields.CharField(blank=True, max_length=255, null=True),
model_name="author",
name="viaf_id",
field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
),
migrations.AddField(
model_name='book',
name='bnf_id',
field=bookwyrm.models.fields.CharField(blank=True, max_length=255, null=True),
model_name="book",
name="bnf_id",
field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
),
migrations.AddField(
model_name='book',
name='inventaire_id',
field=bookwyrm.models.fields.CharField(blank=True, max_length=255, null=True),
model_name="book",
name="inventaire_id",
field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
),
]