more misc recomendation (extra-edit)

This commit is contained in:
un-pogaz 2025-01-24 11:14:22 +01:00
parent ddfdc80d3a
commit 8dfbcaa057
9 changed files with 11 additions and 11 deletions

View File

@ -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

View File

@ -227,7 +227,6 @@ def opf_metadata(opfpath):
except Exception:
import traceback
traceback.print_exc()
pass
def forked_read_metadata(original_path, tdir):

View File

@ -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:

View File

@ -342,7 +342,6 @@ cw<ci<font-style<nu<0
pass
else:
self.__list_table_final += line
pass
def __found_override_table_func(self, line):
self.__override_table_obj = override_table.OverrideTable(

View File

@ -202,8 +202,7 @@ def main(args=sys.argv):
parser = option_parser()
opts, args = parser.parse_args(args)
oat = opts.open_at
if oat and not (
oat.startswith(('toc:', 'toc-href:', 'toc-href-contains:', 'epubcfi(/', 'ref:', 'search:', 'regex:')) or is_float(oat)):
if oat and not (oat.startswith(('toc:', 'toc-href:', 'toc-href-contains:', 'epubcfi(/', 'ref:', 'search:', 'regex:')) or is_float(oat)):
raise SystemExit(f'Not a valid --open-at value: {opts.open_at}')
if not opts.new_instance and get_session_pref('singleinstance', False):

View File

@ -1017,8 +1017,7 @@ class PythonHighlighter(QSyntaxHighlighter): # {{{
self.setFormat(0, textLength,
self.Formats['error'])
return
if prevState == ERROR and \
not (text.startswith(('>>>', '#'))):
if prevState == ERROR and not text.startswith(('>>>', '#')):
self.setCurrentBlockState(ERROR)
self.setFormat(0, textLength,
self.Formats['error'])

View File

@ -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)

View File

@ -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

View File

@ -75,7 +75,15 @@ def serialize_recipe(urn, recipe_class):
if rso:
options = f' options={quoteattr(json.dumps(rso))}'
return (' <recipe id={id} title={title} author={author} language={language}'
' 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)
' 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):