From 1e91f0a659fae3508e9b26143e165052b319ecce Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 3 May 2022 20:09:01 +0530 Subject: [PATCH] pep8 --- src/calibre/devices/kobo/books.py | 7 +++---- src/calibre/devices/kobo/driver.py | 3 +-- src/calibre/devices/kobo/kobotouch_config.py | 4 ---- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/calibre/devices/kobo/books.py b/src/calibre/devices/kobo/books.py index 73fde8d094..9e450bc845 100644 --- a/src/calibre/devices/kobo/books.py +++ b/src/calibre/devices/kobo/books.py @@ -2,15 +2,14 @@ __license__ = 'GPL v3' __copyright__ = '2010-2012, , Timothy Legge and David Forrester ' __docformat__ = 'restructuredtext en' -import os, time, sys -from functools import cmp_to_key +import os, time from calibre.constants import preferred_encoding, DEBUG from calibre import isbytestring from calibre.ebooks.metadata.book.base import Metadata from calibre.ebooks.metadata.book.formatter import SafeFormat -from calibre.devices.usbms.books import Book as Book_, CollectionsBookList, none_cmp +from calibre.devices.usbms.books import Book as Book_, CollectionsBookList from calibre.utils.config_base import prefs from calibre.devices.usbms.driver import debug_print from calibre.ebooks.metadata import author_to_author_sort @@ -263,7 +262,7 @@ class KTCollectionsBookList(CollectionsBookList): for category in val: # debug_print("KTCollectionsBookList:get_collections - category=", category) if doing_dc: - pass # No need to do anything with device_collections + pass # No need to do anything with device_collections elif fm is not None and fm['is_custom']: # is a custom field if fm['datatype'] == 'text' and len(category) > 1 and \ category[0] == '[' and category[-1] == ']': diff --git a/src/calibre/devices/kobo/driver.py b/src/calibre/devices/kobo/driver.py index 0f1b35fcf6..c0248e7c9e 100644 --- a/src/calibre/devices/kobo/driver.py +++ b/src/calibre/devices/kobo/driver.py @@ -2514,7 +2514,7 @@ class KOBOTOUCH(KOBO): collections = booklists.get_collections(collections_attributes, collections_template=self.collections_template, template_globals={ - 'serial_number': self.device_serial_no(), + 'serial_number': self.device_serial_no(), 'firmware_version': self.fwversion, 'display_firmware_version': self.display_fwversion, 'dbversion': self.dbversion, @@ -3889,7 +3889,6 @@ class KOBOTOUCH(KOBO): def has_activity_table(self): return self.dbversion >= self.min_dbversion_activity - def modify_database_check(self, function): # Checks to see whether the database version is supported # and whether the user has chosen to support the firmware version diff --git a/src/calibre/devices/kobo/kobotouch_config.py b/src/calibre/devices/kobo/kobotouch_config.py index 5365b22894..f24fa8490d 100644 --- a/src/calibre/devices/kobo/kobotouch_config.py +++ b/src/calibre/devices/kobo/kobotouch_config.py @@ -1,6 +1,5 @@ #!/usr/bin/env python - __license__ = 'GPL v3' __copyright__ = '2015-2019, Kovid Goyal ' __docformat__ = 'restructuredtext en' @@ -757,9 +756,6 @@ class MetadataGroupBox(DeviceOptionsGroupBox): return self.bookstats_timetoread_upper_template_edit.template -from calibre.gui2.dialogs.template_line_editor import TemplateLineEditor - - class TemplateConfig(QWidget): # {{{ def __init__(self, val, label=None, tooltip=None):