Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 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 online now   Reply With Quote
Reply


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 02:15 PM.


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