AI Slop Code RIsk Monitor

ocrmypdf/OCRmyPDF

OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched

24.0 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for ocrmypdf/OCRmyPDF, a Python project with 34,982 GitHub stars. SynthScan examined 63,612 lines of code across 266 source files, recording 1356 pattern matches distributed across 18 syntactic categories. The legacy adjusted pattern signal is 24.0 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

24.0
Adjusted Signal
24.0
Raw Pattern Score
100%
Time Factor
2026-10-07
Last Push
35.0K
Stars
Python
Language
63.6K
Lines of Code
266
Files
1.4K
Pattern Hits
2026-10-12
Scan Date
0.06
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 59.5/100 · HIGH

Can maintainers explain intent, assumptions, and trade-offs? 1043 finding(s).

Hallucinated Dependency & Supply Chain Risk 17.7/100 · LOW

Are imports declared and package/API names verified? 260 finding(s).

Agent Over-Engineering Ratio 56.9/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 973 finding(s).

PR Review Velocity Impact 69.7/100 · HIGH

Which changes need focused human review? 1356 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 15MEDIUM 43LOW 1298

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 1356 distinct pattern matches across 18 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers914 hits · 940 pts
SeverityFileLineSnippetContext
LOWmisc/watcher.py88def sanitize_filename_component(name: str) -> str:CODE
LOW⚡tests/test_multi_font_manager.py65def test_missing_font_directory():CODE
LOW⚡tests/test_multi_font_manager.py75def test_select_font_for_arabic_language(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py83def test_select_font_for_persian_language(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py91def test_select_font_for_urdu_language(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py111def test_select_font_for_hindi_language(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py119def test_select_font_for_sanskrit_language(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py127def test_select_font_for_marathi_language(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py135def test_select_font_for_nepali_language(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py147def test_select_font_for_chinese_language(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py157def test_select_font_for_chinese_generic(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py167def test_select_font_for_chinese_simplified(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py177def test_select_font_for_chinese_traditional(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py187def test_select_font_for_japanese_language(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py197def test_select_font_for_korean_language(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py210def test_select_font_for_english_text(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py216def test_select_font_without_language_hint(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py225def test_select_font_arabic_text_without_language_hint(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py234def test_devanagari_text_without_language_hint(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py242def test_cjk_text_without_language_hint(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py252def test_fallback_to_occulta_font(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py260def test_fallback_fonts_constant(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py275def test_has_all_glyphs_for_english(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py281def test_has_all_glyphs_for_arabic(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py288def test_has_all_glyphs_for_devanagari(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py295def test_has_all_glyphs_for_cjk(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py302def test_empty_text_has_all_glyphs(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py307def test_has_all_glyphs_missing_font(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py315def test_font_selection_caching(multi_font_manager):CODE
LOW⚡tests/test_multi_font_manager.py535def test_cjk_falls_back_to_pan_cjk_super_font():CODE
LOW⚡tests/test_multi_font_manager.py544def test_missing_cjk_font_warning_names_language_font(font_dir, caplog):CODE
LOW⚡tests/test_multi_font_manager.py552def test_missing_font_warning_explains_consequences(font_dir, caplog):CODE
LOWtests/test_multi_font_manager.py53def test_init_loads_builtin_fonts(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py329def test_language_font_map_coverage():CODE
LOWtests/test_multi_font_manager.py374def test_custom_font_provider(font_dir):CODE
LOWtests/test_multi_font_manager.py390def test_missing_font_uses_fallback(font_dir):CODE
LOWtests/test_multi_font_manager.py405def test_builtin_font_provider_loads_expected_fonts(font_dir):CODE
LOWtests/test_multi_font_manager.py418def test_builtin_font_provider_get_font(font_dir):CODE
LOWtests/test_multi_font_manager.py430def test_builtin_font_provider_get_fallback(font_dir):CODE
LOWtests/test_multi_font_manager.py439def test_builtin_font_provider_missing_font_logs_warning(tmp_path, font_dir, caplog):CODE
LOWtests/test_multi_font_manager.py455def test_builtin_font_provider_missing_occulta_raises(tmp_path):CODE
LOWtests/test_multi_font_manager.py499def test_japanese_prefers_jp_family_over_other_cjk():CODE
LOWtests/test_multi_font_manager.py511def test_chinese_simplified_prefers_sc_family():CODE
LOWtests/test_multi_font_manager.py522def test_cjk_fails_over_when_preferred_subset_lacks_glyph():CODE
LOWtests/test_multi_font_manager.py595def test_unlisted_font_found_by_coverage_search():CODE
LOWtests/test_multi_font_manager.py607def test_coverage_search_result_is_cached():CODE
LOWtests/test_multi_font_manager.py619def test_named_fonts_take_precedence_over_coverage_search():CODE
LOWtests/test_multi_font_manager.py632def test_provider_without_coverage_search_still_falls_back():CODE
LOWtests/test_multi_font_manager.py639def test_missing_font_warning_names_the_missing_characters(font_dir, caplog):CODE
LOWtests/test_multi_font_manager.py656def test_missing_character_warning_ignores_covered_characters(font_dir, caplog):CODE
LOWtests/test_multi_font_manager.py668def test_mixed_script_word_warning_does_not_advise_installing_fonts(caplog):CODE
LOWtests/test_ocr_engine_selection.py18 def test_ocr_engine_option_exists(self):CODE
LOW⚡tests/test_ocr_engine_selection.py30 def test_ocr_engine_accepts_tesseract(self):CODE
LOW⚡tests/test_ocr_engine_selection.py39 def test_ocr_engine_accepts_auto(self):CODE
LOW⚡tests/test_ocr_engine_selection.py48 def test_ocr_engine_accepts_none(self):CODE
LOW⚡tests/test_ocr_engine_selection.py57 def test_ocr_engine_default_is_auto(self):CODE
LOW⚡tests/test_ocr_engine_selection.py66 def test_ocr_engine_rejects_invalid(self):CODE
LOWtests/test_ocr_engine_selection.py79 def test_ocr_options_has_ocr_engine_field(self):CODE
LOWtests/test_ocr_engine_selection.py90 def test_tesseract_selected_when_auto(self):CODE
LOWtests/test_ocr_engine_selection.py103 def test_tesseract_selected_when_tesseract(self):CODE
854 more matches not shown…
Unused Imports259 hits · 244 pts
SeverityFileLineSnippetContext
LOWmisc/synology.py7CODE
LOWmisc/pdf_text_diff.py6CODE
LOWmisc/batch.py15CODE
LOWmisc/example_plugin.py22CODE
LOWmisc/webservice.py7CODE
LOWmisc/webservice.py14CODE
LOWmisc/pdf_compare.py6CODE
LOWmisc/watcher.py8CODE
LOWmisc/bisect_pdf.py7CODE
LOWmisc/_webservice.py13CODE
LOWmisc/ocrmypdf_compare.py6CODE
LOWbin/bump_version.py7CODE
LOWtests/test_multi_font_manager.py6CODE
LOWtests/test_ocr_engine_selection.py10CODE
LOWtests/test_pipeline_generate_ocr.py10CODE
LOWtests/test_compression.py6CODE
LOWtests/test_system_font_provider.py6CODE
LOWtests/test_sidecar.py6CODE
LOWtests/test_concurrency.py4CODE
LOWtests/conftest.py4CODE
LOWtests/test_rasterizer.py6CODE
LOWtests/test_rasterizer.py25CODE
LOWtests/test_plugin_manager.py6CODE
LOWtests/test_validation.py4CODE
LOWtests/test_logging.py4CODE
LOWtests/test_ocr_image_budget.py6CODE
LOWtests/test_hocr_parser.py6CODE
LOWtests/test_thumbnails.py4CODE
LOWtests/test_check_pdf.py4CODE
LOWtests/test_pypdfium.py6CODE
LOWtests/test_null_ocr_engine.py10CODE
LOWtests/test_tagged.py4CODE
LOWtests/test_optimize.py4CODE
LOWtests/test_strip.py6CODE
LOWtests/test_stdio.py4CODE
LOWtests/test_watcher_security.py6CODE
LOWtests/test_languages.py6CODE
LOWtests/test_pdf_features.py10CODE
LOWtests/test_webservice.py4CODE
LOWtests/test_output_types.py6CODE
LOWtests/test_image_input.py4CODE
LOWtests/test_create_ocr_image.py6CODE
LOWtests/test_metadata.py4CODE
LOWtests/test_occulta_font.py6CODE
LOWtests/test_fpdf2_patches.py6CODE
LOWtests/__init__.py6CODE
LOWtests/test_smoke.py6CODE
LOWtests/test_pdf_renderer.py6CODE
LOWtests/test_ocr_modes.py6CODE
LOWtests/test_semfree.py4CODE
LOWtests/test_font_manager.py6CODE
LOWtests/test_decompression_bomb.py6CODE
LOWtests/test_subprocess.py6CODE
LOWtests/test_preprocessing.py4CODE
LOWtests/test_input_validation.py6CODE
LOWtests/test_rotation.py4CODE
LOWtests/test_ocr_element.py6CODE
LOWtests/test_rwlock.py4CODE
LOWtests/test_page_boxes.py4CODE
LOWtests/test_search_index.py4CODE
199 more matches not shown…
Self-Referential Comments19 hits · 62 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_rasterizer.py343 # Create an image with gradients to detect rasterization errorsCOMMENT
MEDIUMtests/test_rasterizer.py377 # Create an image with gradients to detect rasterization errorsCOMMENT
MEDIUM⚡tests/test_ocr_engine_interface.py35 # Create a minimal concrete implementationCOMMENT
MEDIUMtests/test_pdfinfo.py142 # Create an RGB image and save as JPEGCOMMENT
MEDIUMtests/test_pdfinfo.py151 # Create a PDF with the flate+jpeg imageCOMMENT
MEDIUMtests/test_ghostscript.py684 # Create an invalid image object that has both ColorSpace and ImageMask setCOMMENT
MEDIUM⚡tests/test_annots.py20 # Create a broken named destinationCOMMENT
MEDIUM⚡tests/test_annots.py22 # Create a valid named destinationCOMMENT
MEDIUMtests/test_graft.py56 # Create a PDF with a non-zero mediabox originCOMMENT
MEDIUMtests/test_watcher.py358 # Create the subtree before the watch goes live: the watch is recursive, butCOMMENT
MEDIUMtests/test_fpdf_renderer.py120 # Create a non-page elementCOMMENT
MEDIUMtests/test_fpdf_renderer.py151 # Create a simple page with one wordCOMMENT
MEDIUMtests/test_fpdf_renderer.py425 # Create a page with multiple words on one lineCOMMENT
MEDIUMtests/test_fpdf_renderer.py493 # Create a page with CJK words (Chinese characters)COMMENT
MEDIUMdocs/conf.py10# This file is execfile()d with the current directory set to itsCOMMENT
MEDIUMsrc/ocrmypdf/_options.py490 # Create a copy of the model data for serializationCOMMENT
MEDIUMsrc/ocrmypdf/_pipeline.py944 # Create a new single page PDF to holdCOMMENT
MEDIUMsrc/ocrmypdf/_annots.py45 # Create a set of all named destinationsCOMMENT
MEDIUMsrc/ocrmypdf/fpdf_renderer/renderer.py1116 # Create a renderer for this pageCOMMENT
Decorative Section Separators16 hits · 54 pts
SeverityFileLineSnippetContext
MEDIUM⚡tests/test_multilingual_direct.py70# =============================================================================COMMENT
MEDIUM⚡tests/test_multilingual_direct.py72# =============================================================================COMMENT
MEDIUM⚡tests/test_multilingual_direct.py538# =============================================================================COMMENT
MEDIUM⚡tests/test_multilingual_direct.py540# =============================================================================COMMENT
MEDIUMtests/test_multilingual_direct.py142# =============================================================================COMMENT
MEDIUMtests/test_multilingual_direct.py144# =============================================================================COMMENT
MEDIUMtests/test_multilingual_direct.py217# =============================================================================COMMENT
MEDIUMtests/test_multilingual_direct.py219# =============================================================================COMMENT
MEDIUMtests/test_multilingual_direct.py315# =============================================================================COMMENT
MEDIUMtests/test_multilingual_direct.py317# =============================================================================COMMENT
MEDIUMtests/test_multilingual_direct.py382# =============================================================================COMMENT
MEDIUMtests/test_multilingual_direct.py384# =============================================================================COMMENT
MEDIUMtests/test_multilingual_direct.py512# =============================================================================COMMENT
MEDIUMtests/test_multilingual_direct.py514# =============================================================================COMMENT
MEDIUMsrc/ocrmypdf/_plugin_manager.py157 # =========================================================================COMMENT
MEDIUMsrc/ocrmypdf/_plugin_manager.py159 # =========================================================================COMMENT
Deep Nesting55 hits · 54 pts
SeverityFileLineSnippetContext
LOWmisc/pdf_compare.py33CODE
LOWmisc/watcher.py192CODE
LOWmisc/watcher.py312CODE
LOWmisc/ocrmypdf_compare.py50CODE
LOWbin/bump_version.py101CODE
LOWtests/test_pdf_renderer.py692CODE
LOWtests/test_ghostscript.py749CODE
LOWtests/test_ghostscript.py783CODE
LOWtests/test_ghostscript.py752CODE
LOWtests/test_graft.py96CODE
LOWtests/plugins/tesseract_cache.py140CODE
LOWtests/plugins/tesseract_cache.py141CODE
LOWsrc/ocrmypdf/optimize.py210CODE
LOWsrc/ocrmypdf/optimize.py368CODE
LOWsrc/ocrmypdf/_options.py107CODE
LOWsrc/ocrmypdf/_options.py488CODE
LOWsrc/ocrmypdf/_options.py620CODE
LOWsrc/ocrmypdf/_options.py494CODE
LOWsrc/ocrmypdf/_graft.py275CODE
LOWsrc/ocrmypdf/_graft.py420CODE
LOWsrc/ocrmypdf/_graft.py791CODE
LOWsrc/ocrmypdf/api.py182CODE
LOWsrc/ocrmypdf/api.py423CODE
LOWsrc/ocrmypdf/imageops.py46CODE
LOWsrc/ocrmypdf/_pipeline.py89CODE
LOWsrc/ocrmypdf/_pipeline.py212CODE
LOWsrc/ocrmypdf/_pipeline.py399CODE
LOWsrc/ocrmypdf/_pipeline.py609CODE
LOWsrc/ocrmypdf/_pipeline.py757CODE
LOWsrc/ocrmypdf/_pipeline.py1567CODE
LOWsrc/ocrmypdf/_validation.py116CODE
LOWsrc/ocrmypdf/_validation.py227CODE
LOWsrc/ocrmypdf/_stream_check.py108CODE
LOWsrc/ocrmypdf/_stream_check.py128CODE
LOWsrc/ocrmypdf/_annots.py115CODE
LOWsrc/ocrmypdf/pdfa.py190CODE
LOWsrc/ocrmypdf/pdfa.py299CODE
LOWsrc/ocrmypdf/pdfa.py208CODE
LOWsrc/ocrmypdf/helpers.py271CODE
LOWsrc/ocrmypdf/fpdf_renderer/renderer.py751CODE
LOWsrc/ocrmypdf/pdfinfo/layout.py293CODE
LOWsrc/ocrmypdf/pdfinfo/_contentstream.py214CODE
LOWsrc/ocrmypdf/pdfinfo/info.py128CODE
LOWsrc/ocrmypdf/builtin_plugins/pypdfium.py208CODE
LOWsrc/ocrmypdf/builtin_plugins/ghostscript.py305CODE
LOWsrc/ocrmypdf/builtin_plugins/ghostscript.py362CODE
LOWsrc/ocrmypdf/builtin_plugins/ghostscript.py326CODE
LOWsrc/ocrmypdf/subprocess/_windows.py101CODE
LOWsrc/ocrmypdf/subprocess/_run.py79CODE
LOWsrc/ocrmypdf/_pipelines/_common.py497CODE
LOWsrc/ocrmypdf/extra_plugins/semfree.py120CODE
LOWsrc/ocrmypdf/_exec/tesseract.py281CODE
LOWsrc/ocrmypdf/_exec/ghostscript.py217CODE
LOWsrc/ocrmypdf/font/system_font_provider.py261CODE
LOWsrc/ocrmypdf/font/system_font_provider.py321CODE
Docstring Block Structure6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHsrc/ocrmypdf/api.py91Set up plugin infrastructure with proper initialization. This function handles: 1. Creating or validating the pSTRING
HIGHsrc/ocrmypdf/api.py471Construct an options object from the input/output files and keyword arguments. Args: input_file: Input fileSTRING
HIGHsrc/ocrmypdf/api.py676Run OCRmyPDF on one PDF or image. This function supports two calling conventions: **New style (recommended):**STRING
HIGHsrc/ocrmypdf/_pipeline.py1167Try PDF/A conversion without Ghostscript, validated by pikepdf. This repairs and declares the PDF/A structures direSTRING
HIGHsrc/ocrmypdf/pdfa.py589Attempt to convert a PDF to PDF/A by adding and repairing structures. `pikepdf.pdfa.save` replaces the output intenSTRING
HIGHsrc/ocrmypdf/builtin_plugins/tesseract_ocr.py30Convert string argument to ThresholdingMethod enum. Args: value: String name of thresholding method (auto, STRING
Empty Error Handlers5 hits · 25 pts
SeverityFileLineSnippetContext
HIGHmisc/watcher.py535except KeyboardInterrupt:CODE
HIGHsrc/ocrmypdf/_graft.py890except (FileNotFoundError, PdfError):CODE
HIGHsrc/ocrmypdf/helpers.py218except NotImplementedError:CODE
HIGHsrc/ocrmypdf/helpers.py316except (RuntimeError, pikepdf.ForeignObjectError):CODE
HIGHsrc/ocrmypdf/subprocess/_windows.py133except InvalidVersion:CODE
Excessive Try-Catch Wrapping21 hits · 24 pts
SeverityFileLineSnippetContext
LOWmisc/batch.py85 except Exception:CODE
LOWmisc/watcher.py531 except Exception: # noqa: BLE001CODE
LOWtests/conftest.py74 except Exception: # pylint: disable=broad-exceptCODE
LOWtests/conftest.py280 except Exception: # pylint: disable=broad-exceptCODE
MEDIUMtests/conftest.py71def have_unpaper():CODE
MEDIUMtests/conftest.py275def _installed_tesseract_version() -> str | None:CODE
LOWtests/test_metadata.py264 except Exception: # pylint: disable=broad-exceptCODE
MEDIUMtests/test_metadata.py252def libxmp_file_to_dict():CODE
LOWsrc/ocrmypdf/optimize.py518 except Exception: # pylint: disable=broad-exceptCODE
LOWsrc/ocrmypdf/api.py530 except Exception as e:CODE
LOWsrc/ocrmypdf/api.py985 except Exception as e:CODE
LOWsrc/ocrmypdf/api.py1095 except Exception as e:CODE
LOWsrc/ocrmypdf/_pipeline.py1208 except Exception as e: # pylint: disable=broad-exceptCODE
LOWsrc/ocrmypdf/_watcher_security.py95 except Exception: # noqa: BLE001 - defensive; layouts varyCODE
LOWsrc/ocrmypdf/builtin_plugins/concurrency.py59 except Exception: # pylint: disable=broad-exceptCODE
LOWsrc/ocrmypdf/builtin_plugins/concurrency.py178 except Exception:CODE
LOWsrc/ocrmypdf/_pipelines/_common.py312 except Exception: # pylint: disable=broad-exceptCODE
LOWsrc/ocrmypdf/extra_plugins/semfree.py106 except Exception as e: # pylint: disable=broad-exceptCODE
LOWsrc/ocrmypdf/font/font_provider.py127 except Exception as e:CODE
LOWsrc/ocrmypdf/font/system_font_provider.py481 except Exception as e:CODE
LOWsrc/ocrmypdf/font/system_font_provider.py529 except Exception as e:CODE
Over-Commented Block21 hits · 20 pts
SeverityFileLineSnippetContext
LOWprek.toml1# prek pre-commit configuration — https://prek.j178.devCOMMENT
LOWtests/test_optimize.py461 image.Width = 10COMMENT
LOWdocs/conf.py1#!/usr/bin/env python3COMMENT
LOWdocs/conf.py121# non-false value, then it is used:COMMENT
LOWdocs/conf.py141# add_function_parentheses = TrueCOMMENT
LOWdocs/conf.py181# ReadTheDocs used to inject the "Edit on GitHub" context automatically, butCOMMENT
LOWdocs/conf.py201# html_title = 'ocrmypdf v4.2'COMMENT
LOWdocs/conf.py221# html_static_path = ['_static']COMMENT
LOWdocs/conf.py241#COMMENT
LOWdocs/conf.py261# If true, links to the reST sources are added to the pages.COMMENT
LOWdocs/conf.py281COMMENT
LOWdocs/conf.py301htmlhelp_basename = 'ocrmypdfdoc'COMMENT
LOWdocs/conf.py321# (source start file, target name, title,COMMENT
LOWdocs/conf.py341# If true, show URL addresses after external links.COMMENT
LOWdocs/conf.py401#COMMENT
LOW.github/scripts/smoke-test-snap.sh1#!/usr/bin/env bashCOMMENT
LOWsrc/ocrmypdf/_jobcontext.py121 # Otherwise, we have a fallback Namespace (shouldn't happen in normal operation)COMMENT
LOWsrc/ocrmypdf/fpdf_renderer/renderer.py561 )COMMENT
LOWsrc/ocrmypdf/builtin_plugins/concurrency.py201COMMENT
LOWsrc/ocrmypdf/_exec/ghostscript.py481 ]COMMENT
LOWsrc/ocrmypdf/_exec/ghostscript.py541 # If there is an error we log the whole stderr, except for filteringCOMMENT
Redundant / Tautological Comments11 hits · 16 pts
SeverityFileLineSnippetContext
LOWtests/test_rasterizer.py23# Check if pypdfium2 is availableCOMMENT
LOWtests/plugins/tesseract_cache.py222 # Check if cache has all required filesCOMMENT
LOWsrc/ocrmypdf/_options.py702 # Check if this is a plugin namespaceCOMMENT
LOWsrc/ocrmypdf/_annots.py37 # Check if there are any named destinations. A NamePath lookup returns NoneCOMMENT
LOWsrc/ocrmypdf/fpdf_renderer/renderer.py988 # Check if character is in CJK rangesCOMMENT
LOWsrc/ocrmypdf/builtin_plugins/pypdfium.py336 # Check if user explicitly requested a different rasterizerCOMMENT
LOWsrc/ocrmypdf/builtin_plugins/ghostscript.py283 # Check if user explicitly requested a different rasterizerCOMMENT
LOWsrc/ocrmypdf/builtin_plugins/ghostscript.py335 # Check if it's an image with DCTDecodeCOMMENT
LOWsrc/ocrmypdf/builtin_plugins/ghostscript.py399 # Check if output is 1-15 bytes shorterCOMMENT
LOWsrc/ocrmypdf/builtin_plugins/ghostscript.py404 # Check if the bytes are identical up to the truncation pointCOMMENT
LOWsrc/ocrmypdf/font/multi_font_manager.py306 # Check if text contains non-ASCII charactersCOMMENT
Cross-File Repetition3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHsrc/ocrmypdf/_pipelines/hocr_to_ocr_pdf.py0implements the concurrent and page synchronous parts of the pipeline.STRING
HIGHsrc/ocrmypdf/_pipelines/ocr.py0implements the concurrent and page synchronous parts of the pipeline.STRING
HIGHsrc/ocrmypdf/_pipelines/pdf_to_hocr.py0implements the concurrent and page synchronous parts of the pipeline.STRING
AI Slop Vocabulary6 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_fpdf_renderer.py339 """Test rendering comprehensive multilingual 'Hello!' hOCR file.STRING
MEDIUM⚡src/ocrmypdf/_validation_coordinator.py28 """Run comprehensive validation on all options.STRING
MEDIUMsrc/ocrmypdf/_validation.py207 # Finally, run comprehensive validation using the coordinatorCOMMENT
MEDIUMsrc/ocrmypdf/_stdoutprotect.py55 # a test harness or replaced with an in-memory stream).COMMENT
LOWsrc/ocrmypdf/_exec/unpaper.py62 # No changes, PNG input, just use the file we already haveCOMMENT
LOWsrc/ocrmypdf/_exec/unpaper.py65 # adds a few seconds to test suite - so just use pnmCOMMENT
Modern Structural Boilerplate8 hits · 8 pts
SeverityFileLineSnippetContext
LOWtests/plugins/tesseract_cache.py190def update_cache_info() -> None:CODE
LOWsrc/ocrmypdf/__init__.py50__all__ = [CODE
LOWsrc/ocrmypdf/api.py1105__all__ = [CODE
LOWsrc/ocrmypdf/_plugin_manager.py339__all__ = ['OcrmypdfPluginManager', 'get_plugin_manager', 'plugin_lock']CODE
LOWsrc/ocrmypdf/fpdf_renderer/__init__.py21__all__ = [CODE
LOWsrc/ocrmypdf/pdfinfo/__init__.py12__all__ = ["Colorspace", "Encoding", "FloatRect", "Ink", "PageInfo", "PdfInfo"]CODE
LOWsrc/ocrmypdf/subprocess/__init__.py24__all__ = [CODE
LOWsrc/ocrmypdf/font/__init__.py26__all__ = [CODE
AI Structural Patterns6 hits · 6 pts
SeverityFileLineSnippetContext
LOWmisc/watcher.py312CODE
LOWsrc/ocrmypdf/api.py546CODE
LOWsrc/ocrmypdf/api.py612CODE
LOWsrc/ocrmypdf/api.py860CODE
LOWsrc/ocrmypdf/api.py993CODE
LOWsrc/ocrmypdf/__main__.py120CODE
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHtests/test_api.py228 '"textpdf": {"Path": "c"}, "orientation_correction": 180, "ocr_tree": null}'CODE
Verbosity Indicators2 hits · 4 pts
SeverityFileLineSnippetContext
LOW⚡src/ocrmypdf/_validation_coordinator.py38 # Step 1: Plugin context validationCOMMENT
LOW⚡src/ocrmypdf/_validation_coordinator.py41 # Step 2: Cross-cutting validationCOMMENT
Structural Annotation Overuse2 hits · 4 pts
SeverityFileLineSnippetContext
LOW⚡src/ocrmypdf/_validation_coordinator.py38 # Step 1: Plugin context validationCOMMENT
LOW⚡src/ocrmypdf/_validation_coordinator.py41 # Step 2: Cross-cutting validationCOMMENT
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_watcher.py28# common case because every wait below is event-driven.COMMENT