diff --git a/src/calibre/gui2/tweak_book/editor/text.py b/src/calibre/gui2/tweak_book/editor/text.py index 497265644a..ac00fe244b 100644 --- a/src/calibre/gui2/tweak_book/editor/text.py +++ b/src/calibre/gui2/tweak_book/editor/text.py @@ -48,6 +48,7 @@ def get_smarts(syntax): except (ImportError, AttributeError): pass + _dff = None diff --git a/src/calibre/gui2/tweak_book/preferences.py b/src/calibre/gui2/tweak_book/preferences.py index f8fd1b8c92..1cbc7dfe62 100644 --- a/src/calibre/gui2/tweak_book/preferences.py +++ b/src/calibre/gui2/tweak_book/preferences.py @@ -768,6 +768,7 @@ class Preferences(QDialog): tprefs.set('preferences_geom', bytearray(self.saveGeometry())) QDialog.reject(self) + if __name__ == '__main__': from calibre.gui2 import Application from calibre.gui2.tweak_book.main import option_parser diff --git a/src/calibre/gui2/tweak_book/widgets.py b/src/calibre/gui2/tweak_book/widgets.py index 6725e7ae40..154ec49f7e 100644 --- a/src/calibre/gui2/tweak_book/widgets.py +++ b/src/calibre/gui2/tweak_book/widgets.py @@ -1195,6 +1195,7 @@ class PlainTextEdit(QPlainTextEdit): # {{{ # }}} + if __name__ == '__main__': app = QApplication([]) AddCover.test()