diff --git a/ruff-strict-pep8.toml b/ruff-strict-pep8.toml index 21945f862b..a456ad204b 100644 --- a/ruff-strict-pep8.toml +++ b/ruff-strict-pep8.toml @@ -20,7 +20,7 @@ quote-style = 'single' ignore = [ 'E402', 'E722', 'E741', 'UP012', 'UP030', 'UP032', 'UP038', 'C413', 'C420', - 'RUF001', 'RUF002', 'RUF003', 'RUF005', 'RUF012', 'RUF013', 'RUF015', 'RUF031', 'RUF034', 'RUF100', + 'RUF001', 'RUF002', 'RUF003', 'RUF005', 'RUF012', 'RUF013', 'RUF015', 'RUF031', 'RUF100', ] select = [ 'E', 'F', 'I', 'W', 'INT', diff --git a/src/calibre/ebooks/pdf/reflow.py b/src/calibre/ebooks/pdf/reflow.py index 17e75f3a0d..e31c19eb01 100644 --- a/src/calibre/ebooks/pdf/reflow.py +++ b/src/calibre/ebooks/pdf/reflow.py @@ -296,7 +296,7 @@ class Text(Element): self.font_size = max(self.font_size, other.font_size) self.font_size_em = max(self.font_size_em, other.font_size_em) - self.font = other.font if self.font_size == other.font_size else other.font + self.font = other.font if has_gap > 0: if has_gap < 3: # Small number of spaces = 1 space if not (self.text_as_string.endswith(' ') \ diff --git a/src/calibre/library/catalogs/epub_mobi_builder.py b/src/calibre/library/catalogs/epub_mobi_builder.py index dc0cc7e28b..884e0250de 100644 --- a/src/calibre/library/catalogs/epub_mobi_builder.py +++ b/src/calibre/library/catalogs/epub_mobi_builder.py @@ -3176,7 +3176,7 @@ class CatalogBuilder: fmt_string = _('Series beginning with %s') else: fmt_string = _("Series beginning with '%s'") - sec_text = fmt_string % (title_letters[i] if len(title_letters[i]) > 1 else title_letters[i]) + sec_text = fmt_string % title_letters[i] if title_letters[i] == self.SYMBOLS: content_src = f'content/{output}.html#{self.SYMBOLS}_series' else: @@ -3260,7 +3260,7 @@ class CatalogBuilder: fmt_string = _('Titles beginning with %s') else: fmt_string = _("Titles beginning with '%s'") - sec_text = fmt_string % (title_letters[i] if len(title_letters[i]) > 1 else title_letters[i]) + sec_text = fmt_string % title_letters[i] if title_letters[i] == self.SYMBOLS: content_src = f'content/{output}.html#{self.SYMBOLS}_titles' else: