From 253030327b57097848b940838b40e9ee8229ad0e Mon Sep 17 00:00:00 2001 From: Luz Paz Date: Sat, 22 Mar 2025 13:09:53 -0400 Subject: [PATCH] Fix various typos --- bypy/windows/XUnzip.cpp | 8 ++++---- pyproject.toml | 2 +- .../devices/mtp/unix/upstream/music-players.h | 12 ++++++------ src/calibre/ebooks/pdf/reflow.py | 4 ++-- src/calibre/ebooks/pml/pmlconverter.py | 4 ++-- src/calibre/ebooks/rtf2xml/add_brackets.py | 2 +- src/calibre/ebooks/rtf2xml/convert_to_tags.py | 2 +- src/calibre/ebooks/rtf2xml/field_strings.py | 2 +- src/calibre/ebooks/rtf2xml/options_trem.py | 4 ++-- src/calibre/ebooks/rtf2xml/paragraph_def.py | 2 +- src/calibre/ebooks/rtf2xml/sections.py | 2 +- src/calibre/ebooks/rtf2xml/table.py | 2 +- src/calibre/gui2/dialogs/template_general_info.py | 2 +- src/calibre/gui2/preferences/__init__.py | 2 +- .../gui2/preferences/look_feel_tabs/__init__.py | 2 +- src/calibre/gui2/tweak_book/tts.py | 2 +- src/calibre/utils/windows/wintoastlib.cpp | 8 ++++---- 17 files changed, 31 insertions(+), 31 deletions(-) diff --git a/bypy/windows/XUnzip.cpp b/bypy/windows/XUnzip.cpp index 29a7f235d0..697ab6cf8d 100644 --- a/bypy/windows/XUnzip.cpp +++ b/bypy/windows/XUnzip.cpp @@ -2850,13 +2850,13 @@ typedef struct uLong offset_local_extrafield;// offset of the local extra field uInt size_local_extrafield;// size of the local extra field - uLong pos_local_extrafield; // position in the local extra field in read + uLong pos_local_extrafield; // position in the local extra field in read uLong crc32; // crc32 of all data uncompressed uLong crc32_wait; // crc32 we must obtain after decompress all uLong rest_read_compressed; // number of byte to be decompressed uLong rest_read_uncompressed;//number of byte to be obtained after decomp - LUFILE* file; // io structore of the zipfile + LUFILE* file; // io structure of the zipfile uLong compression_method; // compression method (0==store) uLong byte_before_the_zipfile;// byte before the zipfile, (>0 for sfx) } file_in_zip_read_info_s; @@ -2865,7 +2865,7 @@ typedef struct // unz_s contain internal information about the zipfile typedef struct { - LUFILE* file; // io structore of the zipfile + LUFILE* file; // io structure of the zipfile unz_global_info gi; // public global information uLong byte_before_the_zipfile;// byte before the zipfile, (>0 for sfx) uLong num_file; // number of the current file in the zipfile @@ -3138,7 +3138,7 @@ int unzGetGlobalInfo (unzFile file,unz_global_info *pglobal_info) } -// Translate date/time from Dos format to tm_unz (readable more easilty) +// Translate date/time from Dos format to tm_unz (more easily readable) void unzlocal_DosDateToTmuDate (uLong ulDosDate, tm_unz* ptm) { uLong uDate; diff --git a/pyproject.toml b/pyproject.toml index 38179b3773..0da1b81111 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ select = [ 'RUF047', # needless else 'E302', 'E303', 'E304', 'E305', 'W391', # blank-line standard 'E111', 'E112', 'E113', 'E117', # code indentation - 'E114', 'E115', 'E116', 'E261', 'E262', 'E265', # comment formating + 'E114', 'E115', 'E116', 'E261', 'E262', 'E265', # comment formatting 'E201', 'E202', 'E211', 'E251', 'E275', # various whitespace ] unfixable = ['PIE794', 'ISC001'] diff --git a/src/calibre/devices/mtp/unix/upstream/music-players.h b/src/calibre/devices/mtp/unix/upstream/music-players.h index b9e321611a..1fe1a1fe58 100644 --- a/src/calibre/devices/mtp/unix/upstream/music-players.h +++ b/src/calibre/devices/mtp/unix/upstream/music-players.h @@ -668,7 +668,7 @@ /* * SanDisk - * several devices (c150 for sure) are definately dual-mode and must + * several devices (c150 for sure) are definitely dual-mode and must * have the USB mass storage driver that hooks them unloaded first. * They all have problematic dual-mode making the device unload effect * uncertain on these devices. @@ -2537,7 +2537,7 @@ /* * Motorola Xoom (Wingray) variants * - * These devices seem to use these product IDs simulatenously + * These devices seem to use these product IDs simultaneously * https://code.google.com/p/android-source-browsing/source/browse/init.stingray.usb.rc?repo=device--moto--wingray * * 0x70a3 - Factory test - reported as early MTP ID @@ -2796,7 +2796,7 @@ // Reported by jaile { "Asus", 0x0b05, "TF300 Transformer (MTP+ADB)", 0x4c81, DEVICE_FLAGS_ANDROID_BUGS }, - // Repored by Florian Apolloner + // Reported by Florian Apolloner { "Asus", 0x0b05, "TF700 Transformer (MTP)", 0x4c90, DEVICE_FLAGS_ANDROID_BUGS }, { "Asus", 0x0b05, "TF700 Transformer (MTP+ADB)", 0x4c91, @@ -3359,7 +3359,7 @@ #if 1 /* after some review I commented it back in. There was apparently * only one or two devices misbehaving (having this ID in mass storage mode), - * but more seem to use it regulary as MTP devices. Marcus 20150401 */ + * but more seem to use it regularly as MTP devices. Marcus 20150401 */ /* * This had to be commented out - the same VID+PID is used also for * other modes than MTP, so we need to let mtp-probe do its job on this @@ -3454,7 +3454,7 @@ #if 1 /* after some review I commented it back in. There was apparently * only one or two devices misbehaving (having this ID in mass storage mode), - * but more seem to use it regulary as MTP devices. Marcus 20150401 */ + * but more seem to use it regularly as MTP devices. Marcus 20150401 */ /* * This had to be commented out - the same VID+PID is used also for * other modes than MTP, so we need to let mtp-probe do its job on this @@ -3951,7 +3951,7 @@ DEVICE_FLAGS_ANDROID_BUGS }, /* In update 4 the order of devices was changed for - better OS X / Windows suport and another device-id + better OS X / Windows support and another device-id got assigned for the MTP */ { "Jolla", 0x2931, "Sailfish (ID2)", 0x0a05, DEVICE_FLAGS_ANDROID_BUGS }, diff --git a/src/calibre/ebooks/pdf/reflow.py b/src/calibre/ebooks/pdf/reflow.py index 17d7bb0b3f..34b44afa25 100644 --- a/src/calibre/ebooks/pdf/reflow.py +++ b/src/calibre/ebooks/pdf/reflow.py @@ -33,7 +33,7 @@ COALESCE_FACTOR = 20.0 BOTTOM_FACTOR = 2.0 # Where lines overlap, top of one to bottom of next should exceed -# the line height by this factor for them to be considered diferent. +# the line height by this factor for them to be considered different. HEIGHT_FACTOR = 1.5 # Fraction of text height that two strings' bottoms can differ by @@ -822,7 +822,7 @@ class Page: # Not within text boundaries self.texts.remove(text) - # Find any image occurances if requested + # Find any image occurrences if requested # These can be interspersed with text if not self.opts.no_images: for img in page.xpath('descendant::image'): diff --git a/src/calibre/ebooks/pml/pmlconverter.py b/src/calibre/ebooks/pml/pmlconverter.py index 6fea58bb78..e1980aa22f 100644 --- a/src/calibre/ebooks/pml/pmlconverter.py +++ b/src/calibre/ebooks/pml/pmlconverter.py @@ -289,7 +289,7 @@ class PML_HTMLizer: return text if code in self.DIV_STATES: - # Ignore multilple T's on the same line. They do not have a closing + # Ignore multiple T's on the same line. They do not have a closing # code. They get closed at the end of the line. if code == 'T' and self.state['T'][0]: self.code_value(stream) @@ -582,7 +582,7 @@ class PML_HTMLizer: text = self.process_code('Sd', line, 'sb') elif c in 'xXC': empty = False - # The PML was modified eariler so x and X put the text + # The PML was modified earlier so x and X put the text # inside of ="" so we don't have do special processing # for C. t = '' diff --git a/src/calibre/ebooks/rtf2xml/add_brackets.py b/src/calibre/ebooks/rtf2xml/add_brackets.py index a35f4884bc..3c233da947 100644 --- a/src/calibre/ebooks/rtf2xml/add_brackets.py +++ b/src/calibre/ebooks/rtf2xml/add_brackets.py @@ -107,7 +107,7 @@ class AddBrackets: def __in_body_func(self, line): ''' Select what action to take in body: - 1-At the end of the file close the braket if a bracket was opened + 1-At the end of the file close the bracket if a bracket was opened This happens if there is achange 2-If an open bracket is found the code inside is ignore (written without modifications) diff --git a/src/calibre/ebooks/rtf2xml/convert_to_tags.py b/src/calibre/ebooks/rtf2xml/convert_to_tags.py index 0a14383b94..ac3fedb363 100644 --- a/src/calibre/ebooks/rtf2xml/convert_to_tags.py +++ b/src/calibre/ebooks/rtf2xml/convert_to_tags.py @@ -109,7 +109,7 @@ class ConvertToTags: Process lines for open tags that have attributes. The important info is between [17:-1]. Take this info and split it with the delimiter '<'. The first token in this group is the element - name. The rest are attributes, separated fromt their values by '>'. So + name. The rest are attributes, separated from their values by '>'. So read each token one at a time, and split them by '>'. ''' # mi diff --git a/src/calibre/ebooks/rtf2xml/field_strings.py b/src/calibre/ebooks/rtf2xml/field_strings.py index 769044a6cc..088b2f6346 100644 --- a/src/calibre/ebooks/rtf2xml/field_strings.py +++ b/src/calibre/ebooks/rtf2xml/field_strings.py @@ -187,7 +187,7 @@ class FieldStrings: my_string --the string to parse. type -- the type of string. Returns: - Returns a string for a field instrution attribute. + Returns a string for a field instruction attribute. Logic: This handles all "large" fields, which means everything except toc entries, index entries, and bookmarks diff --git a/src/calibre/ebooks/rtf2xml/options_trem.py b/src/calibre/ebooks/rtf2xml/options_trem.py index 7147dd7367..188083fa39 100644 --- a/src/calibre/ebooks/rtf2xml/options_trem.py +++ b/src/calibre/ebooks/rtf2xml/options_trem.py @@ -5,7 +5,7 @@ class ParseOptions: ''' Requires: system_string --The string from the command line - options_dict -- a dictionary with the key equal to the opition, and + options_dict -- a dictionary with the key equal to the option, and a list describing that option. (See below) Returns: A tuple. The first item in the tuple is a dictionary containing @@ -223,7 +223,7 @@ class ParseOptions: Returns: nothing Logic: - Check each value in the newly creatd options list to see if it + Check each value in the newly created options list to see if it matches what the user describes as a legal option. ''' illegal_options = [] diff --git a/src/calibre/ebooks/rtf2xml/paragraph_def.py b/src/calibre/ebooks/rtf2xml/paragraph_def.py index bf4891b8fc..abf16994f0 100644 --- a/src/calibre/ebooks/rtf2xml/paragraph_def.py +++ b/src/calibre/ebooks/rtf2xml/paragraph_def.py @@ -31,7 +31,7 @@ Before any para_def token is found. This means all the text in the preamble. Look for the token 'cw shellLink;