Repository Analysis

pymupdf/PyMuPDF

PyMuPDF is a high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.

20.2 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of pymupdf/PyMuPDF, a Python project with 10,597 GitHub stars. SynthScan v2.0 examined 70,424 lines of code across 157 source files, recording 933 pattern matches distributed across 17 syntactic categories. The overall adjusted score of 20.2 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).

20.2
Adjusted Score
20.2
Raw Score
100%
Time Factor
2026-08-27
Last Push
10.6K
Stars
Python
Language
70.4K
Lines of Code
157
Files
933
Pattern Hits
2026-08-29
Scan Date
0.22
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 34MEDIUM 308LOW 591

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 933 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.

Decorative Section Separators272 hits · 746 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_tables.py144 # -------------------------------------------------------------------------COMMENT
MEDIUMtests/test_tables.py147 # -------------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/filmfestival-sql.py36# ----------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/filmfestival-sql.py41# ----------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/filmfestival-sql.py58# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/filmfestival-sql.py60# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/filmfestival-sql.py72# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/filmfestival-sql.py74# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/filmfestival-sql.py99# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/filmfestival-sql.py101# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/annotations-ink.py4#------------------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/annotations-ink.py6#------------------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/annotations-ink.py25#------------------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/annotations-ink.py27#------------------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/annotations-ink.py31#------------------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/annotations-ink.py33#------------------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/quickfox.py43# --------------------------------------------------------------COMMENT
MEDIUMdocs/samples/quickfox.py45# --------------------------------------------------------------COMMENT
MEDIUMdocs/samples/quickfox.py63# --------------------------------------------------------------COMMENT
MEDIUMdocs/samples/quickfox.py65# --------------------------------------------------------------COMMENT
MEDIUMdocs/samples/national-capitals.py266# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/national-capitals.py271# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/national-capitals.py287# -------------------------------------------------------------------STRING
MEDIUMdocs/samples/national-capitals.py290# -------------------------------------------------------------------STRING
MEDIUMdocs/samples/national-capitals.py300# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/national-capitals.py302# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/national-capitals.py338# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/national-capitals.py341# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/national-capitals.py357# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/national-capitals.py359# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/national-capitals.py385# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/national-capitals.py387# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/national-capitals.py407# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/national-capitals.py409# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/showpdf-page.py53# -------------------------------------------------------------COMMENT
MEDIUMdocs/samples/showpdf-page.py55# -------------------------------------------------------------COMMENT
MEDIUMdocs/samples/showpdf-page.py71# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/showpdf-page.py74# -------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/code-printer.py145 # --------------------------------------------------------------COMMENT
MEDIUMdocs/samples/code-printer.py147 # --------------------------------------------------------------COMMENT
MEDIUMdocs/samples/code-printer.py156 # --------------------------------------------------------------COMMENT
MEDIUMdocs/samples/code-printer.py159 # --------------------------------------------------------------COMMENT
MEDIUMdocs/samples/code-printer.py184 # -----------------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/code-printer.py191 # -----------------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/quickfox-image-no-go.py117# --------------------------------------------------------------COMMENT
MEDIUMdocs/samples/quickfox-image-no-go.py119# --------------------------------------------------------------COMMENT
MEDIUMsrc_classic/__init__.py1# ------------------------------------------------------------------------COMMENT
MEDIUMsrc_classic/__init__.py8# ------------------------------------------------------------------------COMMENT
MEDIUMsrc_classic/__init__.py85# ------------------------------------------------------------------------------COMMENT
MEDIUMsrc_classic/__init__.py87# ------------------------------------------------------------------------------COMMENT
MEDIUMsrc_classic/__init__.py94# ------------------------------------------------------------------------------COMMENT
MEDIUMsrc_classic/__init__.py96# ------------------------------------------------------------------------------COMMENT
MEDIUMsrc_classic/__init__.py125# ------------------------------------------------------------------------------COMMENT
MEDIUMsrc_classic/__init__.py127# ------------------------------------------------------------------------------COMMENT
MEDIUMsrc_classic/__init__.py164# ------------------------------------------------------------------------COMMENT
MEDIUMsrc_classic/__init__.py166# ------------------------------------------------------------------------COMMENT
MEDIUMsrc_classic/__init__.py170# ------------------------------------------------------------------------COMMENT
MEDIUMsrc_classic/__init__.py172# ------------------------------------------------------------------------COMMENT
MEDIUMsrc_classic/__init__.py176# ------------------------------------------------------------------------COMMENT
MEDIUMsrc_classic/__init__.py178# ------------------------------------------------------------------------COMMENT
212 more matches not shown…
Deep Nesting190 hits · 122 pts
SeverityFileLineSnippetContext
LOWsetup.py250CODE
LOWsetup.py291CODE
LOWsetup.py437CODE
LOWsetup.py627CODE
LOWsetup.py1182CODE
LOWsetup.py1221CODE
LOWtests/test_textextract.py447CODE
LOWtests/test_textextract.py477CODE
LOWtests/test_textextract.py546CODE
LOWtests/test_textextract.py576CODE
LOWtests/test_textextract.py665CODE
LOWtests/test_textextract.py914CODE
LOWtests/test_pixmap.py371CODE
LOWtests/test_font.py141CODE
LOWtests/test_font.py192CODE
LOWtests/test_2904.py6CODE
LOWtests/test_insertimage.py71CODE
LOWtests/test_barcode.py6CODE
LOWtests/run_compound.py43CODE
LOWtests/test_widgets.py453CODE
LOWtests/test_threads.py13CODE
LOWtests/test_threads.py49CODE
LOWtests/test_textbox.py159CODE
LOWtests/test_docs_samples.py27CODE
LOWtests/test_annots.py440CODE
LOWtests/test_2634.py9CODE
LOWtests/test_tesseract.py76CODE
LOWtests/test_memory.py17CODE
LOWtests/test_memory.py161CODE
LOWtests/test_memory.py239CODE
LOWtests/test_general.py288CODE
LOWtests/test_general.py1450CODE
LOWtests/test_general.py1996CODE
LOWtests/test_general.py2110CODE
LOWsrc_classic/utils.py291CODE
LOWsrc_classic/utils.py724CODE
LOWsrc_classic/utils.py761CODE
LOWsrc_classic/utils.py955CODE
LOWsrc_classic/utils.py1025CODE
LOWsrc_classic/utils.py1316CODE
LOWsrc_classic/utils.py1493CODE
LOWsrc_classic/utils.py1613CODE
LOWsrc_classic/utils.py2940CODE
LOWsrc_classic/utils.py2975CODE
LOWsrc_classic/utils.py4820CODE
LOWsrc_classic/utils.py1035CODE
LOWsrc_classic/utils.py1509CODE
LOWsrc_classic/utils.py3619CODE
LOWsrc_classic/__main__.py483CODE
LOWsrc_classic/__main__.py577CODE
LOWsrc_classic/__main__.py605CODE
LOWsrc_classic/__main__.py657CODE
LOWscripts/sysinstall.py115CODE
LOWscripts/test.py412CODE
LOWscripts/test.py884CODE
LOWscripts/test.py1300CODE
LOWscripts/gh_release.py100CODE
LOWscripts/gh_release.py180CODE
LOWsrc/__init__.py46CODE
LOWsrc/__init__.py18880CODE
130 more matches not shown…
Excessive Try-Catch Wrapping131 hits · 101 pts
SeverityFileLineSnippetContext
LOWsetup.py348 except Exception as e:CODE
LOWsetup.py583 except Exception:CODE
LOWsetup.py684 except Exception as e:CODE
MEDIUMsetup.py580def int_or_0(text):CODE
LOWtests/conftest.py195 except Exception as e:CODE
LOWtests/test_pixmap.py530 except Exception as e:STRING
LOWtests/test_pixmap.py563 except Exception as e:STRING
LOWtests/test_insertpdf.py29 except Exception:CODE
LOWtests/test_2904.py19 except Exception as ee:CODE
LOWtests/test_pagedelete.py176 except Exception as e:CODE
LOWtests/test_pylint.py136 except Exception as e:CODE
LOWtests/test_widgets.py376 except Exception as e:CODE
LOWtests/test_threads.py44 except Exception as e:CODE
LOWtests/test_docs_samples.py47 except Exception:CODE
LOWtests/test_annots.py469 except Exception as e:CODE
LOWtests/test_tesseract.py41 except Exception as e:CODE
LOWtests/test_tesseract.py68 except Exception as e:CODE
LOWtests/test_tesseract.py91 except Exception as e:CODE
LOWtests/test_general.py157 except Exception as e:CODE
LOWtests/test_general.py760 except Exception as e:CODE
LOWtests/test_general.py934 except Exception as e:CODE
LOWtests/test_general.py943 except Exception as e:CODE
LOWtests/test_general.py1194 except Exception as e:CODE
LOWtests/test_general.py1382 except Exception as e:CODE
LOWtests/test_general.py1494 except Exception:CODE
LOWtests/test_general.py1522 except Exception as ee:CODE
LOWtests/test_general.py1537 except Exception as ee:CODE
LOWtests/test_general.py2125 except Exception as e1:CODE
LOWtests/test_general.py2129 except Exception as e2:CODE
LOWtests/test_2548.py19 except Exception as ee:CODE
LOWscripts/test.py1340 except Exception:STRING
LOWscripts/test.py1345 except Exception:STRING
LOWscripts/test.py1356 except Exception:STRING
MEDIUMscripts/test.py1336def fs_read(path):CODE
MEDIUMscripts/test.py1342def fs_remove(path):CODE
MEDIUMscripts/test.py1353def getmtime(path):CODE
MEDIUMsrc/__init__.py659def _setAP(self, buffer_, rect=0):CODE
MEDIUMsrc/__init__.py1003def get_parent(self):CODE
MEDIUMsrc/__init__.py14877def __contains__(self, x):CODE
MEDIUMsrc/__init__.py23236def jm_bbox_fill_image_mask( dev, ctx, image, ctm, colorspace, color, alpha, colCODE
MEDIUMsrc/__init__.py23253def jm_bbox_fill_shade( dev, ctx, shade, ctm, alpha, color_params):CODE
MEDIUMsrc/__init__.py23261def jm_bbox_stroke_text( dev, ctx, text, stroke, ctm, *args):CODE
MEDIUMsrc/__init__.py23269def jm_bbox_fill_text( dev, ctx, text, ctm, *args):CODE
MEDIUMsrc/__init__.py23281def jm_bbox_stroke_path( dev, ctx, path, stroke, ctm, colorspace, color, alpha, CODE
MEDIUMsrc/__init__.py23951def jm_increase_seqno( dev, ctx, *vargs):CODE
LOWsrc/__init__.py6404 except Exception:CODE
LOWsrc/__init__.py6409 except Exception:CODE
LOWsrc/__init__.py6419 except Exception:CODE
LOWsrc/__init__.py7355 except Exception:CODE
LOWsrc/__init__.py7362 except Exception:CODE
LOWsrc/__init__.py7368 except Exception:CODE
LOWsrc/__init__.py7374 except Exception:CODE
LOWsrc/__init__.py7381 except Exception:CODE
LOWsrc/__init__.py7388 except Exception:CODE
LOWsrc/__init__.py7394 except Exception:CODE
LOWsrc/__init__.py23239 except Exception:CODE
LOWsrc/__init__.py23248 except Exception:CODE
LOWsrc/__init__.py23256 except Exception:CODE
LOWsrc/__init__.py23264 except Exception:CODE
LOWsrc/__init__.py23272 except Exception:CODE
71 more matches not shown…
Docstring Block Structure18 hits · 90 pts
SeverityFileLineSnippetContext
HIGHsrc_classic/utils.py147Calculate transformation matrix from source to target rect. Notes: The product of four matrices in STRING
HIGHsrc_classic/utils.py507Return the text blocks on a page. Notes: Lines in a block are concatenated with line breaks. Args: STRING
HIGHsrc_classic/utils.py866Extract a document page's text by page number. Notes: Convenience function calling page.get_text(). ArgSTRING
HIGHsrc_classic/utils.py1750Insert text into a given rectangle. Notes: Creates a Shape object, uses its same-named method and commits iSTRING
HIGHsrc_classic/utils.py4060Calculate minimal sub-rectangle for the overlay text. Notes: Because 'insert_textbox' supports no vSTRING
HIGHsrc_classic/utils.py4163Remove hidden text from a PDF page. Args: cont_lines: list of lines with /Contents content. Should STRING
HIGHsrc_classic/utils.py5090Calculate the span quad for 'dict' / 'rawdict' text extractions. Notes: There are two execution paths: STRING
HIGHsrc/__init__.py4475Delete an entry from EmbeddedFiles. Notes: The argument must be name or index of an EmbeddedFiles iSTRING
HIGHsrc/__init__.py5166Extract a document page's text by page number. Notes: Convenience function calling page.get_text().STRING
HIGHsrc/__init__.py11052Calculate minimal sub-rectangle for the overlay text. Notes: Because 'insert_textbox' suppoSTRING
HIGHsrc/__init__.py12402Join rectangles of neighboring vector graphic items. Args: clip: optional rect-like to restrict theSTRING
HIGHsrc/__init__.py13122Insert text into a given rectangle. Notes: Creates a Shape object, uses its same-named method and cSTRING
HIGHsrc/__init__.py22795Calculate transformation matrix from source to target rect. Notes: The product of four matrices in this seqSTRING
HIGHsrc/__init__.py24399Return rectangles of text lines between two points. Notes: The default of 'start' is top-left of 'clip'. ThSTRING
HIGHsrc/__init__.py24488Return a list of (rows x cols) equal sized rectangles. Notes: A utility to fill a given area with table celSTRING
HIGHsrc/utils.py49Return the text blocks on a page. Notes: Lines in a block are concatenated with line breaks. Args: STRING
HIGHsrc/utils.py162Extract plain text avoiding unacceptable line breaks. Text contained in clip will be sorted in reading sequence. SoSTRING
HIGHsrc/utils.py1152Calculate the span quad for 'dict' / 'rawdict' text extractions. Notes: There are two execution paths: STRING
Cross-Language Confusion16 hits · 88 pts
SeverityFileLineSnippetContext
HIGHtests/test_typing.py42 run(f'cd {root}/tests && mypy --no-incremental {os.path.abspath(__file__)}')CODE
HIGHtests/test_named_links.py122 f"/FitHNull [{page_xref} 0 R /FitH null] " # codespell:ignoreCODE
HIGHscripts/sysinstall.py208 run(f'cd {mupdf_dir} && git pull && git submodule update --init')CODE
HIGHscripts/sysinstall.py296 run(f'. {venv_name}/bin/activate && pip install --upgrade pip')CODE
HIGHscripts/sysinstall.py297 run(f'. {venv_name}/bin/activate && pip install --upgrade installer')CODE
HIGHscripts/sysinstall.py312 run(f'{sudo}rm -r {p}/site-packages/pymupdf || true')CODE
HIGHscripts/sysinstall.py313 run(f'{sudo}rm -r {p}/site-packages/pymupdf.py || true')CODE
HIGHscripts/sysinstall.py314 run(f'{sudo}rm -r {p}/site-packages/fitz || true')CODE
HIGHscripts/sysinstall.py315 run(f'{sudo}rm -r {p}/site-packages/fitz.py || true')CODE
HIGHscripts/sysinstall.py316 run(f'{sudo}rm -r {p}/site-packages/pymupdf-*.dist-info || true')CODE
HIGHscripts/sysinstall.py317 run(f'{sudo}rm -r {root_prefix}/bin/pymupdf || true')CODE
HIGHscripts/test.py681 run(f'cd {pyenv_dir} && src/configure && make -C src')CODE
HIGHscripts/test.py685 e = run(f'. {venv_name}/bin/activate && python {shlex.join(sys.argv)}',CODE
HIGHscripts/test.py1208 run(f'mkdir -p {pymupdf_dir}/wheelhouse && cp -p {pymupdf_dir}/dist/* {pymupdf_dir}/wheelhouse/')STRING
HIGHscripts/test.py1584 command = f'{path}\\Scripts\\activate && python'STRING
HIGHscripts/test.py1591 command = f'. {path}/bin/activate && python {shlex.join(args)}'STRING
Hyper-Verbose Identifiers92 hits · 85 pts
SeverityFileLineSnippetContext
LOWsetup.py1182def get_requires_for_build_wheel(config_settings=None):STRING
LOWtests/test_release.py51def test_release_bug_template():CODE
LOWtests/test_release.py62def test_release_changelog_version():CODE
LOWtests/test_release.py76def test_release_changelog_mupdf_version():CODE
LOWtests/conftest.py16def install_required_packages():CODE
LOWtests/test_pixmap.py155def test_fz_write_pixmap_as_jpeg():CODE
LOWtests/test_pixmap.py763def text_pixmap_transpositions():STRING
LOWtests/test_tables.py253def _make_find_tables_state_doc():CODE
LOWtests/test_tables.py269def _find_tables_use_layout_false_signature(pdf_bytes):CODE
LOWtests/test_tables.py278def test_find_tables_use_layout_false_does_not_call_get_layout():CODE
LOWtests/test_tables.py300def test_find_tables_state_is_call_local_for_threads():CODE
LOWtests/test_tables.py551def test_table_extract_stable_after_second_find_tables():CODE
LOWtests/test_tables.py577def test_find_tables_use_layout_true_without_layout_is_line_based():CODE
LOWtests/test_tables.py627def test_refine_grid_splits_overmerged_body():CODE
LOWtests/test_tables.py648def test_find_tables_refine_splits_rows_default_unchanged():CODE
LOWtests/test_tables.py702def test_resolve_spans_merged_header():CODE
LOWtests/test_tables.py732def test_find_tables_refine_exposes_placements_default_none():CODE
LOWtests/test_tables.py764def test_find_tables_refine_to_html_merged_header():CODE
LOWtests/test_tables.py785def test_find_tables_refine_header_meta():CODE
LOWtests/test_tables.py803def test_table_to_html_fallback_flat():CODE
LOWtests/test_tables.py824def test_render_table_html_section_row_collapse():CODE
LOWtests/test_tables.py869def test_find_tables_union_fuses_layout_grid_with_line_candidate():CODE
LOWtests/test_tables.py915def test_find_tables_union_no_layout_degrades_to_line_candidates():CODE
LOWtests/test_insertimage.py71def test_insert_image_stretch():CODE
LOWtests/test_page_links.py6def test_page_links_generator():CODE
LOWtests/test_story.py156def test_write_stabilized_with_links():STRING
LOWtests/test_widgets.py257def test_interfield_calculation():CODE
LOWtests/test_markdown_support.py89def test_markdown_bad_unicode():STRING
LOWtests/test_named_links.py108def test_resolve_names_fit_variants():CODE
LOWtests/test_named_links.py150def test_linkdest_view_fith_uri():CODE
LOWtests/test_general.py66def test_cansaveincrementally():CODE
LOWtests/test_general.py108def test_annot_clean_contents():CODE
LOWscripts/test.py794def github_workflow_unimportant():CODE
LOWscripts/test.py1041 def get_requires_for_build_wheel(config_settings=None):CODE
LOWscripts/test.py1526def wrap_get_requires_for_build_wheel(dir_):STRING
LOWsrc/__init__.py5803 def location_from_page_number(self, pno):CODE
LOWsrc/__init__.py6001 def page_number_from_location(self, page_id):CODE
LOWsrc/__init__.py6683 def add_hidden_text_redactions(page):CODE
LOWsrc/__init__.py16618 def write_stabilized_with_links(contentfn, rectfn, user_css=None, em=12, positionfn=None, pagefn=None, archive=None,CODE
LOWsrc/__init__.py20491 def pdf_dict_get_inheritable_nonempty_label(node, key):CODE
LOWsrc/__init__.py23854def jm_lineart_clip_stroke_path(dev, ctx, path, stroke, ctm, scissor):CODE
LOWsrc/__init__.py23874def jm_lineart_clip_stroke_text(dev, ctx, text, stroke, ctm, scissor):CODE
LOWsrc/__init__.py23888def jm_lineart_clip_image_mask( dev, ctx, image, ctm, scissor):CODE
LOWsrc/__init__.py24681def util_include_point_in_rect( r, p):CODE
LOWsrc/__init__.py25909 def set_graphics_min_line_width(min_line_width):CODE
LOWsrc/_table_union.py195def _union_cell_span_group_count(cell, text_spans):CODE
LOWsrc/_table_union.py248def _union_one_to_one_grid_refs(existing, candidates, *, iou_threshold, page, span_mult_gate, span_mult_threshold):CODE
LOWsrc/_table_refine.py84def _refine_is_vertical_or_rotated(span):CODE
LOWsrc/_table_refine.py168def _refine_has_digit_no_alpha(text):CODE
LOWsrc/_table_refine.py225def _refine_cell_background_rects(raw_rects, *, contain_frac=0.9):CODE
LOWsrc/_table_refine.py310def _refine_content_filter_row_edges(words, y0, y1, candidates, x0, x1, *, margin):CODE
LOWsrc/_table_refine.py446def _refine_detect_span_columns(CODE
LOWsrc/_table_refine.py578def _split_undersegmented_columns(CODE
LOWsrc/_table_refine.py619def _refine_best_column_bounds(cells):CODE
LOWsrc/_table_refine.py635def _refine_cluster_words_by_y(words):CODE
LOWsrc/_table_refine.py677def _refine_page_words_in_rect(page, rect):CODE
LOWsrc/_table_refine.py690def _refine_merge_overlapping_lines(lines, *, frac):CODE
LOWsrc/_table_refine.py707def _refine_detect_row_overmerge(page, cells, *, clean_threshold=0.85, header_row_count=1):CODE
LOWsrc/table.py2723def _refine_placement_grid_width(placements):CODE
LOWsrc/table.py2740def _refine_flat_placement_grid(page, cells, col_count):CODE
32 more matches not shown…
Unused Imports61 hits · 56 pts
SeverityFileLineSnippetContext
LOWsetup.py160CODE
LOWsetup.py163CODE
LOWsetup.py175CODE
LOWtests/test_release.py1CODE
LOWtests/test_rewrite_images.py3CODE
LOWtests/test_flake8.py1CODE
LOWtests/test_flake8.py5CODE
LOWtests/conftest.py1CODE
LOWtests/test_pixmap.py17CODE
LOWtests/test_toc.py9CODE
LOWtests/test_drawings.py7CODE
LOWtests/test_typing.py1CODE
LOWtests/test_metadata.py7CODE
LOWtests/test_insertimage.py6CODE
LOWtests/test_pylint.py5CODE
LOWtests/test_2634.py4CODE
LOWtests/test_tesseract.py3CODE
LOWtests/test_memory.py181CODE
LOWtests/test_codespell.py1CODE
LOWtests/test_codespell.py7CODE
LOWdocs/samples/multiprocess-render.py13CODE
LOWdocs/samples/multiprocess-render.py13CODE
LOWdocs/samples/multiprocess-render.py15CODE
LOWdocs/samples/new-annots.py18CODE
LOWdocs/samples/multiprocess-gui.py35CODE
LOWdocs/samples/multiprocess-gui.py35CODE
LOWdocs/samples/multiprocess-gui.py41CODE
LOWdocs/samples/multiprocess-gui.py41CODE
LOWsrc_classic/__init__.py25CODE
LOWsrc_classic/utils.py17CODE
LOWsrc_classic/utils.py19CODE
LOWsrc_classic/__main__.py13CODE
LOWscripts/sysinstall.py84CODE
LOWscripts/gh_release.py79CODE
LOWscripts/gh_release.py84CODE
LOWscripts/gh_release.py86CODE
LOWsrc/__init__.py9CODE
LOWsrc/__init__.py416CODE
LOWsrc/__init__.py417CODE
LOWsrc/__init__.py418CODE
LOWsrc/__init__.py419CODE
LOWsrc/__init__.py421CODE
LOWsrc/__init__.py422CODE
LOWsrc/__init__.py423CODE
LOWsrc/fitz_utils.py2CODE
LOWsrc/fitz___init__.py4CODE
LOWsrc/fitz___init__.py5CODE
LOWsrc/fitz___init__.py6CODE
LOWsrc/fitz___init__.py7CODE
LOWsrc/fitz___init__.py8CODE
LOWsrc/fitz___init__.py9CODE
LOWsrc/fitz___init__.py10CODE
LOWsrc/fitz___init__.py11CODE
LOWsrc/fitz___init__.py12CODE
LOWsrc/fitz___init__.py13CODE
LOWsrc/fitz___init__.py14CODE
LOWsrc/fitz___init__.py15CODE
LOWsrc/table.py114CODE
LOWsrc/_table_headers.py33CODE
LOWsrc/fitz_table.py2CODE
1 more matches not shown…
AI Structural Patterns84 hits · 43 pts
SeverityFileLineSnippetContext
LOWtests/test_toc.py177CODE
LOWsrc_classic/utils.py1090CODE
LOWsrc_classic/utils.py1727CODE
LOWsrc_classic/utils.py1797CODE
LOWsrc_classic/utils.py1893CODE
LOWsrc_classic/utils.py1928CODE
LOWsrc_classic/utils.py1964CODE
LOWsrc_classic/utils.py2000CODE
LOWsrc_classic/utils.py2036CODE
LOWsrc_classic/utils.py2071CODE
LOWsrc_classic/utils.py2108CODE
LOWsrc_classic/utils.py2143CODE
LOWsrc_classic/utils.py2178CODE
LOWsrc_classic/utils.py2217CODE
LOWsrc_classic/utils.py2257CODE
LOWsrc_classic/utils.py4146CODE
LOWsrc_classic/utils.py4299CODE
LOWsrc_classic/utils.py4836CODE
LOWsrc_classic/utils.py3435CODE
LOWsrc_classic/utils.py3619CODE
LOWsrc_classic/utils.py3938CODE
LOWscripts/test.py1300CODE
LOWsrc/__init__.py46CODE
LOWsrc/__init__.py184CODE
LOWsrc/__init__.py213CODE
LOWsrc/__init__.py18957CODE
LOWsrc/__init__.py20015CODE
LOWsrc/__init__.py21017CODE
LOWsrc/__init__.py21654CODE
LOWsrc/__init__.py22615CODE
LOWsrc/__init__.py22753CODE
LOWsrc/__init__.py22843CODE
LOWsrc/__init__.py24781CODE
LOWsrc/__init__.py25241CODE
LOWsrc/__init__.py25371CODE
LOWsrc/__init__.py868CODE
LOWsrc/__init__.py987CODE
LOWsrc/__init__.py1589CODE
LOWsrc/__init__.py2579CODE
LOWsrc/__init__.py2887CODE
LOWsrc/__init__.py3967CODE
LOWsrc/__init__.py4638CODE
LOWsrc/__init__.py5322CODE
LOWsrc/__init__.py5395CODE
LOWsrc/__init__.py5910CODE
LOWsrc/__init__.py6237CODE
LOWsrc/__init__.py6540CODE
LOWsrc/__init__.py6666CODE
LOWsrc/__init__.py7412CODE
LOWsrc/__init__.py7913CODE
LOWsrc/__init__.py8280CODE
LOWsrc/__init__.py8493CODE
LOWsrc/__init__.py9743CODE
LOWsrc/__init__.py10351CODE
LOWsrc/__init__.py10739CODE
LOWsrc/__init__.py10795CODE
LOWsrc/__init__.py11334CODE
LOWsrc/__init__.py11373CODE
LOWsrc/__init__.py11407CODE
LOWsrc/__init__.py11445CODE
24 more matches not shown…
Self-Referential Comments12 hits · 33 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_textextract.py691 # Create a textpage for both of these pages. Then when extracting text,COMMENT
MEDIUMtests/test_textextract.py729 # Create a stext page for the text regions in both pages of our document,COMMENT
MEDIUMtests/test_textextract.py786 # Create a pymupdf.TextPage() for <stext_page> so we can useCOMMENT
MEDIUMtests/test_insertpdf.py113 # Create a raw file descriptor. If the above pymupdf.open() context leaksCOMMENT
MEDIUMtests/test_toc.py87 # Create a test PDF with toc.COMMENT
MEDIUMtests/test_widgets.py493 # Create a new PDF documentCOMMENT
MEDIUMtests/test_general.py2080 # Create a sample file.COMMENT
MEDIUMtests/test_optional_content.py81 # Define the items for the combo boxCOMMENT
MEDIUMtests/test_optional_content.py84 # Create a combo box fieldCOMMENT
MEDIUMdocs/conf.py289# Create a compressed PDFCOMMENT
MEDIUMsrc_classic/utils.py391 # Create a unique image reference name.COMMENT
MEDIUMsrc/__init__.py13004 # Create a unique image reference name.COMMENT
Over-Commented Block29 hits · 26 pts
SeverityFileLineSnippetContext
LOWsetup.py821 #COMMENT
LOWtests/test_textextract.py661 pymupdf.TOOLS.set_aa_level(aa)COMMENT
LOWtests/test_textextract.py681 # Page 2:COMMENT
LOWtests/test_textextract.py741 #COMMENT
LOWtests/test_typing.py21 returnCOMMENT
LOWdocs/conf.py1# -*- coding: utf-8 -*-COMMENT
LOWdocs/conf.py101# There are two options for replacing |today|: either, you set today to someCOMMENT
LOWdocs/conf.py201# Add any extra paths that contain custom files (such as robots.txt orCOMMENT
LOWdocs/conf.py261# the title page.COMMENT
LOWdocs/extensions/fulltoc.py1# -*- encoding: utf-8 -*-COMMENT
LOWdocs/samples/code-printer.py141 if hdr_ok != 0:COMMENT
LOWdocs/samples/quickfox-image-no-go.py181COMMENT
LOWsrc_classic/_config.h1// Copyright (C) 2004-2021 Artifex Software, Inc.COMMENT
LOWsrc_classic/_config.h121/* #define TOFU_BASE14 */COMMENT
LOWsrc_classic/_config.h141#define FZ_PLOTTERS_RGB 1COMMENT
LOWsrc_classic/_config.h161COMMENT
LOWsrc_classic/_config.h181COMMENT
LOWsrc_classic/_config.h201COMMENT
LOWsrc_classic/__init__.py41# create the TOOLS object.COMMENT
LOWsrc_classic/utils.py2301 return QCOMMENT
LOWscripts/sysinstall.py321 run(f'{sudo}{sys.executable} -m installer --destdir {root} --prefix {prefix} {wheel}')COMMENT
LOWscripts/gh_release.py461 # wheel.COMMENT
LOW.github/workflows/test_sysinstall.yml21COMMENT
LOW.github/workflows/cla.yml21 # branch should not be protectedCOMMENT
LOWsrc/__init__.py6161 # decrement .refs, and if .refs was 1, this is guaranteed to free theCOMMENT
LOWsrc/__init__.py18961 # `c` is typically from SWIG which will have converted a `const char*` fromCOMMENT
LOWsrc/__init__.py26021# -> SWIG Director codeCOMMENT
LOWsrc/__init__.py26121 # Make symbolic links within the installed pymupdf module soCOMMENT
LOWsrc/utils.py761COMMENT
Dead Code9 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMsrc/__init__.py22671CODE
MEDIUMsrc/__init__.py8473CODE
MEDIUMsrc/__init__.py8474CODE
MEDIUMsrc/__init__.py8475CODE
MEDIUMsrc/__init__.py8482CODE
MEDIUMsrc/__init__.py8487CODE
MEDIUMsrc/__init__.py11919CODE
MEDIUMsrc/__init__.py11924CODE
MEDIUMsrc/__init__.py12015CODE
Redundant / Tautological Comments5 hits · 8 pts
SeverityFileLineSnippetContext
LOWtests/gentle_compare.py96 # Set byte to 128 plus half the diff so we represent the fullCOMMENT
LOWtests/test_general.py2085 # Read file as bytesCOMMENT
LOWdocs/samples/code-printer.py123 # Write the file codeCOMMENT
LOWdocs/samples/code-printer.py146 # Write the file content.COMMENT
LOWsrc/__init__.py23774 # Check if any items were added ...COMMENT
Fake / Example Data4 hits · 6 pts
SeverityFileLineSnippetContext
LOWtests/test_textbox.py177 base_text = """Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et doloCODE
LOWtests/test_textbox.py177 base_text = """Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et doloCODE
LOWtests/test_textbox.py179 text = """Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore maCODE
LOWtests/test_textbox.py179 text = """Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore maCODE
Structural Annotation Overuse2 hits · 3 pts
SeverityFileLineSnippetContext
LOWREADME.md594# Step 1: Mark the area(s) to redactCOMMENT
LOWREADME.md598# Step 2: Apply — permanently removes the underlying contentCOMMENT
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_toc.py252 # draw a circle at the middle point to facilitate debuggingCOMMENT
Modern Structural Boilerplate6 hits · 3 pts
SeverityFileLineSnippetContext
LOWsrc_classic/utils.py1199def set_metadata(doc: Document, m: dict) -> None:CODE
LOWsrc_classic/utils.py1706def update_link(page: Page, lnk: dict) -> None:CODE
LOWsrc_classic/utils.py4542def set_oc(doc: Document, xref: int, oc: int) -> None:CODE
LOWsrc/__init__.py6989 def set_metadata(doc: 'Document', m: dict = None) -> None:CODE
LOWsrc/__init__.py7050 def set_oc(doc: 'Document', xref: int, oc: int) -> None:CODE
LOWsrc/__init__.py13588 def update_link(page: 'Page', lnk: dict) -> None:CODE
Modern AI Meta-Vocabulary1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMdocs/llms/llms-full.txt13pip install pymupdf4llm # for LLM/RAG featuresCODE