Repository Analysis

ocrmypdf/OCRmyPDF

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

22.5 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of ocrmypdf/OCRmyPDF, a Python project with 34,604 GitHub stars. SynthScan v2.0 examined 55,396 lines of code across 247 source files, recording 1094 pattern matches distributed across 17 syntactic categories. The overall adjusted score of 22.5 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

22.5
Adjusted Score
22.5
Raw Score
100%
Time Factor
2026-08-28
Last Push
34.6K
Stars
Python
Language
55.4K
Lines of Code
247
Files
1.1K
Pattern Hits
2026-08-29
Scan Date
0.04
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 9MEDIUM 43LOW 1042

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 1094 distinct pattern matches across 17 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers684 hits · 711 pts
SeverityFileLineSnippetContext
LOWmisc/watcher.py88def sanitize_filename_component(name: str) -> str:CODE
LOWtests/test_multi_font_manager.py65def test_missing_font_directory():CODE
LOWtests/test_multi_font_manager.py75def test_select_font_for_arabic_language(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py83def test_select_font_for_persian_language(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py91def test_select_font_for_urdu_language(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py111def test_select_font_for_hindi_language(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py119def test_select_font_for_sanskrit_language(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py127def test_select_font_for_marathi_language(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py135def test_select_font_for_nepali_language(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py147def test_select_font_for_chinese_language(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py157def test_select_font_for_chinese_generic(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py167def test_select_font_for_chinese_simplified(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py177def test_select_font_for_chinese_traditional(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py187def test_select_font_for_japanese_language(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py197def test_select_font_for_korean_language(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py210def test_select_font_for_english_text(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py216def test_select_font_without_language_hint(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py225def test_select_font_arabic_text_without_language_hint(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py234def test_devanagari_text_without_language_hint(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py242def test_cjk_text_without_language_hint(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py252def test_fallback_to_occulta_font(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py260def test_fallback_fonts_constant(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py275def test_has_all_glyphs_for_english(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py281def test_has_all_glyphs_for_arabic(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py288def test_has_all_glyphs_for_devanagari(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py295def test_has_all_glyphs_for_cjk(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py302def test_empty_text_has_all_glyphs(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py307def test_has_all_glyphs_missing_font(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py315def test_font_selection_caching(multi_font_manager):CODE
LOWtests/test_multi_font_manager.py535def test_cjk_falls_back_to_pan_cjk_super_font():CODE
LOWtests/test_multi_font_manager.py544def test_missing_cjk_font_warning_names_language_font(font_dir, caplog):CODE
LOWtests/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
LOWtests/test_ocr_engine_selection.py30 def test_ocr_engine_accepts_tesseract(self):CODE
LOWtests/test_ocr_engine_selection.py39 def test_ocr_engine_accepts_auto(self):CODE
LOWtests/test_ocr_engine_selection.py48 def test_ocr_engine_accepts_none(self):CODE
LOWtests/test_ocr_engine_selection.py57 def test_ocr_engine_default_is_auto(self):CODE
LOWtests/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
624 more matches not shown…
Unused Imports242 hits · 228 pts
SeverityFileLineSnippetContext
LOWmisc/synology.py7CODE
LOWmisc/pdf_text_diff.py6CODE
LOWmisc/batch.py15CODE
LOWmisc/example_plugin.py22CODE
LOWmisc/webservice.py7CODE
LOWmisc/webservice.py13CODE
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_validation.py4CODE
LOWtests/test_logging.py4CODE
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_output_types.py6CODE
LOWtests/test_image_input.py4CODE
LOWtests/test_metadata.py4CODE
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
LOWtests/test_ocr_engine_interface.py10CODE
LOWtests/test_pdfinfo.py4CODE
LOWtests/test_json_serialization.py3CODE
LOWtests/test_acroform.py4CODE
LOWtests/test_hocrtransform.py4CODE
LOWtests/test_subprocess_check.py6CODE
182 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
MEDIUMtests/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.py577 # Create an invalid image object that has both ColorSpace and ImageMask setCOMMENT
MEDIUMtests/test_annots.py20 # Create a broken named destinationCOMMENT
MEDIUMtests/test_annots.py22 # Create a valid named destinationCOMMENT
MEDIUMtests/test_graft.py53 # Create a PDF with a non-zero mediabox originCOMMENT
MEDIUMtests/test_watcher.py329 # Create the subtree before the watch goes live: the watch is recursive, butCOMMENT
MEDIUMtests/test_fpdf_renderer.py107 # Create a non-page elementCOMMENT
MEDIUMtests/test_fpdf_renderer.py138 # Create a simple page with one wordCOMMENT
MEDIUMtests/test_fpdf_renderer.py412 # Create a page with multiple words on one lineCOMMENT
MEDIUMtests/test_fpdf_renderer.py480 # 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.py487 # Create a copy of the model data for serializationCOMMENT
MEDIUMsrc/ocrmypdf/_pipeline.py834 # Create a new single page PDF to holdCOMMENT
MEDIUMsrc/ocrmypdf/_annots.py41 # Create a set of all named destinationsCOMMENT
MEDIUMsrc/ocrmypdf/fpdf_renderer/renderer.py964 # Create a renderer for this pageCOMMENT
Decorative Section Separators16 hits · 54 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_multilingual_direct.py70# =============================================================================COMMENT
MEDIUMtests/test_multilingual_direct.py72# =============================================================================COMMENT
MEDIUMtests/test_multilingual_direct.py538# =============================================================================COMMENT
MEDIUMtests/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.py120 # =========================================================================COMMENT
MEDIUMsrc/ocrmypdf/_plugin_manager.py122 # =========================================================================COMMENT
Deep Nesting47 hits · 46 pts
SeverityFileLineSnippetContext
LOWmisc/pdf_compare.py33CODE
LOWmisc/watcher.py192CODE
LOWmisc/watcher.py301CODE
LOWmisc/ocrmypdf_compare.py50CODE
LOWbin/bump_version.py101CODE
LOWtests/test_pdf_renderer.py692CODE
LOWtests/test_ghostscript.py642CODE
LOWtests/test_ghostscript.py676CODE
LOWtests/test_ghostscript.py645CODE
LOWtests/plugins/tesseract_cache.py140CODE
LOWtests/plugins/tesseract_cache.py141CODE
LOWsrc/ocrmypdf/optimize.py169CODE
LOWsrc/ocrmypdf/optimize.py326CODE
LOWsrc/ocrmypdf/_options.py92CODE
LOWsrc/ocrmypdf/_options.py485CODE
LOWsrc/ocrmypdf/_options.py587CODE
LOWsrc/ocrmypdf/_options.py491CODE
LOWsrc/ocrmypdf/_graft.py263CODE
LOWsrc/ocrmypdf/_graft.py749CODE
LOWsrc/ocrmypdf/api.py182CODE
LOWsrc/ocrmypdf/api.py423CODE
LOWsrc/ocrmypdf/imageops.py29CODE
LOWsrc/ocrmypdf/_pipeline.py73CODE
LOWsrc/ocrmypdf/_pipeline.py170CODE
LOWsrc/ocrmypdf/_pipeline.py337CODE
LOWsrc/ocrmypdf/_pipeline.py530CODE
LOWsrc/ocrmypdf/_pipeline.py1330CODE
LOWsrc/ocrmypdf/_validation.py89CODE
LOWsrc/ocrmypdf/_validation.py198CODE
LOWsrc/ocrmypdf/pdfa.py153CODE
LOWsrc/ocrmypdf/pdfa.py176CODE
LOWsrc/ocrmypdf/helpers.py256CODE
LOWsrc/ocrmypdf/pdfinfo/layout.py293CODE
LOWsrc/ocrmypdf/pdfinfo/_contentstream.py137CODE
LOWsrc/ocrmypdf/pdfinfo/info.py140CODE
LOWsrc/ocrmypdf/builtin_plugins/pypdfium.py122CODE
LOWsrc/ocrmypdf/builtin_plugins/ghostscript.py278CODE
LOWsrc/ocrmypdf/builtin_plugins/ghostscript.py343CODE
LOWsrc/ocrmypdf/builtin_plugins/ghostscript.py299CODE
LOWsrc/ocrmypdf/subprocess/_windows.py101CODE
LOWsrc/ocrmypdf/subprocess/_run.py79CODE
LOWsrc/ocrmypdf/_pipelines/_common.py514CODE
LOWsrc/ocrmypdf/extra_plugins/semfree.py120CODE
LOWsrc/ocrmypdf/_exec/tesseract.py281CODE
LOWsrc/ocrmypdf/_exec/ghostscript.py128CODE
LOWsrc/ocrmypdf/font/system_font_provider.py261CODE
LOWsrc/ocrmypdf/font/system_font_provider.py321CODE
Docstring Block Structure5 hits · 25 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.py672Run OCRmyPDF on one PDF or image. This function supports two calling conventions: **New style (recommended):**STRING
HIGHsrc/ocrmypdf/pdfa.py296Attempt to convert a PDF to PDF/A by adding required structures. This function creates a copy of the input PDF and STRING
HIGHsrc/ocrmypdf/builtin_plugins/tesseract_ocr.py30Convert string argument to ThresholdingMethod enum. Args: value: String name of thresholding method (auto, STRING
Excessive Try-Catch Wrapping21 hits · 24 pts
SeverityFileLineSnippetContext
LOWmisc/batch.py85 except Exception:CODE
LOWmisc/watcher.py519 except Exception: # noqa: BLE001CODE
LOWtests/conftest.py73 except Exception: # pylint: disable=broad-exceptCODE
LOWtests/conftest.py220 except Exception: # pylint: disable=broad-exceptCODE
MEDIUMtests/conftest.py70def have_unpaper():CODE
MEDIUMtests/conftest.py215def _installed_tesseract_version() -> str | None:CODE
LOWtests/test_metadata.py244 except Exception: # pylint: disable=broad-exceptCODE
MEDIUMtests/test_metadata.py232def libxmp_file_to_dict():CODE
LOWsrc/ocrmypdf/optimize.py480 except Exception: # pylint: disable=broad-exceptCODE
LOWsrc/ocrmypdf/api.py530 except Exception as e:CODE
LOWsrc/ocrmypdf/api.py980 except Exception as e:CODE
LOWsrc/ocrmypdf/api.py1089 except Exception as e:CODE
LOWsrc/ocrmypdf/_pipeline.py1079 except Exception as e:CODE
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.py317 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 Block19 hits · 18 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
LOWsrc/ocrmypdf/_jobcontext.py121 # Otherwise, we have a fallback Namespace (shouldn't happen in normal operation)COMMENT
LOWsrc/ocrmypdf/builtin_plugins/concurrency.py201COMMENT
LOWsrc/ocrmypdf/_exec/ghostscript.py361 # Windows has lots of fatal "permission denied" errorsCOMMENT
LOWsrc/ocrmypdf/_exec/ghostscript.py441 if _gs_error_reported(stderr):COMMENT
Redundant / Tautological Comments12 hits · 18 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.py669 # Check if this is a plugin namespaceCOMMENT
LOWsrc/ocrmypdf/_annots.py30 # Check if there are any named destinationsCOMMENT
LOWsrc/ocrmypdf/pdfa.py282 # Check if sRGB OutputIntent already existsCOMMENT
LOWsrc/ocrmypdf/fpdf_renderer/renderer.py836 # Check if character is in CJK rangesCOMMENT
LOWsrc/ocrmypdf/builtin_plugins/pypdfium.py252 # Check if user explicitly requested a different rasterizerCOMMENT
LOWsrc/ocrmypdf/builtin_plugins/ghostscript.py256 # Check if user explicitly requested a different rasterizerCOMMENT
LOWsrc/ocrmypdf/builtin_plugins/ghostscript.py310 # Check if it's an image with DCTDecodeCOMMENT
LOWsrc/ocrmypdf/builtin_plugins/ghostscript.py378 # Check if output is 1-15 bytes shorterCOMMENT
LOWsrc/ocrmypdf/builtin_plugins/ghostscript.py383 # 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.py326 """Test rendering comprehensive multilingual 'Hello!' hOCR file.STRING
MEDIUMsrc/ocrmypdf/_validation_coordinator.py26 """Run comprehensive validation on all options.STRING
MEDIUMsrc/ocrmypdf/_validation.py178 # 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.py1099__all__ = [CODE
LOWsrc/ocrmypdf/_plugin_manager.py302__all__ = ['OcrmypdfPluginManager', 'get_plugin_manager', 'plugin_lock']CODE
LOWsrc/ocrmypdf/fpdf_renderer/__init__.py18__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.py301CODE
LOWsrc/ocrmypdf/api.py546CODE
LOWsrc/ocrmypdf/api.py610CODE
LOWsrc/ocrmypdf/api.py856CODE
LOWsrc/ocrmypdf/api.py988CODE
LOWsrc/ocrmypdf/__main__.py102CODE
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
LOWsrc/ocrmypdf/_validation_coordinator.py36 # Step 1: Plugin context validationCOMMENT
LOWsrc/ocrmypdf/_validation_coordinator.py39 # Step 2: Cross-cutting validationCOMMENT
Structural Annotation Overuse2 hits · 4 pts
SeverityFileLineSnippetContext
LOWsrc/ocrmypdf/_validation_coordinator.py36 # Step 1: Plugin context validationCOMMENT
LOWsrc/ocrmypdf/_validation_coordinator.py39 # 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