Repository Analysis

kovidgoyal/calibre

The official source code repository for the calibre ebook manager

12.1 Low AI signal View on GitHub
12.1
Adjusted Score
12.1
Raw Score
100%
Time Factor
2026-05-30
Last Push
24,942
Stars
Python
Language
612,991
Lines of Code
1736
Files
6380
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 13HIGH 181MEDIUM 471LOW 5715

Pattern Findings

6380 matches across 18 categories. Click a row to expand file-level details.

Excessive Try-Catch Wrapping2488 hits · 2658 pts
SeverityFileLineSnippet
LOWsetup/build.py618 except Exception:
MEDIUMsetup/build.py620 print(f'Error while executing: {cmdline}\n')
LOWsetup/linux-installer.py613 except Exception:
LOWsetup/linux-installer.py759 except Exception:
LOWsetup/linux-installer.py769 except Exception:
LOWsetup/linux-installer.py779 except Exception:
LOWsetup/hosting.py121 except Exception:
LOWsetup/hosting.py171 except Exception:
LOWsetup/upload.py282 except Exception:
LOWsetup/upload.py291 except Exception:
LOWsetup/build_environment.py88 except Exception:
LOWsetup/plugins_mirror.py48except Exception:
LOWsetup/plugins_mirror.py289 except Exception:
LOWsetup/plugins_mirror.py424 except Exception:
LOWsetup/plugins_mirror.py664 except Exception:
MEDIUMsetup/plugins_mirror.py160def load_plugins_index():
LOWsetup/polib.py1508 except Exception:
LOWsetup/__init__.py99 except Exception as err:
LOWsetup/win-ci.py26 except Exception as err:
LOWsetup/unix-ci.py33 except Exception as err:
LOWsetup/linux-installer.sh662 except Exception:
LOWsetup/linux-installer.sh808 except Exception:
LOWsetup/linux-installer.sh818 except Exception:
LOWsetup/linux-installer.sh828 except Exception:
LOWsetup/revendor.py31 except Exception as err:
LOWsetup/git_commit_msg_hook.py48 except Exception:
LOWsetup/resources.py185 except Exception:
LOWsetup/resources.py198 except Exception:
LOWsetup/parallel_build.py34 except Exception as err:
LOWmanual/custom.py56 except Exception as e:
LOWmanual/custom.py67 except Exception as e:
LOWmanual/custom.py86 except Exception:
LOWmanual/template_ref_generate.py80 except Exception as e:
LOWmanual/plugin_examples/editor_demo/main.py54 except Exception:
LOWbypy/windows/site.py84 except Exception:
LOWsrc/calibre/rpdb.py96 except Exception:
LOWsrc/calibre/startup.py87 except Exception:
LOWsrc/calibre/startup.py157 except Exception:
LOWsrc/calibre/startup.py162 except Exception:
LOWsrc/calibre/startup.py196 except Exception:
MEDIUMsrc/calibre/startup.py126def spawnv_passfds(path, args, passfds):
LOWsrc/calibre/ptempfile.py58 except Exception:
LOWsrc/calibre/ptempfile.py170 except Exception:
MEDIUMsrc/calibre/ptempfile.py167def __del__(self):
LOWsrc/calibre/constants.py58except Exception:
LOWsrc/calibre/constants.py95 except Exception:
LOWsrc/calibre/constants.py111 except Exception:
LOWsrc/calibre/constants.py193 except Exception:
LOWsrc/calibre/constants.py347 except Exception as err:
LOWsrc/calibre/constants.py396 except Exception:
LOWsrc/calibre/constants.py410 except Exception:
MEDIUMsrc/calibre/constants.py406def cleanup_cdir():
LOWsrc/calibre/__init__.py276 except Exception:
LOWsrc/calibre/__init__.py304 except Exception:
LOWsrc/calibre/__init__.py519 except Exception:
LOWsrc/calibre/__init__.py523 except Exception:
LOWsrc/calibre/__init__.py526 except Exception:
LOWsrc/calibre/__init__.py537 except Exception:
LOWsrc/calibre/__init__.py540 except Exception:
LOWsrc/calibre/__init__.py589 except Exception:
2428 more matches not shown…
Deep Nesting1730 hits · 1560 pts
SeverityFileLineSnippet
LOWsetup.py62
LOWsetup/build.py89
LOWsetup/build.py128
LOWsetup/build.py243
LOWsetup/linux-installer.py461
LOWsetup/linux-installer.py583
LOWsetup/hosting.py262
LOWsetup/hosting.py183
LOWsetup/hyphenation.py24
LOWsetup/hyphenation.py90
LOWsetup/check.py110
LOWsetup/upload.py320
LOWsetup/build_environment.py20
LOWsetup/plugins_mirror.py103
LOWsetup/plugins_mirror.py173
LOWsetup/plugins_mirror.py216
LOWsetup/plugins_mirror.py362
LOWsetup/polib.py156
LOWsetup/polib.py455
LOWsetup/polib.py989
LOWsetup/polib.py1313
LOWsetup/polib.py1547
LOWsetup/polib.py1636
LOWsetup/polib.py1705
LOWsetup/wincross.py159
LOWsetup/wincross.py218
LOWsetup/wincross.py311
LOWsetup/wincross.py420
LOWsetup/wincross.py54
LOWsetup/translations.py108
LOWsetup/translations.py152
LOWsetup/translations.py344
LOWsetup/translations.py390
LOWsetup/translations.py485
LOWsetup/translations.py531
LOWsetup/translations.py677
LOWsetup/git_hooks.py84
LOWsetup/win-ci.py94
LOWsetup/vcvars.py85
LOWsetup/unix-ci.py269
LOWsetup/changelog.py117
LOWsetup/piper.py24
LOWsetup/resources.py104
LOWsetup/install.py254
LOWsetup/parallel_build.py51
LOWsetup/parallel_build.py76
LOWsetup/gui.py24
LOWsetup/publish.py292
LOWmanual/custom.py339
LOWmanual/template_ref_generate.py53
LOWmanual/plugin_examples/editor_demo/main.py70
LOW.github/workflows/macos_crash_report.py273
LOW.github/workflows/macos_crash_report.py308
LOW.github/workflows/macos_crash_report.py363
LOWbypy/macos/__main__.py287
LOWbypy/macos/__main__.py666
LOWbypy/macos/__main__.py724
LOWbypy/linux/site.py20
LOWbypy/linux/__main__.py97
LOWsrc/calibre/rpdb.py102
1670 more matches not shown…
Hyper-Verbose Identifiers1141 hits · 1086 pts
SeverityFileLineSnippet
LOWresources/templates/kobo.js114function paginateAndMaintainProgress()
LOWresources/templates/kobo.js199function estimateFirstAnchorForPageNumber(page)
LOWresources/templates/kobo.js219function estimatePageNumberForAnchor(spanId)
LOWsetup/build.py680 def create_sip_build_skeleton(self, src_dir, ext):
LOWsetup/linux-installer.py583def get_https_resource_securely(url, timeout=60, max_redirects=5, ssl_version=None):
LOWsetup/linux-installer.py802def check_for_recent_freetype():
LOWsetup/translations.py140 def get_content_server_strings(self):
LOWsetup/translations.py390 def compile_main_translations(self):
LOWsetup/translations.py485 def compile_content_server_translations(self):
LOWsetup/translations.py531 def _compile_website_translations(self, name='website', threshold=50):
LOWsetup/translations.py586 def compile_website_translations(self):
LOWsetup/translations.py595 def compile_changelog_translations(self):
LOWsetup/translations.py598 def compile_user_manual_translations(self):
LOWsetup/translations.py677 def check_for_user_manual_errors(self):
LOWsetup/vcvars.py17def get_program_files_location(which=CSIDL_PROGRAM_FILESX86):
LOWsetup/browser_data.py13def download_from_calibre_server(url):
LOWsetup/linux-installer.sh632def get_https_resource_securely(url, timeout=60, max_redirects=5, ssl_version=None):
LOWsetup/linux-installer.sh851def check_for_recent_freetype():
LOWmanual/custom.py225def generate_ebook_convert_help(preamble, app):
LOWmanual/template_ref_generate.py53def generate_template_language_help(language, log):
LOW.github/workflows/macos_crash_report.py363 def application_specific_information(self) -> str | None:
LOW.github/workflows/macos_crash_report.py426def get_crash_report_from_file(crash_report_file: IO) -> CrashReportBase:
LOWbypy/linux/site.py20def setup_openssl_environment():
LOWbypy/windows/wix.py88def get_components_from_files(env):
LOWsrc/calibre/constants.py470def get_windows_user_locale_name():
LOWsrc/calibre/constants.py474def get_windows_number_formats():
LOWsrc/calibre/gui_launch.py48def register_with_default_programs():
LOWsrc/calibre/gui_launch.py77def is_possible_media_pack_error(e):
LOWsrc/calibre/test_build.py586def test_webengine_worker_main():
LOWsrc/calibre/linux.py855 def setup_desktop_integration(self): # {{{
LOWsrc/calibre/linux.py864 def do_setup_desktop_integration(self):
LOWsrc/calibre/scraper/test_fetch_backend.py97 def test_recipe_browser_webengine(self):
LOWsrc/calibre/ebooks/html_transform_rules.py443def transform_conversion_book(oeb, opts, serialized_rules):
LOWsrc/calibre/ebooks/html_transform_rules.py563 def test_html_transform_actions(self):
LOWsrc/calibre/ebooks/chardet.py46def strip_encoding_declarations(raw, limit=50*1024, preserve_newlines=False):
LOWsrc/calibre/ebooks/chardet.py65def replace_encoding_declarations(raw, enc='utf-8', limit=50*1024):
LOWsrc/calibre/ebooks/__init__.py55def extract_cover_from_embedded_svg(html, base, log):
LOWsrc/calibre/ebooks/__init__.py97def render_html_svg_workaround(path_to_html, log, width=1200, height=1600, root=''):
LOWsrc/calibre/ebooks/html_entities.py2139def entity_to_unicode_in_python(match, exceptions=(), encoding='cp1252', result_exceptions={}):
LOWsrc/calibre/ebooks/html_entities.py2179 def test_html_entity_replacement(self):
LOWsrc/calibre/ebooks/css_transform_rules.py127def parse_css_length_or_number(raw, default_unit=None):
LOWsrc/calibre/ebooks/lrf/html/convert_from.py1774 def remove_unused_target_blocks(self):
LOWsrc/calibre/ebooks/lrf/html/table.py199 def text_block_preferred_width(self, tb, debug=False):
LOWsrc/calibre/ebooks/txt/markdownml.py93 def prepare_string_for_markdown(self, txt):
LOWsrc/calibre/ebooks/txt/processor.py138def convert_markdown_with_metadata(txt, title='', extensions=DEFAULT_MD_EXTENSIONS):
LOWsrc/calibre/ebooks/txt/processor.py186def separate_paragraphs_single_line(txt):
LOWsrc/calibre/ebooks/txt/processor.py191def separate_paragraphs_print_formatted(txt):
LOWsrc/calibre/ebooks/txt/processor.py196def separate_hard_scene_breaks(txt):
LOWsrc/calibre/ebooks/txt/processor.py358def get_images_from_polyglot_text(txt: str, base_dir: str = '', file_ext: str = 'txt') -> set:
LOWsrc/calibre/ebooks/txt/textileml.py221 def prepare_string_for_textile(self, txt):
LOWsrc/calibre/ebooks/mobi/utils.py642def convert_color_for_font_tag(val):
LOWsrc/calibre/ebooks/mobi/reader/markup.py261def insert_images_into_markup(parts, resource_map, log):
LOWsrc/calibre/ebooks/mobi/reader/mobi6.py793 def warn_about_trailing_entry_corruption(self):
LOWsrc/calibre/ebooks/mobi/writer8/toc.py35def find_previous_calibre_inline_toc(oeb):
LOWsrc/calibre/ebooks/mobi/writer8/index.py114 def calculate_control_bytes_for_each_entry(cls, entries):
LOWsrc/calibre/ebooks/mobi/writer8/skeleton.py131 def calculate_insert_positions(self):
LOWsrc/calibre/ebooks/mobi/writer8/tbs.py114def encode_strands_as_sequences(strands, tbs_type=8):
LOWsrc/calibre/ebooks/mobi/writer8/tbs.py195def apply_trailing_byte_sequences(index_table, records, text_record_lengths):
LOWsrc/calibre/ebooks/mobi/writer8/main.py253 def replace_internal_links_with_placeholders(self):
LOWsrc/calibre/ebooks/mobi/writer2/indexer.py830 def calculate_trailing_byte_sequences(self):
1081 more matches not shown…
Cross-Language Confusion109 hits · 586 pts
SeverityFileLineSnippet
HIGHsetup/linux-installer.py647 stdout=null, stdin=subprocess.PIPE, close_fds=True, preexec_fn=lambda:
HIGHicons/icns/make_iconsets.py145 subprocess.check_call(['ssh', 'ox', 'sh', '-c', '~/bin/update-calibre && python3 ~/calibre-src/icons/icns/make_i
HIGHsrc/calibre/linux.py461 _zip_cache_list=( ${{(f)"$(zipinfo -1 $_zip_cache_name 2>/dev/null)"}} )
HIGHsrc/calibre/linux.py466 _multi_parts / _zip_cache_list && return 0
HIGHsrc/calibre/linux.py648 pattern="$(basename ${pattern} 2> /dev/null)"
HIGHsrc/calibre/linux.py649 search="$(dirname ${search} 2> /dev/null)"
HIGHsrc/calibre/linux.py657 listing="$(ebook-device ls ${search} 2>/dev/null)"
HIGHsrc/calibre/ebooks/covers.py294 mem = {f:getattr(obj, f, null) for f in fields}
HIGHsrc/calibre/ebooks/covers.py299 if val is null:
HIGHsrc/calibre/ebooks/render_html.py42 default_log.warn(f'Blocking URL request {qurl.toString()} as it is not for a resource related to the HTML fi
HIGHsrc/calibre/ebooks/pdf/html_writer.py345 self.log.warn(f'Blocking URL request {qurl.toString()} as it is not for a resource in the book')
HIGHsrc/calibre/ebooks/oeb/polish/container.py531 ans = self.href_to_name_cache.get(key, null)
HIGHsrc/calibre/ebooks/oeb/polish/container.py532 if ans is null:
HIGHsrc/calibre/ebooks/rtf2xml/pict.py142 self.__write_pic_obj.write('{\\rtf1 \n{\\fonttbl\\f0\\null;} \n')
HIGHsrc/calibre/ebooks/conversion/preprocess.py136 percent is the percentage of lines that should be in a single bucket to return true
HIGHsrc/calibre/ebooks/metadata/opf3_test.py378 "rec_index": 29, "#extra#": null,
HIGHsrc/calibre/ebooks/metadata/opf3_test.py381 {"number_format": null}, "search_terms":
HIGHsrc/calibre/ebooks/metadata/opf3_test.py386 "custom_column_12", "is_multiple": null,
HIGHsrc/calibre/ebooks/metadata/opf3_test.py391 "rec_index": 26, "#extra#": null,
HIGHsrc/calibre/ebooks/metadata/opf3_test.py400 "is_multiple": null, "is_category": true}"/>
HIGHsrc/calibre/ebooks/metadata/opf3_test.py405 "#extra#": null, "colnum": 13,
HIGHsrc/calibre/ebooks/metadata/opf3_test.py432 "is_multiple": null, "is_category": false}"/>
HIGHsrc/calibre/ebooks/metadata/opf3_test.py436 "rec_index": 30, "#extra#": null,
HIGHsrc/calibre/ebooks/metadata/opf3_test.py444 "custom_column_1", "is_multiple": null,
HIGHsrc/calibre/ebooks/metadata/opf3_test.py478 "rec_index": 34, "#extra#": null,
HIGHsrc/calibre/ebooks/metadata/opf3_test.py486 "is_multiple": null, "is_category": false}"/>
HIGHsrc/calibre/ebooks/metadata/opf3_test.py490 "rec_index": 28, "#extra#": null,
HIGHsrc/calibre/ebooks/metadata/opf3_test.py416 "is_multiple": null, "is_category": false}"/>
HIGHsrc/calibre/ebooks/metadata/opf3_test.py420 "rec_index": 25, "#extra#": null,
HIGHsrc/calibre/ebooks/metadata/opf3_test.py457 "custom_column_5", "is_multiple": null,
HIGHsrc/calibre/ebooks/metadata/opf3_test.py462 "rec_index": 33, "#extra#": null,
HIGHsrc/calibre/ebooks/metadata/opf3_test.py501 "is_multiple": null, "is_category": true}"/>
HIGHsrc/calibre/ebooks/metadata/opf3_test.py505 "rec_index": 27, "#extra#": null,
HIGHsrc/calibre/ebooks/metadata/opf3_test.py517 "is_multiple": null, "is_category": false}"/>
HIGHsrc/calibre/ebooks/metadata/opf3_test.py521 "rec_index": 22, "#extra#": null,
HIGHsrc/calibre/ebooks/metadata/opf3_test.py537 "rec_index": 24, "#extra#": null,
HIGHsrc/calibre/ebooks/metadata/opf3_test.py548 "custom_column_2", "is_multiple": null,
HIGHsrc/calibre/ebooks/docx/fields.py64 last_option = field_map.get(token[1], null)
HIGHsrc/calibre/ebooks/docx/fields.py73 ans.pop(null, None)
HIGHsrc/calibre/web/site_parsers/nytimes.py208 'null}}',
HIGHsrc/calibre/utils/forked_map.py121 stack.push(w)
HIGHsrc/calibre/utils/rapydscript.py106 return null;
HIGHsrc/calibre/utils/winreg/lib.py59 def __init__(self, name, typ, default=null, in_arg=True):
HIGHsrc/calibre/utils/winreg/lib.py61 if default is null:
HIGHsrc/calibre/utils/winreg/dde.py99 def __init__(self, name, typ, default=null, in_arg=True):
HIGHsrc/calibre/utils/winreg/dde.py101 if default is null:
HIGHsrc/calibre/gui2/widgets2.py385 self.undo_stack.push(cmd)
HIGHsrc/calibre/gui2/widgets2.py653 if not qurl.scheme() and qurl.hasFragment() and qurl.toString().startswith('#'):
HIGHsrc/calibre/gui2/__init__.py1557 cmd = [x.replace('%u', qurl.toString()) for x in opener]
HIGHsrc/calibre/gui2/comments_editor.py1230 block_len = block.length() # includes block separator
HIGHsrc/calibre/gui2/comments_editor.py1253 flen = frag.length()
HIGHsrc/calibre/gui2/qt_file_dialogs.py118 return url.toString()
HIGHsrc/calibre/gui2/tweak_book/preview.py291 if (settings.bg || settings.fg || settings.link) using_custom_colors = true;
HIGHsrc/calibre/gui2/tweak_book/preview.py292 if (settings.is_dark_theme && using_custom_colors) { css = ':root { color-scheme: dark; }' + css; }
HIGHsrc/calibre/gui2/tweak_book/preview.py363 prints('Blocking navigation request to:', url.toString())
HIGHsrc/calibre/gui2/tweak_book/check_links.py153 url = qurl.toString()
HIGHsrc/calibre/gui2/tweak_book/editor/canvas.py272 self.undo_stack.push(Replace(x.toImage(), _('Drop image'), self))
HIGHsrc/calibre/gui2/tweak_book/editor/canvas.py281 self.undo_stack.push(Replace(img, _('Drop image'), self))
HIGHsrc/calibre/gui2/tweak_book/editor/canvas.py372 self.undo_stack.push(Replace(img, _('Paste image'), self))
HIGHsrc/calibre/gui2/tweak_book/editor/canvas.py390 self.undo_stack.push(Trim(self))
49 more matches not shown…
Cross-File Repetition72 hits · 360 pts
SeverityFileLineSnippet
HIGHsetup/polib.py0convenience method to keep the same interface with pofile instances.
HIGHsetup/polib.py0convenience method to keep the same interface with pofile instances.
HIGHsetup/polib.py0convenience method to keep the same interface with pofile instances.
HIGHsetup/polib.py0convenience method to keep the same interface with pofile instances.
HIGHsetup/polib.py0convenience method to keep the same interface with pofile instances.
HIGHsrc/calibre/ebooks/txt/markdownml.py0@elem: the element in the etree that we are working on. @stylizer: the style information attached to the element.
HIGHsrc/calibre/ebooks/txt/textileml.py0@elem: the element in the etree that we are working on. @stylizer: the style information attached to the element.
HIGHsrc/calibre/ebooks/htmlz/oeb2html.py0@elem: the element in the etree that we are working on. @stylizer: the style information attached to the element.
HIGHsrc/calibre/ebooks/htmlz/oeb2html.py0@elem: the element in the etree that we are working on. @stylizer: the style information attached to the element.
HIGHsrc/calibre/ebooks/htmlz/oeb2html.py0@elem: the element in the etree that we are working on. @stylizer: the style information attached to the element.
HIGHsrc/calibre/ebooks/mobi/reader/headers.py0remove all duplicates from vals, while preserving order.
HIGHsrc/calibre/ebooks/metadata/odt.py0remove all duplicates from vals, while preserving order.
HIGHsrc/calibre/ebooks/metadata/opf3.py0remove all duplicates from vals, while preserving order.
HIGHsrc/calibre/gui2/tweak_book/preview.py0remove all duplicates from vals, while preserving order.
HIGHsrc/calibre/ebooks/rtf2xml/old_rtf.py0required: 'file'--file to parse 'table_data' -- a dictionary for each table. optional: 'copy'-- whether to make a copy o
HIGHsrc/calibre/ebooks/rtf2xml/body_styles.py0required: 'file'--file to parse 'table_data' -- a dictionary for each table. optional: 'copy'-- whether to make a copy o
HIGHsrc/calibre/ebooks/rtf2xml/table_info.py0required: 'file'--file to parse 'table_data' -- a dictionary for each table. optional: 'copy'-- whether to make a copy o
HIGHsrc/calibre/ebooks/rtf2xml/sections.py0required: 'file'--file to parse optional: 'copy'-- whether to make a copy of result for debugging 'temp_dir' --where to
HIGHsrc/calibre/ebooks/rtf2xml/paragraphs.py0required: 'file'--file to parse optional: 'copy'-- whether to make a copy of result for debugging 'temp_dir' --where to
HIGHsrc/calibre/ebooks/rtf2xml/add_brackets.py0required: 'file'--file to parse optional: 'copy'-- whether to make a copy of result for debugging 'temp_dir' --where to
HIGHsrc/calibre/ebooks/rtf2xml/fields_large.py0required: 'file'--file to parse optional: 'copy'-- whether to make a copy of result for debugging 'temp_dir' --where to
HIGHsrc/calibre/ebooks/rtf2xml/fields_small.py0required: 'file'--file to parse optional: 'copy'-- whether to make a copy of result for debugging 'temp_dir' --where to
HIGHsrc/calibre/ebooks/rtf2xml/styles.py0required: 'file'--file to parse optional: 'copy'-- whether to make a copy of result for debugging 'temp_dir' --where to
HIGHsrc/calibre/ebooks/rtf2xml/table.py0required: 'file'--file to parse optional: 'copy'-- whether to make a copy of result for debugging 'temp_dir' --where to
HIGHsrc/calibre/ebooks/rtf2xml/info.py0required: 'file'--file to parse optional: 'copy'-- whether to make a copy of result for debugging 'temp_dir' --where to
HIGHsrc/calibre/ebooks/rtf2xml/inline.py0required: 'file'--file to parse optional: 'copy'-- whether to make a copy of result for debugging 'temp_dir' --where to
HIGHsrc/calibre/ebooks/rtf2xml/colors.py0required: 'file'--file to parse optional: 'copy'-- whether to make a copy of result for debugging 'temp_dir' --where to
HIGHsrc/calibre/ebooks/rtf2xml/group_borders.py0form lists. use rtf's own formatting to determine if a paragraph definition is part of a list. use indents to determine
HIGHsrc/calibre/ebooks/rtf2xml/make_lists.py0form lists. use rtf's own formatting to determine if a paragraph definition is part of a list. use indents to determine
HIGHsrc/calibre/ebooks/rtf2xml/group_styles.py0form lists. use rtf's own formatting to determine if a paragraph definition is part of a list. use indents to determine
HIGHsrc/calibre/ebooks/rtf2xml/group_borders.py0required: 'file' optional: 'copy'-- whether to make a copy of result for debugging 'temp_dir' --where to output temporar
HIGHsrc/calibre/ebooks/rtf2xml/list_numbers.py0required: 'file' optional: 'copy'-- whether to make a copy of result for debugging 'temp_dir' --where to output temporar
HIGHsrc/calibre/ebooks/rtf2xml/convert_to_tags.py0required: 'file' optional: 'copy'-- whether to make a copy of result for debugging 'temp_dir' --where to output temporar
HIGHsrc/calibre/ebooks/rtf2xml/headings_to_sections.py0required: 'file' optional: 'copy'-- whether to make a copy of result for debugging 'temp_dir' --where to output temporar
HIGHsrc/calibre/ebooks/rtf2xml/preamble_div.py0required: 'file' optional: 'copy'-- whether to make a copy of result for debugging 'temp_dir' --where to output temporar
HIGHsrc/calibre/ebooks/rtf2xml/make_lists.py0required: 'file' optional: 'copy'-- whether to make a copy of result for debugging 'temp_dir' --where to output temporar
HIGHsrc/calibre/ebooks/rtf2xml/group_styles.py0required: 'file' optional: 'copy'-- whether to make a copy of result for debugging 'temp_dir' --where to output temporar
HIGHsrc/calibre/ebooks/rtf2xml/group_borders.py0required: nothing return: nothing logic: the self.__end_list is a list of tokens that will force a list to end. likewise
HIGHsrc/calibre/ebooks/rtf2xml/headings_to_sections.py0required: nothing return: nothing logic: the self.__end_list is a list of tokens that will force a list to end. likewise
HIGHsrc/calibre/ebooks/rtf2xml/make_lists.py0required: nothing return: nothing logic: the self.__end_list is a list of tokens that will force a list to end. likewise
HIGHsrc/calibre/ebooks/rtf2xml/group_styles.py0required: nothing return: nothing logic: the self.__end_list is a list of tokens that will force a list to end. likewise
HIGHsrc/calibre/ebooks/rtf2xml/group_borders.py0required: line -- the line of current text. return: nothing logic: you are in a list, but in the middle of a paragraph d
HIGHsrc/calibre/ebooks/rtf2xml/make_lists.py0required: line -- the line of current text. return: nothing logic: you are in a list, but in the middle of a paragraph d
HIGHsrc/calibre/ebooks/rtf2xml/group_styles.py0required: line -- the line of current text. return: nothing logic: you are in a list, but in the middle of a paragraph d
HIGHsrc/calibre/ebooks/rtf2xml/group_borders.py0required: self, line returns: nothing logic look for the start of a paragraph definition. if one is found, check if it c
HIGHsrc/calibre/ebooks/rtf2xml/headings_to_sections.py0required: self, line returns: nothing logic look for the start of a paragraph definition. if one is found, check if it c
HIGHsrc/calibre/ebooks/rtf2xml/make_lists.py0required: self, line returns: nothing logic look for the start of a paragraph definition. if one is found, check if it c
HIGHsrc/calibre/ebooks/rtf2xml/group_styles.py0required: self, line returns: nothing logic look for the start of a paragraph definition. if one is found, check if it c
HIGHsrc/calibre/ebooks/rtf2xml/group_borders.py0required: nothing returns: original file will be changed logic:
HIGHsrc/calibre/ebooks/rtf2xml/headings_to_sections.py0required: nothing returns: original file will be changed logic:
HIGHsrc/calibre/ebooks/rtf2xml/make_lists.py0required: nothing returns: original file will be changed logic:
HIGHsrc/calibre/ebooks/rtf2xml/group_styles.py0required: nothing returns: original file will be changed logic:
HIGHsrc/calibre/ebooks/rtf2xml/field_strings.py0required: field_name -- the first word in the string name --the changed name according to the dictionary line -- the str
HIGHsrc/calibre/ebooks/rtf2xml/field_strings.py0required: field_name -- the first word in the string name --the changed name according to the dictionary line -- the str
HIGHsrc/calibre/ebooks/rtf2xml/field_strings.py0required: field_name -- the first word in the string name --the changed name according to the dictionary line -- the str
HIGHsrc/calibre/ebooks/metadata/tag_mapper.py0remove all duplicates from vals, while preserving order. kmap must be a callable that returns a hashable value for every
HIGHsrc/calibre/ebooks/metadata/xmp.py0remove all duplicates from vals, while preserving order. kmap must be a callable that returns a hashable value for every
HIGHsrc/calibre/ebooks/metadata/author_mapper.py0remove all duplicates from vals, while preserving order. kmap must be a callable that returns a hashable value for every
HIGHsrc/calibre/spell/import_from.py0remove all duplicates from vals, while preserving order. kmap must be a callable that returns a hashable value for every
HIGHsrc/calibre/gui2/dialogs/opml.py0remove all duplicates from vals, while preserving order. kmap must be a callable that returns a hashable value for every
12 more matches not shown…
Unused Imports300 hits · 296 pts
SeverityFileLineSnippet
LOWsetup/linux-installer.py4
LOWsetup/linux-installer.py4
LOWsetup/linux-installer.py4
LOWsetup/linux-installer.py4
LOWsetup/commands.py73
LOWbypy/windows/__main__.py18
LOWsrc/calibre/test_build.py113
LOWsrc/calibre/ebooks/BeautifulSoup.py6
LOWsrc/calibre/ebooks/BeautifulSoup.py6
LOWsrc/calibre/ebooks/BeautifulSoup.py6
LOWsrc/calibre/ebooks/BeautifulSoup.py6
LOWsrc/calibre/ebooks/BeautifulSoup.py6
LOWsrc/calibre/ebooks/BeautifulSoup.py6
LOWsrc/calibre/ebooks/BeautifulSoup.py6
LOWsrc/calibre/ebooks/BeautifulSoup.py6
LOWsrc/calibre/ebooks/oeb/polish/tests/main.py16
LOWsrc/calibre/ebooks/conversion/plumber.py1034
LOWsrc/calibre/ebooks/conversion/plugins/pdf_output.py153
LOWsrc/calibre/ebooks/metadata/opf3_test.py61
LOWsrc/calibre/ebooks/metadata/opf3_test.py61
LOWsrc/calibre/ebooks/metadata/sources/edelweiss.py3
LOWsrc/calibre/ebooks/metadata/sources/edelweiss.py3
LOWsrc/calibre/ebooks/metadata/sources/edelweiss.py3
LOWsrc/calibre/ebooks/metadata/sources/edelweiss.py3
LOWsrc/calibre/ebooks/metadata/sources/openlibrary.py3
LOWsrc/calibre/ebooks/metadata/sources/openlibrary.py3
LOWsrc/calibre/ebooks/metadata/sources/openlibrary.py3
LOWsrc/calibre/ebooks/metadata/sources/openlibrary.py3
LOWsrc/calibre/ebooks/metadata/sources/__init__.py3
LOWsrc/calibre/ebooks/metadata/sources/__init__.py3
LOWsrc/calibre/ebooks/metadata/sources/__init__.py3
LOWsrc/calibre/ebooks/metadata/sources/__init__.py3
LOWsrc/calibre/ebooks/metadata/sources/google_images.py3
LOWsrc/calibre/ebooks/metadata/sources/google_images.py3
LOWsrc/calibre/ebooks/metadata/sources/google_images.py3
LOWsrc/calibre/ebooks/metadata/sources/google_images.py3
LOWsrc/calibre/ebooks/metadata/sources/google.py4
LOWsrc/calibre/ebooks/metadata/sources/google.py4
LOWsrc/calibre/ebooks/metadata/sources/google.py4
LOWsrc/calibre/ebooks/metadata/sources/google.py4
LOWsrc/calibre/ebooks/metadata/sources/test.py3
LOWsrc/calibre/ebooks/metadata/sources/test.py3
LOWsrc/calibre/ebooks/metadata/sources/test.py3
LOWsrc/calibre/ebooks/metadata/sources/test.py3
LOWsrc/calibre/ebooks/metadata/sources/prefs.py3
LOWsrc/calibre/ebooks/metadata/sources/prefs.py3
LOWsrc/calibre/ebooks/metadata/sources/prefs.py3
LOWsrc/calibre/ebooks/metadata/sources/prefs.py3
LOWsrc/calibre/ebooks/metadata/sources/covers.py3
LOWsrc/calibre/ebooks/metadata/sources/covers.py3
LOWsrc/calibre/ebooks/metadata/sources/covers.py3
LOWsrc/calibre/ebooks/metadata/sources/covers.py3
LOWsrc/calibre/ebooks/metadata/sources/base.py3
LOWsrc/calibre/ebooks/metadata/sources/base.py3
LOWsrc/calibre/ebooks/metadata/sources/base.py3
LOWsrc/calibre/ebooks/metadata/sources/base.py3
LOWsrc/calibre/ebooks/metadata/sources/search_engines.py5
LOWsrc/calibre/ebooks/metadata/sources/search_engines.py5
LOWsrc/calibre/ebooks/metadata/sources/search_engines.py5
LOWsrc/calibre/ebooks/metadata/sources/search_engines.py5
240 more matches not shown…
Over-Commented Block314 hits · 288 pts
SeverityFileLineSnippet
LOWChangelog.txt1# vim: ft=yaml
LOWresources/calibre-portable.sh1#!/bin/bash
LOWresources/calibre-portable.sh21# this script file). This structure can also be used when
LOWresources/calibre-portable.sh41# - calibre-portable.sh to run the Linux version
LOWresources/calibre-portable.sh121# Create or read configuration file.
LOWresources/calibre-portable.sh141 #
LOWresources/calibre-portable.sh161 # -- library is on a (slow) network drive. Putting the metadata.db
LOWresources/calibre-portable.sh181 # -- at the bottom of the calibre main screen.
LOWresources/calibre-portable.sh201 #
LOWresources/calibre-portable.sh221 ################################################################
LOWresources/calibre-portable.sh241 #
LOWresources/default_tweaks.py1#!/usr/bin/env python
LOWresources/default_tweaks.py21# a number - Assign that number always. The number is not in quotes. Note that 0.0 can be used here.
LOWresources/default_tweaks.py41# Set this if the completion separator should be appended to the end of the
LOWresources/default_tweaks.py61#
LOWresources/default_tweaks.py81 'Software', 'Games', 'Entertainment', 'Media', 'Studios',
LOWresources/default_tweaks.py101# the list because although it is guaranteed that author and series names are
LOWresources/default_tweaks.py121# values that are obtained by using a suffix. For example, first.name for an
LOWresources/default_tweaks.py141# For example, set it to [('authors',0),('title',0)] to sort by
LOWresources/default_tweaks.py161# mm the minutes with a leading 0 (00 to 59)
LOWresources/default_tweaks.py181# Control title and series sorting in the library view. If set to
LOWresources/default_tweaks.py201# title will not be changed. If processing series, then if set to
LOWresources/default_tweaks.py261 'ell': (r'O\s+', r'I\s+', r'To\s+', r'Ta\s+', r'Tus\s+', r'Tis\s+',
LOWresources/default_tweaks.py281# metadata management is set to automatic. Collections on SONYs are named
LOWresources/default_tweaks.py301# merging all of the fields into one set of collections.
LOWresources/default_tweaks.py321# column lookup names are 'series', '#series_1' and '#series_2'. I want nothing
LOWresources/default_tweaks.py341sony_collection_name_template = '{value}{category:| (|)}'
LOWresources/default_tweaks.py361#: Control how tags are applied when copying books to another library
LOWresources/default_tweaks.py381# The value used for the fuzz distance when trimming a cover.
LOWresources/default_tweaks.py401#: Language to use when sorting
LOWresources/default_tweaks.py421public_smtp_relay_delay = 301
LOWresources/default_tweaks.py441# various bugs, for instance the minimum width of the toolbar becomes twice
LOWresources/default_tweaks.py461#: Change the font size of the Book details panel in the interface
LOWresources/default_tweaks.py481default_tweak_format = None
LOWresources/default_tweaks.py501# all candidates that contain the text you have already typed. To do this, set
LOWresources/default_tweaks.py521
LOWresources/default_tweaks.py541# Examples:
LOWresources/default_tweaks.py561# Sets the width of the tab stop in the template editor in "average characters".
LOWresources/default_tweaks.py581# using these functions in composites can be very slow.
LOWresources/default_tweaks.py601#: East Asian language to use for transliteration
LOWresources/default_tweaks.py621hide_ai_features = False
LOWresources/csscolorparser.js1// (c) Dean McNamee <dean@gmail.com>, 2012.
LOWsetup/hosting.py401 try:
LOWsetup/hosting.py421 # f'root@{server}:{rdir}'])
LOWsetup/polib.py1281 # * OC: a file/line occurrence
LOWsetup/linux-installer.sh481 # speed up common case w/o wildcards
LOWmanual/conf.py1# calibre documentation build configuration file, created by
LOWmanual/plugin_examples/interface_demo/ui.py21
LOWmanual/plugin_examples/interface_demo/ui.py41 # should pass a list of names to get_icons. In this case, get_icons
LOWmanual/plugin_examples/editor_demo/main.py121 # We should also be dealing with the font shorthand property and
LOWbypy/run-python.h1/*
LOWbypy/linux/util.h1#pragma once
LOWbypy/windows/util.c1/*
LOWbypy/windows/portable-installer.cpp1#ifndef UNICODE
LOWbypy/windows/XUnzip.cpp1// XUnzip.cpp Version 1.3
LOWbypy/windows/XUnzip.cpp21// Version 1.1: - Added Unicode support to CreateZip() and ZipAdd()
LOWbypy/windows/XUnzip.cpp41// Copyright (c) 1990-2002 Info-ZIP. All rights reserved.
LOWbypy/windows/XUnzip.cpp61// freely, subject to the following restrictions:
LOWbypy/windows/XUnzip.cpp81// including, but not limited to, different capitalizations),
LOWbypy/windows/XUnzip.cpp101#include <tchar.h>
254 more matches not shown…
Decorative Section Separators51 hits · 159 pts
SeverityFileLineSnippet
MEDIUMresources/calibre-portable.sh54# -----------------------------------------------------
MEDIUMresources/calibre-portable.sh60# -----------------------------------------------------
MEDIUMresources/calibre-portable.sh370# --------------------------------------------------------------
MEDIUMresources/calibre-portable.sh372# --------------------------------------------------------------
MEDIUMresources/calibre-portable.sh379# ---------------------------------------------------------------
MEDIUMresources/calibre-portable.sh381# ---------------------------------------------------------------
MEDIUMresources/calibre-portable.sh390# --------------------------------------------------------
MEDIUMresources/calibre-portable.sh392# --------------------------------------------------------
MEDIUMresources/calibre-portable.sh79# ------------------------------------------------
MEDIUMresources/calibre-portable.sh81# ------------------------------------------------
MEDIUMresources/calibre-portable.sh120# ------------------------------------------------
MEDIUMresources/calibre-portable.sh122# ------------------------------------------------
MEDIUMresources/calibre-portable.sh272# ------------------------------------------------
MEDIUMresources/calibre-portable.sh274# ------------------------------------------------
MEDIUMresources/calibre-portable.sh286# --------------------------------------------------------------
MEDIUMresources/calibre-portable.sh288# --------------------------------------------------------------
MEDIUMresources/calibre-portable.sh305# --------------------------------------------------------------
MEDIUMresources/calibre-portable.sh307# --------------------------------------------------------------
MEDIUMresources/calibre-portable.sh320# --------------------------------------------------------------
MEDIUMresources/calibre-portable.sh322# --------------------------------------------------------------
MEDIUMresources/calibre-portable.sh334# --------------------------------------------------------------
MEDIUMresources/calibre-portable.sh336# --------------------------------------------------------------
MEDIUMresources/calibre-portable.sh354# --------------------------------------------------------------
MEDIUMresources/calibre-portable.sh356# --------------------------------------------------------------
MEDIUMmanual/conf.py33# ---------------------
MEDIUMmanual/conf.py127# -----------------------
MEDIUMmanual/conf.py227# ------------------------
MEDIUMsrc/calibre/ebooks/lit/mssha1.py13# ======================================================================
MEDIUMsrc/calibre/ebooks/lit/mssha1.py18# ======================================================================
MEDIUMsrc/calibre/ebooks/lit/mssha1.py73# ======================================================================
MEDIUMsrc/calibre/ebooks/lit/mssha1.py76# ======================================================================
MEDIUMsrc/calibre/ebooks/lit/mssha1.py293# ======================================================================
MEDIUMsrc/calibre/ebooks/lit/mssha1.py296# ======================================================================
MEDIUMsrc/calibre/devices/usbms/device.py692# ------------------------------------------------------
MEDIUMsrc/calibre/devices/usbms/device.py790# ------------------------------------------------------
MEDIUMsrc/calibre/devices/usbms/device.py808# ------------------------------------------------------
MEDIUMsrc/odf/odfmanifest.py30# -----------------------------------------------------------------------------
MEDIUMsrc/odf/odfmanifest.py34# -----------------------------------------------------------------------------
MEDIUMsrc/odf/odfmanifest.py85# -----------------------------------------------------------------------------
MEDIUMsrc/odf/odfmanifest.py89# -----------------------------------------------------------------------------
MEDIUMsrc/odf/odf2moinmoin.py313# -----------------------------------
MEDIUMsrc/odf/odf2moinmoin.py387# -----------------------------------
MEDIUMsrc/odf/odf2xhtml.py370# -----------------------------------------------------------------------------
MEDIUMsrc/odf/odf2xhtml.py374# -----------------------------------------------------------------------------
MEDIUMsrc/odf/odf2xhtml.py582# --------------------------------------------------
MEDIUMsrc/odf/odf2xhtml.py584# --------------------------------------------------
MEDIUMsrc/odf/odf2xhtml.py609# --------------------------------------------------
MEDIUMsrc/odf/odf2xhtml.py652# -----------------------------------------------------------------------------
MEDIUMsrc/odf/odf2xhtml.py656# -----------------------------------------------------------------------------
MEDIUMsrc/odf/odf2xhtml.py1582 # -----------------------------------------------------------------------------
MEDIUMsrc/odf/odf2xhtml.py1586 # -----------------------------------------------------------------------------
Self-Referential Comments53 hits · 140 pts
SeverityFileLineSnippet
MEDIUMmanual/conf.py4# This file is execfile()d with the current directory set to its containing dir.
MEDIUMmanual/plugin_examples/interface_demo/ui.py32 # This method is called once per plugin, do initial setup here
MEDIUMmanual/plugin_examples/editor_demo/main.py32 # Create an action, this will be added to the plugins toolbar and
MEDIUMsrc/calibre/ebooks/mobi/writer8/index.py208 # Create the Index Header record
MEDIUMsrc/calibre/ebooks/mobi/writer8/skeleton.py200 # Create the SKEL and Chunk tables
MEDIUMsrc/calibre/ebooks/mobi/writer8/main.py49 # Create an inline ToC if one does not already exist
MEDIUMsrc/calibre/ebooks/mobi/writer2/main.py435 # Create the MOBI 6 EXTH
MEDIUMsrc/calibre/ebooks/fb2/fb2ml.py281 # Create main section if there are no others to create
MEDIUMsrc/calibre/ebooks/conversion/plumber.py1058 # Create an OEBBook from the input file. The input plugin does all the
MEDIUMsrc/calibre/ebooks/metadata/mobi.py259 # Create an updated Record0
MEDIUMsrc/calibre/ebooks/metadata/ereader.py77 # Create a metadata record for the file if one does not already exist
MEDIUMsrc/calibre/ebooks/pdb/plucker/reader.py409 # Create a new image the total size of all image
MEDIUMsrc/calibre/library/database2.py165 # Create the lock to be used to guard access to the metadata writer
MEDIUMsrc/calibre/library/database2.py3045 # Create the temporary tables to store the ids for books and tags
MEDIUMsrc/calibre/library/custom_columns.py454 # Create the temporary temp_tables to store the ids for books and tags
MEDIUMsrc/calibre/library/catalogs/epub_mobi_builder.py1487 # Create a divRunningTag for the next author
MEDIUMsrc/calibre/library/catalogs/epub_mobi_builder.py1639 # Create a new month anchor
MEDIUMsrc/calibre/library/catalogs/epub_mobi_builder.py1897 # Create a new day anchor
MEDIUMsrc/calibre/library/catalogs/epub_mobi_builder.py2202 # Create an anchor from the tag
MEDIUMsrc/calibre/library/catalogs/epub_mobi_builder.py3285 # Create an NCX article entry for each populated author index letter
MEDIUMsrc/calibre/library/catalogs/epub_mobi_builder.py3365 # Create an NCX article entry for each date range
MEDIUMsrc/calibre/library/catalogs/epub_mobi_builder.py3399 # Create an NCX article entry for each populated month
MEDIUMsrc/calibre/library/catalogs/epub_mobi_builder.py3473 # Create an NCX article entry for each date range
MEDIUMsrc/calibre/library/catalogs/epub_mobi_builder.py3495 # Create an NCX article entry for each populated day
MEDIUMsrc/calibre/library/catalogs/epub_mobi_builder.py3632 # Create the OPF tags
MEDIUMsrc/calibre/library/catalogs/bibtex.py352 # Initialize BibTeX class
MEDIUMsrc/calibre/utils/certgen.py69 # Create the Certificate Authority
MEDIUMsrc/calibre/utils/certgen.py76 # Create the server certificate issued by the newly created CA
MEDIUMsrc/calibre/gui2/complete2.py620 # Create a Qt user property for the current text so that when this widget
MEDIUMsrc/calibre/gui2/device.py1863 # Define the cleaning function
MEDIUMsrc/calibre/gui2/tools.py342 # Create the output file
MEDIUMsrc/calibre/gui2/tools.py374 # Create a temporary copy of the databases to pass into the generation
MEDIUMsrc/calibre/gui2/__init__.py1135 # This class is present only for backwards compat with third party plugins
MEDIUMsrc/calibre/gui2/comments_editor.py1222 # Create a cursor at start to find the first block
MEDIUMsrc/calibre/gui2/tweak_book/editor/widget.py635 # Create the actions that are placed into the editors toolbars
MEDIUMsrc/calibre/gui2/catalog/catalog_epub_mobi.py1342 # Create a list of prefixes for user selection
MEDIUMsrc/calibre/gui2/library/alternate_views.py102 # Create a range based selector for each set of contiguous rows
MEDIUMsrc/calibre/gui2/library/bookshelf_view.py690 # Create a larger image to accommodate the shadow
MEDIUMsrc/calibre/gui2/library/views.py1501 # Create a range based selector for each set of contiguous rows
MEDIUMsrc/calibre/gui2/convert/gui_conversion.py57 # Create a minimal OptionParser that we can append to
MEDIUMsrc/calibre/gui2/store/search/search.py325 # Create the config dialog. It's going to put two config widgets
MEDIUMsrc/calibre/srv/metadata.py300 # Create the basic tree, containing all top level categories, user
MEDIUMsrc/calibre/devices/interface.py645 # The following methods are probably called on the GUI thread. Any driver
MEDIUMsrc/calibre/devices/kindle/driver.py624 # Create the sidecar folder if necessary
MEDIUMsrc/calibre/devices/folder_device/driver.py12# This class is added to the standard device plugin chain, so that it can
MEDIUMsrc/calibre/devices/mtp/test.py73 # Create a folder
MEDIUMsrc/calibre/devices/mtp/test.py82 # Create a sub-folder
MEDIUMsrc/calibre/devices/mtp/test.py107 # Create a folder
MEDIUMsrc/calibre/devices/kobo/driver.py930 # Create a connection to the sqlite database
MEDIUMsrc/calibre/devices/kobo/driver.py2646 # Create a connection to the sqlite database
MEDIUMsrc/odf/element.py32# The following code is pasted form xml.sax.saxutils
MEDIUMsrc/odf/grammar.py51# The following code is generated from the RelaxNG schema with this notice:
MEDIUMsrc/odf/load.py70 # Create the element
Hallucination Indicators13 hits · 120 pts
SeverityFileLineSnippet
CRITICALsrc/calibre/gui2/tweak_book/preview.py537 self.view._page.bridge.request_sync.connect(self.request_sync)
CRITICALsrc/calibre/gui2/tweak_book/preview.py538 self.view._page.bridge.request_split.connect(self.request_split)
CRITICALsrc/calibre/gui2/tweak_book/preview.py539 self.view._page.bridge.live_css_data.connect(self.live_css_data)
CRITICALsrc/calibre/gui2/tweak_book/preview.py540 self.view._page.bridge.bridge_ready.connect(self.on_bridge_ready)
CRITICALsrc/calibre/gui2/tweak_book/boss.py179 self.gui.central.search_panel.search_triggered.connect(self.search)
CRITICALsrc/calibre/gui2/tweak_book/boss.py197 self.gui.central.search_panel.save_search.connect(self.save_search)
CRITICALsrc/calibre/gui2/tweak_book/boss.py198 self.gui.central.search_panel.show_saved_searches.connect(self.show_saved_searches)
CRITICALsrc/calibre/db/cache.py493 self.backend.fts.pool.initialized.wait()
CRITICALsrc/calibre/srv/tests/content.py81 db = server.handler.router.ctx.library_broker.get(None)
CRITICALsrc/calibre/srv/tests/ajax.py38 db = server.handler.router.ctx.library_broker.get(None)
CRITICALsrc/calibre/srv/tests/ajax.py93 db = server.handler.router.ctx.library_broker.get(None)
CRITICALsrc/calibre/srv/tests/ajax.py129 db = server.handler.router.ctx.library_broker.get(None)
CRITICALsrc/calibre/srv/tests/ajax.py161 db = server.handler.router.ctx.library_broker.get(None)
Dead Code34 hits · 68 pts
SeverityFileLineSnippet
MEDIUMsrc/calibre/ebooks/pdf/html_writer.py602
MEDIUMsrc/calibre/ebooks/pdf/html_writer.py604
MEDIUMsrc/calibre/ebooks/pdf/reflow.py1188
MEDIUMsrc/calibre/ebooks/pdf/reflow.py1189
MEDIUMsrc/calibre/ebooks/pdf/reflow.py1191
MEDIUMsrc/calibre/ebooks/pdf/reflow.py1193
MEDIUMsrc/calibre/ebooks/pdf/reflow.py1194
MEDIUMsrc/calibre/ebooks/pdf/reflow.py1195
MEDIUMsrc/calibre/ebooks/pdf/reflow.py1205
MEDIUMsrc/calibre/ebooks/pdf/reflow.py1208
MEDIUMsrc/calibre/ebooks/pdf/reflow.py1213
MEDIUMsrc/calibre/ebooks/pdf/reflow.py1214
MEDIUMsrc/calibre/ebooks/pdf/reflow.py1347
MEDIUMsrc/calibre/ebooks/rtf2xml/process_tokens.py731
MEDIUMsrc/calibre/ebooks/rtf2xml/process_tokens.py732
MEDIUMsrc/calibre/ebooks/rtf2xml/process_tokens.py734
MEDIUMsrc/calibre/ebooks/metadata/xisbn.py38
MEDIUMsrc/calibre/ebooks/metadata/xisbn.py39
MEDIUMsrc/calibre/ebooks/metadata/xisbn.py40
MEDIUMsrc/calibre/ebooks/metadata/xisbn.py41
MEDIUMsrc/calibre/ebooks/metadata/xisbn.py43
MEDIUMsrc/calibre/ebooks/metadata/xisbn.py44
MEDIUMsrc/calibre/ebooks/metadata/xisbn.py45
MEDIUMsrc/calibre/ebooks/metadata/xisbn.py51
MEDIUMsrc/calibre/ai/open_router/config.py266
MEDIUMsrc/odf/odf2moinmoin.py302
MEDIUMsrc/odf/odf2moinmoin.py303
MEDIUMsrc/odf/odf2moinmoin.py304
MEDIUMsrc/odf/odf2moinmoin.py305
MEDIUMsrc/odf/odf2moinmoin.py311
MEDIUMsrc/odf/odf2moinmoin.py553
MEDIUMsrc/odf/odf2moinmoin.py564
MEDIUMsrc/odf/odf2xhtml.py791
MEDIUMsrc/odf/odf2xhtml.py798
Redundant / Tautological Comments46 hits · 64 pts
SeverityFileLineSnippet
LOWresources/calibre-portable.sh63 # Check if user has disabled cleanup
LOWresources/default_tweaks.py362# Set this to True to ensure that tags in 'Tags to add when adding
LOWsrc/calibre/prints.py76 # Set base_time to the current monotonic time if it hasn't been set
LOWsrc/calibre/prints.py79 # Check if debugging is enabled
LOWsrc/calibre/ebooks/odt/input.py202 # Check if we have only class selectors for this rule
LOWsrc/calibre/ebooks/mobi/writer8/skeleton.py165 # Set this to a list to enable dumping of the original and rebuilt
LOWsrc/calibre/ebooks/pdf/reflow.py764 # Set margins to values that will get adjusted
LOWsrc/calibre/ebooks/oeb/stylizer.py392 # Check if either height or width is not default
LOWsrc/calibre/ebooks/oeb/transforms/metadata.py206 # Check if the resulting HTML has no content, if so remove it
LOWsrc/calibre/ebooks/oeb/polish/cover.py470 # Check if the first item in the spine is a simple cover wrapper
LOWsrc/calibre/ebooks/snb/snbfile.py68 # Read files
LOWsrc/calibre/ebooks/snb/snbfile.py275 # Write file end mark
LOWsrc/calibre/ebooks/conversion/plugins/epub_input.py183 # Check if the cover specified in the guide is also
LOWsrc/calibre/ebooks/conversion/plugins/htmlz_input.py51 # Set index to the first HTML file found if it's not
LOWsrc/calibre/ebooks/docx/index.py35 # Check if the xe field is contained inside a bookmark with the
LOWsrc/calibre/ebooks/docx/cleanup.py221 # Check if the first image in the document is possibly a cover
LOWsrc/calibre/library/database2.py669 # Check if the metadata used to construct paths has changed
LOWsrc/calibre/utils/zipfile.py384 # Set these to zero because we write them after the file data
LOWsrc/calibre/utils/zipfile.py781 # Check if we were passed a file-like object
LOWsrc/calibre/utils/formatter.py780 # Check if we have a keyword-type expression
LOWsrc/calibre/utils/formatter.py810 # Check if it is a known one. We do this here so error reporting is
LOWsrc/calibre/utils/img.py290 # Check if we were minified
LOWsrc/calibre/gui2/momentum_scroll.py269 # Check if we should stop
LOWsrc/calibre/gui2/__init__.py772 # Set skip_dialog_name to a unique name for this dialog
LOWsrc/calibre/gui2/__init__.py773 # Set skip_dialog_msg to a message displayed to the user
LOWsrc/calibre/gui2/tweak_book/editor/syntax/html.py123 # Check if we should still be bold or italic
LOWsrc/calibre/gui2/tweak_book/editor/smarts/html.py835 # Check if we are in comment/PI/etc.
LOW…bre/gui2/preferences/look_feel_tabs/tb_partitioning.py51 # Check if setting not migrated yet
LOWsrc/calibre/gui2/tag_browser/ui.py92 # Check if the current cell is a category. If so, show an action for it
LOWsrc/calibre/gui2/tag_browser/model.py1653 # Check if the new name with the same category already exists. If
LOWsrc/calibre/gui2/tag_browser/view.py468 # Check if we are moving the focus and we are at the beginning or the
LOWsrc/calibre/gui2/tag_browser/view.py597 # Check if one of the link or note icons was clicked. If so, deal with
LOWsrc/calibre/gui2/tag_browser/view.py1492 # Check if this is an intra-hierarchical-category drag/drop
LOWsrc/calibre/gui2/library/models.py119 # Check if the correct themed icon exists.
LOWsrc/calibre/gui2/fts/cards.py451 # Assign cards to rows
LOWsrc/calibre/gui2/dialogs/template_dialog_code_widget.py184 # Check if there is a selection. If not then only Shift-Tab is valid
LOWsrc/calibre/gui2/dialogs/quickview.py574 # Check if we are in the GridView and there are no values for the
LOWsrc/calibre/db/cache.py1186 # Check if virtual_libraries_for_books rebuilt its cache. If it did then
LOWsrc/calibre/db/tables.py315 # Check if all the books with the item are in the restriction. If
LOWsrc/calibre/db/tables.py463 # Check if all the books with the item are in the restriction. If
LOWsrc/calibre/devices/interface.py88 # Set this to None if the books on the device are files that the GUI can
LOWsrc/calibre/devices/kindle/driver.py514 # Check if we need to put the apnx into a sidecar dir
LOW…x_page_generator/generators/accurate_page_generator.py69 # Check if we are starting or stopping a p tag.
LOWsrc/calibre/devices/smart_device_app/driver.py887 # Check if we have another UUID with the same lpath. If so, remove it
LOWsrc/calibre/devices/smart_device_app/driver.py1082 # Set up to recheck the sync columns
LOWsrc/calibre/devices/mtp/unix/driver.py112 # Check if the currently connected device is still present
AI Slop Vocabulary13 hits · 24 pts
SeverityFileLineSnippet
LOWresources/calibre-portable.sh31# To use your own structure, simply set the variables in the generated configuration file.
MEDIUMsrc/calibre/ebooks/fb2/__init__.py20 # Try a more robust version (adapted from FBReader sources)
LOWsrc/calibre/ebooks/comic/input.py76 # levels, in which case simply use the filenames.
MEDIUMsrc/calibre/ebooks/djvu/djvubzzdec.py58//C- | any greater extent that may be necessary to utilize further
LOWsrc/calibre/ebooks/metadata/odt.py271 # if opf.metadata prop is false, just use the first image that
MEDIUMsrc/calibre/ebooks/metadata/zip.py57 # enough to make it more robust
LOWsrc/calibre/ebooks/pml/pmlml.py372 # block isn't a real tag we just use
LOWsrc/calibre/spell/dictionary.py170 # Now just return any dictionary that matches the language, preferring user
LOWsrc/calibre/utils/zipfile.py218 # end-of-archive record, so just return the end record we were given.
MEDIUMsrc/calibre/utils/icu.py330remove_accents = remove_accents_regex # more robust and faster
LOWsrc/calibre/gui2/markdown_syntax_highlighter.py138 # If empty line no need to check for below elements just return
MEDIUMsrc/calibre/db/cache.py1645 # We utilize the search restriction cache to speed this up
LOWsrc/calibre/devices/smart_device_app/driver.py1746 # This is a special case where the user just set a sync column. In
Verbosity Indicators5 hits · 8 pts
SeverityFileLineSnippet
LOWsrc/calibre/devices/smart_device_app/driver.py1714 # We need to check if our attributes are in the book. If they are not
LOWsrc/perfect-hashing/frozen/bits/pmh.h53 // Step 0: Bucket max is 2 * sqrt M
LOWsrc/perfect-hashing/frozen/bits/pmh.h176 // Step 1: Place all of the keys into buckets
LOWsrc/perfect-hashing/frozen/bits/pmh.h179 // Step 2: Sort the buckets to process the ones with the most items first.
LOWsrc/perfect-hashing/frozen/bits/pmh.h190 // Step 3: Map the items in buckets into hash tables.
Slop Phrases4 hits · 6 pts
SeverityFileLineSnippet
MEDIUMresources/default_tweaks.py191# without changing anything is sufficient to change the sort. Or you can use
LOWsrc/calibre/ebooks/rtf2xml/paragraph_def.py554 tokens. (And don't forget to set the text string to ''!)
LOWsrc/calibre/devices/__init__.py191 out("Don't forget to send the contents of /tmp/ioreg.txt")
LOWsrc/calibre/devices/kobo/driver.py3895 # Don't forget to merge that on top of the common dictionary (c.f., https://stackoverflow.com/q/38987)
Fake / Example Data4 hits · 6 pts
SeverityFileLineSnippet
LOWsrc/calibre/ebooks/metadata/test_author_sort.py85 self.check_all_methods('Jane Doe',
LOWsrc/tinycss/tests/tokenizing.py195 (r'"Lore\m Ipsum"', [('STRING', 'Lorem Ipsum')]), # or not special
LOWsrc/tinycss/tests/tokenizing.py196 (r'"Lorem \49psum"', [('STRING', 'Lorem Ipsum')]),
LOWsrc/tinycss/tests/tokenizing.py197 (r'"Lorem \49 psum"', [('STRING', 'Lorem Ipsum')]),
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippet
LOWsrc/calibre/utils/threadpool.py279 def do_something(data):
LOWsrc/calibre/gui2/dialogs/choose_library.py133 def perform_action(self, ac, loc):
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWbypy/windows/XUnzip.cpp545// Usage example: