From d176b3a7cf2e96d11fd979962efd59f3fa5f5c3d Mon Sep 17 00:00:00 2001 From: un-pogaz <46523284+un-pogaz@users.noreply.github.com> Date: Sun, 23 Mar 2025 13:59:14 +0100 Subject: [PATCH 1/4] add codespell to pyproject.toml calibre will probably never fully compliant with codespell this setting is only to easily find common typo errors by filtring a great range of false-positives, but not all --- Changelog.txt | 4 +- format_docs/compression/zip.txt | 12 +-- pyproject.toml | 87 +++++++++++++++++++ recipes/espn.recipe | 2 +- recipes/financial_times.recipe | 2 +- recipes/independent_australia.recipe | 2 +- recipes/satmagazine.recipe | 2 +- setup/installers.py | 2 +- src/calibre/db/cache.py | 2 +- src/calibre/db/notes/connect.py | 2 +- .../devices/mtp/unix/upstream/music-players.h | 4 +- src/calibre/ebooks/mobi/debug/index.py | 2 +- .../ebooks/oeb/polish/tests/kepubify.py | 2 +- src/calibre/ebooks/pdf/reflow.py | 14 +-- src/calibre/ebooks/rtf2xml/list_numbers.py | 2 +- src/calibre/gui2/__init__.py | 2 +- src/calibre/gui2/auto_add.py | 4 +- src/calibre/gui2/central.py | 2 +- .../gui2/dialogs/edit_category_notes.py | 2 +- src/calibre/gui2/email.py | 4 +- src/calibre/gui2/fts/dialog.py | 2 +- src/calibre/gui2/init.py | 2 +- .../gui2/markdown_syntax_highlighter.py | 10 +-- .../tweak_book/editor/syntax/javascript.py | 2 +- src/calibre/srv/http_request.py | 2 +- src/calibre/utils/formatter.py | 2 +- src/calibre/utils/smtplib.py | 2 +- src/pyj/read_book/paged_mode.pyj | 2 +- src/pyj/read_book/ui.pyj | 2 +- src/pyj/select.pyj | 2 +- 30 files changed, 135 insertions(+), 48 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index ba2bd2818a..a891eff46b 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -496,7 +496,7 @@ :: improved recipes - Jot Down -- Various Russian and Ukranian news sources +- Various Russian and Ukrainian news sources - Nautilus Magazine - Süddeutsche Zeitung - The India Forum @@ -974,7 +974,7 @@ - Fix a regression in 7.0 caused by a regression in Qt that would result in calibre hanging rarely when using the cover browser view -- [2049992] Fix custom template functions not useable in save to disk templates +- [2049992] Fix custom template functions not usable in save to disk templates - Fix a regression in 7.2 that caused the popup used for editing fields in the book list to be mis-positioned on very wide monitors diff --git a/format_docs/compression/zip.txt b/format_docs/compression/zip.txt index 1565e775ba..a08202f1e0 100644 --- a/format_docs/compression/zip.txt +++ b/format_docs/compression/zip.txt @@ -402,7 +402,7 @@ V. General Format of a .ZIP file 13 - Acorn Risc 14 - VFAT 15 - alternate MVS 16 - BeOS 17 - Tandem 18 - OS/400 - 19 - OS/X (Darwin) 20 thru 255 - unused + 19 - OS/X (Darwin) 20 through 255 - unused The lower byte indicates the ZIP specification version (the version of this document) supported by the software @@ -719,7 +719,7 @@ V. General Format of a .ZIP file The Header ID field indicates the type of data that is in the following data block. - Header ID's of 0 thru 31 are reserved for use by PKWARE. + Header ID's of 0 through 31 are reserved for use by PKWARE. The remaining ID's can be used by third party vendors for proprietary usage. @@ -1769,7 +1769,7 @@ Example: 0x02, 0x42, 0x01, 0x13 This would generate the original bit length array of: (3, 3, 3, 3, 3, 2, 4, 4) - There are 8 codes in this table for the values 0 thru 7. Using + There are 8 codes in this table for the values 0 through 7. Using the algorithm to obtain the Shannon-Fano codes produces: Reversed Order Original @@ -1909,8 +1909,8 @@ The bit lengths for the literal tables are sent first with the number of entries sent described by the 5 bits sent earlier. There are up to 286 literal characters; the first 256 represent the respective 8 bit character, code 256 represents the End-Of-Block code, the remaining -29 codes represent copy lengths of 3 thru 258. There are up to 30 -distance codes representing distances from 1 thru 32k as described +29 codes represent copy lengths of 3 through 258. There are up to 30 +distance codes representing distances from 1 through 32k as described below. Length Codes @@ -2221,7 +2221,7 @@ keys, based on random data, to render a plaintext attack on the data ineffective. Read the 12-byte encryption header into Buffer, in locations -Buffer(0) thru Buffer(11). +Buffer(0) through Buffer(11). loop for i <- 0 to 11 C <- buffer(i) ^ decrypt_byte() diff --git a/pyproject.toml b/pyproject.toml index 0da1b81111..089ad4d098 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,6 +74,93 @@ docstring-quotes = 'single' inline-quotes = 'single' multiline-quotes = 'single' +[tool.codespell] +# calibre will probably never fully compliant with codespell +# this setting is only to easily find common typo errors +# by filtring a great range of false-positives, but not all +# (if codespell could per-file-ignores words, its be nicer) +count = false +summary = false +quiet-level = 3 +regex = '''\b(? str: hashalg, digest = resource_hash.split(':', 1) prefix = digest[:2] - # Cant use colons in filenames on windows safely + # Can't use colons in filenames on windows safely return os.path.join(self.resources_dir, prefix, f'{hashalg}-{digest}') def remove_resources(self, conn, note_id, resources_to_potentially_remove, delete_from_link_table=True): diff --git a/src/calibre/devices/mtp/unix/upstream/music-players.h b/src/calibre/devices/mtp/unix/upstream/music-players.h index 1fe1a1fe58..dbe8adcf21 100644 --- a/src/calibre/devices/mtp/unix/upstream/music-players.h +++ b/src/calibre/devices/mtp/unix/upstream/music-players.h @@ -299,7 +299,7 @@ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST | DEVICE_FLAG_PLAYLIST_SPL_V1 }, // YP-F3 is NOT MTP - USB mass storage - // From a rouge .INF file + // From a rogue .INF file // this device ID seems to have been recycled for: // the Samsung SGH-A707 Cingular cellphone // the Samsung L760-V cellphone @@ -1183,7 +1183,7 @@ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, // From: Willy Gardiol (web) // Spurious errors for getting all objects, lead me to believe - // this flag atleast is needed + // this flag at least is needed { "Nokia", 0x0421, "5800 XpressMusic v2", 0x0155, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, // Yet another version... I think diff --git a/src/calibre/ebooks/mobi/debug/index.py b/src/calibre/ebooks/mobi/debug/index.py index c122db4293..2ef2d8d416 100644 --- a/src/calibre/ebooks/mobi/debug/index.py +++ b/src/calibre/ebooks/mobi/debug/index.py @@ -51,7 +51,7 @@ def read_variable_len_data(data, header): header['tagx_block_size'] = 0 trailing_bytes = data[idxt_offset+idxt_size:] if trailing_bytes.rstrip(b'\0'): - raise ValueError('Traling bytes after last IDXT entry: {!r}'.format(trailing_bytes.rstrip(b'\0'))) + raise ValueError('Trailing bytes after last IDXT entry: {!r}'.format(trailing_bytes.rstrip(b'\0'))) header['indices'] = indices diff --git a/src/calibre/ebooks/oeb/polish/tests/kepubify.py b/src/calibre/ebooks/oeb/polish/tests/kepubify.py index e3c0bd1b1e..bca3e32d78 100644 --- a/src/calibre/ebooks/oeb/polish/tests/kepubify.py +++ b/src/calibre/ebooks/oeb/polish/tests/kepubify.py @@ -101,7 +101,7 @@ div#book-inner {{ margin-top: 0; margin-bottom: 0; }}': # escaping with cdata note that kepubify doesnt do this + '
': # escaping with cdata note that kepubify doesn't do this '
', # CSS filtering diff --git a/src/calibre/ebooks/pdf/reflow.py b/src/calibre/ebooks/pdf/reflow.py index 34b44afa25..96d267080d 100644 --- a/src/calibre/ebooks/pdf/reflow.py +++ b/src/calibre/ebooks/pdf/reflow.py @@ -732,21 +732,21 @@ class Region: class Page: def __init__(self, page, font_map, opts, log, idc): - def text_cmp(frst, secnd): + def text_cmp(first, second): # Compare 2 text objects. # Order by line (top/bottom) then left - if (frst.top <= secnd.top and frst.bottom >= secnd.bottom-BOTTOM_FACTOR) \ - or (secnd.top <= frst.top and secnd.bottom >= frst.bottom-BOTTOM_FACTOR): + if (first.top <= second.top and first.bottom >= second.bottom-BOTTOM_FACTOR) \ + or (second.top <= first.top and second.bottom >= first.bottom-BOTTOM_FACTOR): # Overlap = same line - if frst.left < secnd.left: + if first.left < second.left: return -1 - elif frst.left == secnd.left: + elif first.left == second.left: return 0 return 1 # Different line so sort into line number - if frst.bottom < secnd.bottom: + if first.bottom < second.bottom: return -1 - elif frst.bottom == secnd.bottom: + elif first.bottom == second.bottom: return 0 return 1 diff --git a/src/calibre/ebooks/rtf2xml/list_numbers.py b/src/calibre/ebooks/rtf2xml/list_numbers.py index 736e0155b8..0951868cfc 100644 --- a/src/calibre/ebooks/rtf2xml/list_numbers.py +++ b/src/calibre/ebooks/rtf2xml/list_numbers.py @@ -121,7 +121,7 @@ class ListNumbers: return 'ordered' # sys.stderr.write('module is list_numbers\n') # sys.stderr.write('method is __determine type\n') - # sys.stderr.write('Couldn\'t get type of list\n') + # sys.stderr.write("Couldn't get type of list\n") # must be some type of ordered list -- just a guess! return 'unordered' diff --git a/src/calibre/gui2/__init__.py b/src/calibre/gui2/__init__.py index e0aa43c22b..eda1cc0818 100644 --- a/src/calibre/gui2/__init__.py +++ b/src/calibre/gui2/__init__.py @@ -1776,7 +1776,7 @@ def raise_and_focus(self: QWidget) -> None: def raise_without_focus(self: QWidget) -> None: if QApplication.instance().platformName() == 'wayland': - # On fucking Wayland, we cant raise a dialog without also giving it + # On fucking Wayland, we can't raise a dialog without also giving it # keyboard focus. What a joke. self.raise_and_focus() else: diff --git a/src/calibre/gui2/auto_add.py b/src/calibre/gui2/auto_add.py index d1cae5e22c..5bf5b7b8af 100644 --- a/src/calibre/gui2/auto_add.py +++ b/src/calibre/gui2/auto_add.py @@ -288,10 +288,10 @@ class AutoAdder(QObject): if duplicates: paths, formats, metadata = [], [], [] - for p, f, mis in duplicates: + for p, f, mi in duplicates: paths.extend(p) formats.extend(f) - metadata.extend(mis) + metadata.extend(mi) dups = [(mic, mic.cover, [p]) for mic, p in zip(metadata, paths)] d = DuplicatesQuestion(m.db, dups, parent=gui) dups = tuple(d.duplicates) diff --git a/src/calibre/gui2/central.py b/src/calibre/gui2/central.py index 54817cb14a..4af23199cf 100644 --- a/src/calibre/gui2/central.py +++ b/src/calibre/gui2/central.py @@ -485,7 +485,7 @@ class CentralContainer(QWidget): def read_settings(self): before = self.serialized_settings() - # sadly self.size() doesnt always return sensible values so look at + # sadly self.size() doesn't always return sensible values so look at # the size of the main window which works perfectly for width, not so # perfectly for height sz = self.size() diff --git a/src/calibre/gui2/dialogs/edit_category_notes.py b/src/calibre/gui2/dialogs/edit_category_notes.py index 697d2b62f1..ae6948d05a 100644 --- a/src/calibre/gui2/dialogs/edit_category_notes.py +++ b/src/calibre/gui2/dialogs/edit_category_notes.py @@ -287,7 +287,7 @@ class NoteEditorWidget(EditorWidget): def do_insert_image(self): # See https://bugreports.qt.io/browse/QTBUG-118537 - # for why we cant have a nice margin for floating images + # for why we can't have a nice margin for floating images d = AskImage(self.images, self.db) if d.exec() == QDialog.DialogCode.Accepted and d.current_digest: ir = self.images[d.current_digest] diff --git a/src/calibre/gui2/email.py b/src/calibre/gui2/email.py index 30f6650552..225656b99d 100644 --- a/src/calibre/gui2/email.py +++ b/src/calibre/gui2/email.py @@ -153,14 +153,14 @@ def send_mails(jobnames, callback, attachments, to_s, subjects, attachments, to_s, subjects, texts, attachment_names): description = _('Email %(name)s to %(to)s') % dict(name=name, to=to) if isinstance(to, str) and (is_for_kindle(to) or '@pbsync.com' in to): - # The PocketBook service is a total joke. It cant handle + # The PocketBook service is a total joke. It can't handle # non-ascii, filenames that are long enough to be split up, commas, and # the good lord alone knows what else. So use a random filename # containing only 22 English letters and numbers # # And since this email is only going to be processed by automated # services, make the subject+text random too as at least the amazon - # service cant handle non-ascii text. I dont know what baboons + # service can't handle non-ascii text. I dont know what baboons # these companies employ to write their code. It's the height of # irony that they are called "tech" companies. # https://bugs.launchpad.net/calibre/+bug/1989282 diff --git a/src/calibre/gui2/fts/dialog.py b/src/calibre/gui2/fts/dialog.py index 357a04c855..18905ba0c1 100644 --- a/src/calibre/gui2/fts/dialog.py +++ b/src/calibre/gui2/fts/dialog.py @@ -36,7 +36,7 @@ class FTSDialog(Dialog): l = QVBoxLayout(self) self.fat_warning = fw = QLabel( f'{_("WARNING")}: ' + - _('The calibre library is on a FAT drive, indexing more than a few hundred books wont work.') + + _("The calibre library is on a FAT drive, indexing more than a few hundred books won't work.") + f' {_("Learn more")}') # fw.setVisible(False) fw.linkActivated.connect(self.show_fat_details) diff --git a/src/calibre/gui2/init.py b/src/calibre/gui2/init.py index 9a44c2f7ff..dae64169b7 100644 --- a/src/calibre/gui2/init.py +++ b/src/calibre/gui2/init.py @@ -359,7 +359,7 @@ class VLTabs(QTabBar): # {{{ def lock_tab(self): gprefs['vl_tabs_closable'] = False self.setTabsClosable(False) - # Workaround for Qt bug where it doesnt recalculate the tab size after locking + # Workaround for Qt bug where it doesn't recalculate the tab size after locking for idx in range(self.count()): self.setTabButton(idx, QTabBar.ButtonPosition.RightSide, None) self.setTabButton(idx, QTabBar.ButtonPosition.LeftSide, None) diff --git a/src/calibre/gui2/markdown_syntax_highlighter.py b/src/calibre/gui2/markdown_syntax_highlighter.py index f26c0f23aa..353a36eb1d 100644 --- a/src/calibre/gui2/markdown_syntax_highlighter.py +++ b/src/calibre/gui2/markdown_syntax_highlighter.py @@ -268,7 +268,7 @@ class MarkdownHighlighter(QSyntaxHighlighter): elif emphasis: self.setFormat(self.offset+offset+ match.start(), match.end() - match.start(), self.MARKDOWN_KWS_FORMAT['Italic']) - def recusive(match, extra_offset, bold, emphasis): + def recursive(match, extra_offset, bold, emphasis): apply(match, bold, emphasis) if bold and emphasis: return # max deep => return, do not process extra Bold/Italic @@ -278,17 +278,17 @@ class MarkdownHighlighter(QSyntaxHighlighter): self._highlightBoldEmphasis(sub_txt, cursor, bf, sub_offset, bold, emphasis) for mo in re.finditer(self.MARKDOWN_KEYS_REGEX['Italic'],text): - recusive(mo, 1, bold, True) + recursive(mo, 1, bold, True) found = True for mo in re.finditer(self.MARKDOWN_KEYS_REGEX['uItalic'],text): - recusive(mo, 1, bold, True) + recursive(mo, 1, bold, True) found = True for mo in re.finditer(self.MARKDOWN_KEYS_REGEX['Bold'],text): - recusive(mo, 2, True, emphasis) + recursive(mo, 2, True, emphasis) found = True for mo in re.finditer(self.MARKDOWN_KEYS_REGEX['uBold'],text): - recusive(mo, 2, True, emphasis) + recursive(mo, 2, True, emphasis) found = True for mo in re.finditer(self.MARKDOWN_KEYS_REGEX['BoldItalic'],text): diff --git a/src/calibre/gui2/tweak_book/editor/syntax/javascript.py b/src/calibre/gui2/tweak_book/editor/syntax/javascript.py index 3cc1605e80..2b0de9a9e8 100644 --- a/src/calibre/gui2/tweak_book/editor/syntax/javascript.py +++ b/src/calibre/gui2/tweak_book/editor/syntax/javascript.py @@ -25,7 +25,7 @@ JS_IDENT = JS_IDENT_START + '(?:' + JS_IDENT_PART + ')*' class JavascriptLexer(RegexLexer): ''' For JavaScript source code. This is based on the pygments JS highlighter, - bu that does not handle multi-line comments in streaming mode, so we had to + but that does not handle multi-line comments in streaming mode, so we had to modify it. ''' diff --git a/src/calibre/srv/http_request.py b/src/calibre/srv/http_request.py index 384a0613f1..ba5d3b33cf 100644 --- a/src/calibre/srv/http_request.py +++ b/src/calibre/srv/http_request.py @@ -83,7 +83,7 @@ def parse_uri(uri, parse_query=True, unquote_func=unquote): try: query = MultiDict.create_from_query_string(qs) except Exception: - raise HTTPSimpleResponse(http_client.BAD_REQUEST, 'Unparseable query string') + raise HTTPSimpleResponse(http_client.BAD_REQUEST, 'Unparsable query string') else: query = None diff --git a/src/calibre/utils/formatter.py b/src/calibre/utils/formatter.py index fc31f35fbe..6dfeb7819c 100644 --- a/src/calibre/utils/formatter.py +++ b/src/calibre/utils/formatter.py @@ -192,7 +192,7 @@ class SetGlobalsNode(Node): class StringCompareNode(Node): def __init__(self, line_number, operator, left, right): - Node.__init__(self, line_number, 'comparision: ' + operator) + Node.__init__(self, line_number, 'comparison: ' + operator) self.node_type = self.NODE_COMPARE_STRING self.operator = operator self.left = left diff --git a/src/calibre/utils/smtplib.py b/src/calibre/utils/smtplib.py index 1964ab6a87..61be1e905d 100644 --- a/src/calibre/utils/smtplib.py +++ b/src/calibre/utils/smtplib.py @@ -743,7 +743,7 @@ class SMTP: >>> tolist=["one@one.org","two@two.org","three@three.org","four@four.org"] >>> msg = '''\\ ... From: Me@my.org - ... Subject: testin'... + ... Subject: testing... ... ... This is a test ''' >>> s.sendmail("me@my.org",tolist,msg) diff --git a/src/pyj/read_book/paged_mode.pyj b/src/pyj/read_book/paged_mode.pyj index 0cf8f0de1b..c4ca24855a 100644 --- a/src/pyj/read_book/paged_mode.pyj +++ b/src/pyj/read_book/paged_mode.pyj @@ -446,7 +446,7 @@ def next_screen_location(): current_pos = Math.ceil(current_scroll_offset()) ans = limit if current_pos < limit else -1 if cols_per_screen is 1 and ans is not -1 and ans - current_pos < col_size: - ans = -1 # cant scroll partial columns + ans = -1 # can't scroll partial columns return ans diff --git a/src/pyj/read_book/ui.pyj b/src/pyj/read_book/ui.pyj index 82f80b390c..1db4f1eddb 100644 --- a/src/pyj/read_book/ui.pyj +++ b/src/pyj/read_book/ui.pyj @@ -145,7 +145,7 @@ class ReadUI: try: result = JSON.parse(xhr.responseText) except Exception: - return self.show_error(_('Failed to parse profiles'), _('Unparseable data received for profiles')) + return self.show_error(_('Failed to parse profiles'), _('Unparsable data received for profiles')) proceed(result) ).send() diff --git a/src/pyj/select.pyj b/src/pyj/select.pyj index 7ed3d9275a..ef0aa7c8eb 100644 --- a/src/pyj/select.pyj +++ b/src/pyj/select.pyj @@ -134,7 +134,7 @@ def range_extents(q, in_flow_mode): rect = boundary_node.getBoundingClientRect() if not is_start: ans.selected_prev = True - # we cant use getBoundingClientRect as the node might be split + # we can't use getBoundingClientRect as the node might be split # among multiple columns else if node.getClientRects: rects = node.getClientRects() From b0d58ade701709a68e8cdee7f835b3c5a112eb36 Mon Sep 17 00:00:00 2001 From: un-pogaz <46523284+un-pogaz@users.noreply.github.com> Date: Sun, 23 Mar 2025 16:02:05 +0100 Subject: [PATCH 2/4] add 'code' dictionary to codespell setting --- bypy/linux/__main__.py | 4 +-- bypy/macos/sign.py | 4 +-- bypy/windows/file_dialogs.cpp | 2 +- bypy/windows/wix-template.xml | 6 ++-- manual/conversion.rst | 2 +- manual/creating_plugins.rst | 2 +- manual/edit.rst | 4 +-- manual/faq.rst | 2 +- manual/function_mode.rst | 2 +- manual/metadata.rst | 2 +- manual/news.rst | 2 +- .../plugin_examples/interface_demo/config.py | 2 +- manual/plugin_examples/interface_demo/main.py | 2 +- manual/plugin_examples/interface_demo/ui.py | 2 +- manual/regexp.rst | 2 +- manual/template_lang.rst | 4 +-- pyproject.toml | 32 +++++++++++++++++++ recipes/baltimore_sun.recipe | 2 +- recipes/epw_magazine.recipe | 2 +- recipes/miami_herald.recipe | 2 +- resources/default_tweaks.py | 2 +- resources/pdf-preprint.js | 2 +- resources/toc.js | 2 +- setup/build.py | 4 +-- setup/installers.py | 2 +- setup/translations.py | 2 +- src/calibre/customize/profiles.py | 4 +-- src/calibre/customize/ui.py | 2 +- src/calibre/db/backend.py | 2 +- src/calibre/db/cache.py | 4 +-- src/calibre/db/restore.py | 2 +- src/calibre/db/search.py | 2 +- src/calibre/db/tests/legacy.py | 4 +-- src/calibre/devices/__init__.py | 2 +- .../devices/mtp/unix/upstream/device-flags.h | 2 +- .../devices/smart_device_app/driver.py | 2 +- src/calibre/devices/winusb.py | 2 +- .../ebooks/conversion/plugins/htmlz_input.py | 2 +- src/calibre/ebooks/docx/block_styles.py | 2 +- src/calibre/ebooks/docx/char_styles.py | 2 +- src/calibre/ebooks/docx/writer/from_html.py | 4 +-- src/calibre/ebooks/epub/cfi/parse.py | 2 +- src/calibre/ebooks/lit/reader.py | 2 +- src/calibre/ebooks/lrf/html/convert_from.py | 2 +- src/calibre/ebooks/mobi/debug/mobi6.py | 6 ++-- src/calibre/ebooks/mobi/reader/index.py | 2 +- src/calibre/ebooks/mobi/writer2/indexer.py | 2 +- src/calibre/ebooks/mobi/writer2/main.py | 2 +- src/calibre/ebooks/mobi/writer2/resources.py | 2 +- src/calibre/ebooks/mobi/writer2/serializer.py | 2 +- src/calibre/ebooks/mobi/writer8/index.py | 4 +-- src/calibre/ebooks/oeb/polish/container.py | 4 +-- src/calibre/ebooks/oeb/polish/embed.py | 4 +-- src/calibre/ebooks/oeb/polish/pretty.py | 2 +- src/calibre/ebooks/oeb/polish/utils.py | 2 +- src/calibre/ebooks/oeb/transforms/cover.py | 2 +- .../ebooks/oeb/transforms/embed_fonts.py | 2 +- src/calibre/ebooks/oeb/transforms/metadata.py | 2 +- src/calibre/ebooks/oeb/transforms/subset.py | 2 +- src/calibre/ebooks/pdf/html_writer.py | 4 +-- src/calibre/gui2/__init__.py | 2 +- src/calibre/gui2/actions/__init__.py | 4 +-- src/calibre/gui2/actions/sort.py | 2 +- src/calibre/gui2/covers.py | 2 +- src/calibre/gui2/dialogs/template_dialog.py | 2 +- src/calibre/gui2/email.py | 4 +-- src/calibre/gui2/init.py | 2 +- src/calibre/gui2/library/alternate_views.py | 4 +-- src/calibre/gui2/library/models.py | 2 +- src/calibre/gui2/library/views.py | 2 +- src/calibre/gui2/notify.py | 2 +- src/calibre/gui2/pictureflow/pictureflow.cpp | 2 +- .../gui2/progress_indicator/CalibreStyle.cpp | 2 +- .../progress_indicator/QProgressIndicator.h | 2 +- src/calibre/gui2/tweak_book/diff/view.py | 2 +- .../gui2/tweak_book/editor/snippets.py | 2 +- src/calibre/gui2/tweak_book/editor/text.py | 2 +- src/calibre/gui2/tweak_book/search.py | 2 +- src/calibre/gui2/wizard/__init__.py | 2 +- .../library/catalogs/epub_mobi_builder.py | 2 +- src/calibre/srv/auth.py | 2 +- src/calibre/srv/content.py | 2 +- src/calibre/srv/loop.py | 2 +- src/calibre/srv/metadata.py | 2 +- src/calibre/srv/routes.py | 2 +- src/calibre/utils/browser.py | 2 +- src/calibre/utils/copy_files.py | 2 +- src/calibre/utils/filenames.py | 2 +- src/calibre/utils/fonts/scanner.py | 4 +-- src/calibre/utils/icu.c | 2 +- src/calibre/utils/inotify.py | 4 +-- src/calibre/utils/iphlpapi.py | 2 +- src/calibre/utils/ipython.py | 4 +-- src/calibre/utils/recycle_bin.py | 2 +- src/calibre/utils/stb_sprintf.h | 2 +- src/calibre/utils/zipfile.py | 2 +- src/pyj/book_list/search.pyj | 2 +- src/pyj/range_utils.pyj | 2 +- src/pyj/read_book/cfi.pyj | 6 ++-- src/pyj/read_book/iframe.pyj | 2 +- src/pyj/read_book/overlay.pyj | 14 ++++---- src/pyj/read_book/paged_mode.pyj | 4 +-- src/pyj/read_book/selection_bar.pyj | 4 +-- src/pyj/read_book/view.pyj | 2 +- 104 files changed, 168 insertions(+), 136 deletions(-) diff --git a/bypy/linux/__main__.py b/bypy/linux/__main__.py index 12ab7b1c95..df88bd3c6e 100644 --- a/bypy/linux/__main__.py +++ b/bypy/linux/__main__.py @@ -55,10 +55,10 @@ def binary_includes(): get_dll_path('bz2', 2), j(PREFIX, 'lib', 'libunrar.so'), get_dll_path('python' + py_ver, 2), get_dll_path('jbig', 2), - # We dont include libstdc++.so as the OpenGL dlls on the target + # We don't include libstdc++.so as the OpenGL dlls on the target # computer fail to load in the QPA xcb plugin if they were compiled # with a newer version of gcc than the one on the build computer. - # libstdc++, like glibc is forward compatible and I dont think any + # libstdc++, like glibc is forward compatible and I don't think any # distros do not have libstdc++.so.6, so it should be safe to leave it out. # https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html (The current # debian stable libstdc++ is libstdc++.so.6.0.17) diff --git a/bypy/macos/sign.py b/bypy/macos/sign.py index 87279d74c1..fb1da2b95b 100644 --- a/bypy/macos/sign.py +++ b/bypy/macos/sign.py @@ -13,10 +13,10 @@ entitlements = { # MAP_JIT is used by libpcre which is bundled with Qt 'com.apple.security.cs.allow-jit': True, - # v8 and therefore WebEngine need this as they dont use MAP_JIT + # v8 and therefore WebEngine need this as they don't use MAP_JIT 'com.apple.security.cs.allow-unsigned-executable-memory': True, - # calibre itself does not use DYLD env vars, but dont know about its + # calibre itself does not use DYLD env vars, but don't know about its # dependencies. 'com.apple.security.cs.allow-dyld-environment-variables': True, diff --git a/bypy/windows/file_dialogs.cpp b/bypy/windows/file_dialogs.cpp index 0d200710be..fea720eb8d 100644 --- a/bypy/windows/file_dialogs.cpp +++ b/bypy/windows/file_dialogs.cpp @@ -346,7 +346,7 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine return write_bytes(pipe, echo_sz, echo_buf) ? 0 : 1; } if (app_uid != NULL) { - // dont check return status as failure is not critical + // don't check return status as failure is not critical set_app_uid(app_uid); } diff --git a/bypy/windows/wix-template.xml b/bypy/windows/wix-template.xml index 901a054b0a..b067f09ec8 100644 --- a/bypy/windows/wix-template.xml +++ b/bypy/windows/wix-template.xml @@ -5,16 +5,16 @@