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) @dataclass(init=False)
class BookData(ActivityObject): class BookData(ActivityObject):
""" shared fields for all book data and authors""" """ shared fields for all book data and authors"""
openlibraryKey: str = None openlibraryKey: str = None
inventaireId: str = None inventaireId: str = None
librarythingKey: str = None librarythingKey: str = None

View file

@ -49,7 +49,6 @@ class Connector(AbstractConnector):
Mapping("died", remote_field="wdt:P570", formatter=get_first), Mapping("died", remote_field="wdt:P570", formatter=get_first),
] + shared_mappings ] + shared_mappings
def get_remote_id(self, value): def get_remote_id(self, value):
""" convert an id/uri into a url """ """ convert an id/uri into a url """
return "{:s}?action=by-uris&uris={:s}".format(self.books_url, value) 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): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('bookwyrm', '0062_auto_20210406_1731'), ("bookwyrm", "0062_auto_20210406_1731"),
] ]
operations = [ operations = [
migrations.AddField( migrations.AddField(
model_name='author', model_name="author",
name='bnf_id', name="bnf_id",
field=bookwyrm.models.fields.CharField(blank=True, max_length=255, null=True), field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
), ),
migrations.AddField( migrations.AddField(
model_name='author', model_name="author",
name='gutenberg_id', name="gutenberg_id",
field=bookwyrm.models.fields.CharField(blank=True, max_length=255, null=True), field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
), ),
migrations.AddField( migrations.AddField(
model_name='author', model_name="author",
name='inventaire_id', name="inventaire_id",
field=bookwyrm.models.fields.CharField(blank=True, max_length=255, null=True), field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
), ),
migrations.AddField( migrations.AddField(
model_name='author', model_name="author",
name='isni', name="isni",
field=bookwyrm.models.fields.CharField(blank=True, max_length=255, null=True), field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
), ),
migrations.AddField( migrations.AddField(
model_name='author', model_name="author",
name='viaf_id', name="viaf_id",
field=bookwyrm.models.fields.CharField(blank=True, max_length=255, null=True), field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
), ),
migrations.AddField( migrations.AddField(
model_name='book', model_name="book",
name='bnf_id', name="bnf_id",
field=bookwyrm.models.fields.CharField(blank=True, max_length=255, null=True), field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
), ),
migrations.AddField( migrations.AddField(
model_name='book', model_name="book",
name='inventaire_id', name="inventaire_id",
field=bookwyrm.models.fields.CharField(blank=True, max_length=255, null=True), field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
), ),
] ]