Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 10-21-2026, 11:07 AM   #1
un_pogaz
Chalut o/
un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.
 
un_pogaz's Avatar
 
Posts: 723
Karma: 721246
Join Date: Dec 2017
Device: Kobo
Potential issue

Has I work for implement the last various new default rules of ruff, I found a issue that could lead to bugs, but the potential scope make that I not confident to commit this fix alone. See the patch.
To be short: a function don't return a value when it usage implie that it should be.

calibre.ebooks.oeb.polish.report
css_data.<local>.tag_text

Code:
From 6f427eda1aaca9f9371edee778060f8652794ae6 Mon Sep 17 00:00:00 2001
From: un-pogaz <46523284+un-pogaz@users.noreply.github.com>
Date: Wed, 21 Oct 2026 16:40:50 +0200
Subject: [PATCH] fix tag_text()

---
 src/calibre/ebooks/oeb/polish/report.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/calibre/ebooks/oeb/polish/report.py b/src/calibre/ebooks/oeb/polish/report.py
index a24c911bf9..e3006644ab 100644
--- a/src/calibre/ebooks/oeb/polish/report.py
+++ b/src/calibre/ebooks/oeb/polish/report.py
@@ -314,6 +314,7 @@ def tag_text(elem):
                 attribs = ' '.join('{}="{}"'.format(k, prepare_string_for_xml(elem.get(k, ''), True)) for k in elem.keys())
                 return f'<{tag} {attribs}>'
             ans = tt_cache[elem] = f'<{tag}>'
+        return ans
 
     def matches_for_selector(selector, select, class_map, rule):
         lsel = selector.lower()
--
un_pogaz is offline   Reply With Quote
Old Yesterday, 07:16 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 46,563
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...3d915f247e3b83
kovidgoyal is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Potential issue and a request gustophersmob justRead.app 22 04-16-2026 09:25 AM
Potential static issue through airport security causing screen freeze Queen of Maps General Discussions 11 10-25-2012 02:25 PM
What is the potential? wwpierre Kobo Tablets 8 01-18-2012 12:57 PM
PRS-600 Potential owner ModlrMike Sony Reader 36 11-20-2009 01:40 AM


All times are GMT -4. The time now is 04:59 AM.


MobileRead.com is a privately owned, operated and funded community.