diff --git a/recipes/wenxuecity-znjy.recipe b/recipes/wenxuecity-znjy.recipe index 56d834ff50..a3793eddf6 100644 --- a/recipes/wenxuecity-znjy.recipe +++ b/recipes/wenxuecity-znjy.recipe @@ -63,4 +63,3 @@ class TheCND(BasicNewsRecipe): def populate_article_metadata(self, article, soup, first): header = soup.find('h3') self.log('header: ' + self.tag_to_string(header)) - pass diff --git a/src/calibre/ebooks/metadata/meta.py b/src/calibre/ebooks/metadata/meta.py index ac0fd27d01..03f2a2d6f9 100644 --- a/src/calibre/ebooks/metadata/meta.py +++ b/src/calibre/ebooks/metadata/meta.py @@ -227,7 +227,6 @@ def opf_metadata(opfpath): except Exception: import traceback traceback.print_exc() - pass def forked_read_metadata(original_path, tdir): diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py index 2900083f71..4170e484a9 100644 --- a/src/calibre/ebooks/oeb/base.py +++ b/src/calibre/ebooks/oeb/base.py @@ -1830,7 +1830,6 @@ class OEBBook: self.spine.page_progression_direction = 'rtl' except Exception: raise - pass def clean_temp_files(self): for path in self._temp_files: diff --git a/src/calibre/ebooks/rtf2xml/preamble_div.py b/src/calibre/ebooks/rtf2xml/preamble_div.py index bde0b04f91..c6989df5e5 100644 --- a/src/calibre/ebooks/rtf2xml/preamble_div.py +++ b/src/calibre/ebooks/rtf2xml/preamble_div.py @@ -342,7 +342,6 @@ cw>>', '#'))): + if prevState == ERROR and not text.startswith(('>>>', '#')): self.setCurrentBlockState(ERROR) self.setFormat(0, textLength, self.Formats['error']) diff --git a/src/calibre/library/catalogs/epub_mobi_builder.py b/src/calibre/library/catalogs/epub_mobi_builder.py index b6faad35e3..aa70dd2f0f 100644 --- a/src/calibre/library/catalogs/epub_mobi_builder.py +++ b/src/calibre/library/catalogs/epub_mobi_builder.py @@ -644,7 +644,6 @@ class CatalogBuilder: except: if self.opts.verbose: self.opts.log.error('pattern failed to compile: %s' % rule['pattern']) - pass elif field_contents is None and rule['pattern'] == 'None': if self.DEBUG: _log_prefix_rule_match_info(rule, record, field_contents) diff --git a/src/calibre/web/feeds/news.py b/src/calibre/web/feeds/news.py index 4cab2dcf87..475b4a53ef 100644 --- a/src/calibre/web/feeds/news.py +++ b/src/calibre/web/feeds/news.py @@ -1108,7 +1108,6 @@ class BasicNewsRecipe(Recipe): article = self.feed_objects[f].articles[a] except: self.log.exception('Failed to get article object for postprocessing') - pass else: self.populate_article_metadata(article, ans, first_fetch) return ans diff --git a/src/calibre/web/feeds/recipes/collection.py b/src/calibre/web/feeds/recipes/collection.py index 25ef7d4e37..42d6ef7b47 100644 --- a/src/calibre/web/feeds/recipes/collection.py +++ b/src/calibre/web/feeds/recipes/collection.py @@ -75,7 +75,15 @@ def serialize_recipe(urn, recipe_class): if rso: options = f' options={quoteattr(json.dumps(rso))}' return (' ').format(id=quoteattr(str(urn)), title=attr('title', _('Unknown')), author=attr('__author__', default_author), language=attr('language', 'und', normalize_language), needs_subscription=quoteattr(ns), description=attr('description', ''), options=options) + ' needs_subscription={needs_subscription} description={description}{options}/>').format( + id=quoteattr(str(urn)), + title=attr('title', _('Unknown')), + author=attr('__author__', default_author), + language=attr('language', 'und', normalize_language), + needs_subscription=quoteattr(ns), + description=attr('description', ''), + options=options, + ) def serialize_collection(mapping_of_recipe_classes):