From 30c9ec9611530ee8d98eaef8fc046c5e514d9f28 Mon Sep 17 00:00:00 2001 From: Carlos Camara Date: Thu, 4 Jan 2024 11:28:17 +0100 Subject: [PATCH] Prevent lint error See @hughrun 's explanation https://github.com/bookwyrm-social/bookwyrm/pull/3189#issuecomment-1876145423 --- bookwyrm/tests/views/preferences/test_export.py | 4 +++- bookwyrm/views/preferences/export.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bookwyrm/tests/views/preferences/test_export.py b/bookwyrm/tests/views/preferences/test_export.py index d633ae952..2ef0f96fb 100644 --- a/bookwyrm/tests/views/preferences/test_export.py +++ b/bookwyrm/tests/views/preferences/test_export.py @@ -38,6 +38,8 @@ class ExportViews(TestCase): parent_work=self.work, isbn_13="9781234567890", bnf_id="beep", + start_date="2023-01-04", + finish_date="2024-01-04" ) def setUp(self): @@ -68,5 +70,5 @@ class ExportViews(TestCase): export.content, b"title,author_text,remote_id,openlibrary_key,inventaire_id,librarything_key,goodreads_key,bnf_id,viaf,wikidata,asin,aasin,isfdb,isbn_10,isbn_13,oclc_number,start_date,finish_date,stopped_date,rating,review_name,review_cw,review_content\r\nTest Book,," + self.book.remote_id.encode("utf-8") - + b",,,,,beep,,,,,,123456789X,9781234567890,,,,,,,,\r\n", + + b",,,,,beep,,,,,,123456789X,9781234567890,,,2023-01-04,2024-01-04,,,,\r\n", ) diff --git a/bookwyrm/views/preferences/export.py b/bookwyrm/views/preferences/export.py index c8badbc8c..2450a427d 100644 --- a/bookwyrm/views/preferences/export.py +++ b/bookwyrm/views/preferences/export.py @@ -103,7 +103,7 @@ class Export(View): ) -# pylint: disable=no-self-use +# pylint: disable=no-self-use,too-many-locals @method_decorator(login_required, name="dispatch") class ExportUser(View): """Let users export user data to import into another Bookwyrm instance"""