diff --git a/manual/plugin_examples/editor_demo/__init__.py b/manual/plugin_examples/editor_demo/__init__.py index a6c63eadf0..ad00975893 100644 --- a/manual/plugin_examples/editor_demo/__init__.py +++ b/manual/plugin_examples/editor_demo/__init__.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# vim:fileencoding=utf-8 __license__ = 'GPL v3' diff --git a/manual/plugin_examples/editor_demo/main.py b/manual/plugin_examples/editor_demo/main.py index 3da2fb442d..657aad7727 100644 --- a/manual/plugin_examples/editor_demo/main.py +++ b/manual/plugin_examples/editor_demo/main.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# vim:fileencoding=utf-8 __license__ = 'GPL v3' diff --git a/manual/plugin_examples/interface_demo/main.py b/manual/plugin_examples/interface_demo/main.py index 2e6fd25df7..5f58b06ec4 100644 --- a/manual/plugin_examples/interface_demo/main.py +++ b/manual/plugin_examples/interface_demo/main.py @@ -145,7 +145,7 @@ class DemoDialog(QDialog): db.add_format(book_id, fmt, ffile, run_hooks=False) info_dialog(self, 'Updated files', - 'Updated the metadata in the files of %d book(s)'%len(ids), + f'Updated the metadata in the files of {len(ids)} book(s)', show=True) def config(self): diff --git a/pyproject.toml b/pyproject.toml index 0aee19121d..ed989d9191 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,12 +47,10 @@ unfixable = ['PIE794', 'ISC001'] [tool.ruff.lint.per-file-ignores] "recipes/*" = ['UP'] -"manual/plugin_examples/*" = ['UP'] "setup/changelog.py" = ['ISC001'] "src/calibre/*" = ['UP031'] "src/calibre/ebooks/unihandecode/*codepoints.py" = ['E501'] "src/calibre/ebooks/metadata/sources/*" = ['UP'] -"src/calibre/ebooks/metadata/sources/base.py" = ['RET501'] "src/calibre/gui2/store/stores/*" = ['UP'] "src/qt/*.py" = ['I', 'E302'] "src/qt/*.pyi" = ['I'] diff --git a/src/calibre/ebooks/metadata/sources/base.py b/src/calibre/ebooks/metadata/sources/base.py index cc9b16f789..ef2de2f3b2 100644 --- a/src/calibre/ebooks/metadata/sources/base.py +++ b/src/calibre/ebooks/metadata/sources/base.py @@ -487,7 +487,7 @@ class Source(Plugin): consistent, so only implement it if it is possible to construct the URL from a known scheme given identifiers. ''' - return None + return def get_book_url_name(self, idtype, idval, url): ''' @@ -513,7 +513,7 @@ class Source(Plugin): Note that this method must only return validated URLs, i.e. not URLS that could result in a generic cover image or a not found error. ''' - return None + return def id_from_url(self, url): ''' @@ -522,7 +522,7 @@ class Source(Plugin): If the URL does not match the pattern for the metadata source, return None. ''' - return None + return def identify_results_keygen(self, title=None, authors=None, identifiers={}): @@ -581,7 +581,7 @@ class Source(Plugin): of the error suitable for showing to the user ''' - return None + return def download_cover(self, log, result_queue, abort, title=None, authors=None, identifiers={}, timeout=30, get_best_cover=False):