AI Slop Code RIsk Monitor

pymupdf/PyMuPDF

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

20.9 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for pymupdf/PyMuPDF, a Python project with 10,879 GitHub stars. SynthScan examined 73,726 lines of code across 164 source files, recording 1003 pattern matches distributed across 17 syntactic categories. The legacy adjusted pattern signal is 20.9 (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.

20.9
Adjusted Signal
20.9
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
10.9K
Stars
Python
Language
73.7K
Lines of Code
164
Files
1.0K
Pattern Hits
2026-10-12
Scan Date
0.38
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 25.5/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 9.6/100 · LOW

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

Agent Over-Engineering Ratio 52.6/100 · HIGH

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

PR Review Velocity Impact 72.9/100 · HIGH

Which changes need focused human review? 1003 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 62MEDIUM 306LOW 635

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 1003 distinct pattern matches across 17 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.

Decorative Section Separators270 hits · 702 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_tables.py382 # -------------------------------------------------------------------------COMMENT
MEDIUMtests/test_tables.py385 # -------------------------------------------------------------------------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
MEDIUM⚡docs/samples/annotations-ink.py25#------------------------------------------------------------------------------COMMENT
MEDIUM⚡docs/samples/annotations-ink.py27#------------------------------------------------------------------------------COMMENT
MEDIUM⚡docs/samples/annotations-ink.py31#------------------------------------------------------------------------------COMMENT
MEDIUM⚡docs/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
MEDIUM⚡docs/samples/national-capitals.py287# -------------------------------------------------------------------STRING
MEDIUM⚡docs/samples/national-capitals.py290# -------------------------------------------------------------------STRING
MEDIUM⚡docs/samples/national-capitals.py300# -------------------------------------------------------------------COMMENT
MEDIUM⚡docs/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
MEDIUM⚡docs/samples/code-printer.py151 # --------------------------------------------------------------COMMENT
MEDIUM⚡docs/samples/code-printer.py153 # --------------------------------------------------------------COMMENT
MEDIUM⚡docs/samples/code-printer.py162 # --------------------------------------------------------------COMMENT
MEDIUM⚡docs/samples/code-printer.py165 # --------------------------------------------------------------COMMENT
MEDIUMdocs/samples/code-printer.py190 # -----------------------------------------------------------------------------COMMENT
MEDIUMdocs/samples/code-printer.py197 # -----------------------------------------------------------------------------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
MEDIUM⚡src_classic/__init__.py85# ------------------------------------------------------------------------------COMMENT
MEDIUM⚡src_classic/__init__.py87# ------------------------------------------------------------------------------COMMENT
MEDIUM⚡src_classic/__init__.py94# ------------------------------------------------------------------------------COMMENT
MEDIUM⚡src_classic/__init__.py96# ------------------------------------------------------------------------------COMMENT
MEDIUMsrc_classic/__init__.py125# ------------------------------------------------------------------------------COMMENT
MEDIUMsrc_classic/__init__.py127# ------------------------------------------------------------------------------COMMENT
MEDIUM⚡src_classic/__init__.py164# ------------------------------------------------------------------------COMMENT
MEDIUM⚡src_classic/__init__.py166# ------------------------------------------------------------------------COMMENT
MEDIUM⚡src_classic/__init__.py170# ------------------------------------------------------------------------COMMENT
MEDIUM⚡src_classic/__init__.py172# ------------------------------------------------------------------------COMMENT
MEDIUM⚡src_classic/__init__.py176# ------------------------------------------------------------------------COMMENT
MEDIUM⚡src_classic/__init__.py178# ------------------------------------------------------------------------COMMENT
210 more matches not shown…
Empty Error Handlers28 hits · 140 pts
SeverityFileLineSnippetContext
HIGHdocs/samples/multiprocess-gui.py154except queue.Empty as ex:CODE
HIGHsrc_classic/__init__.py239except:CODE
HIGHsrc_classic/utils.py959except:CODE
HIGHsrc_classic/utils.py1447except:CODE
HIGHsrc_classic/utils.py1452except:CODE
HIGHsrc_classic/utils.py1457except:CODE
HIGHsrc_classic/utils.py1462except:CODE
HIGHsrc_classic/utils.py1467except:CODE
HIGHsrc_classic/utils.py1472except:CODE
HIGHsrc_classic/utils.py1476except:CODE
HIGHsrc_classic/utils.py5295except:CODE
HIGHsrc_classic/utils.py5307except:CODE
HIGHsrc_classic/utils.py5311except:CODE
HIGHsrc_classic/utils.py5315except:CODE
HIGHsrc_classic/__main__.py376except:CODE
HIGHscripts/test.py1350except Exception:CODE
HIGHsrc/__init__.py344except ImportError:CODE
HIGHsrc/__init__.py26747except ImportError:CODE
HIGHsrc/__init__.py249except StopIteration:CODE
HIGHsrc/__init__.py12623except Exception:CODE
HIGHsrc/__init__.py7731except Exception:CODE
HIGHsrc/_table_union.py402except Exception:CODE
HIGHsrc/_table_refine.py107except Exception:CODE
HIGHsrc/_table_refine.py205except Exception:CODE
HIGHsrc/table.py3282except Exception:CODE
HIGHsrc/__main__.py379except Exception:CODE
HIGHsrc/_table_spans.py217except Exception:CODE
HIGHsrc/_table_spans.py359except Exception:CODE
Deep Nesting194 hits · 124 pts
SeverityFileLineSnippetContext
LOWsetup.py285CODE
LOWsetup.py326CODE
LOWsetup.py472CODE
LOWsetup.py883CODE
LOWsetup.py1293CODE
LOWsetup.py1410CODE
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_tables.py14CODE
LOWtests/test_tables.py60CODE
LOWtests/test_font.py141CODE
LOWtests/test_2904.py6CODE
LOWtests/test_insertimage.py71CODE
LOWtests/test_barcode.py6CODE
LOWtests/run_compound.py43CODE
LOWtests/test_widgets.py454CODE
LOWtests/test_widgets.py590CODE
LOWtests/test_threads.py13CODE
LOWtests/test_threads.py49CODE
LOWtests/test_textbox.py160CODE
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.py1461CODE
LOWtests/test_general.py2009CODE
LOWtests/test_general.py2123CODE
LOWtests/test_svg.py9CODE
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.py133CODE
LOWscripts/test.py412CODE
LOWscripts/test.py889CODE
LOWscripts/test.py1305CODE
LOWscripts/gh_release.py100CODE
134 more matches not shown…
Excessive Try-Catch Wrapping138 hits · 104 pts
SeverityFileLineSnippetContext
LOWsetup.py383 except Exception as e:CODE
LOWsetup.py752 except Exception:STRING
LOWsetup.py940 except Exception as e:STRING
MEDIUMsetup.py749def int_or_0(text):CODE
LOWtests/conftest.py210 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_tables.py1164 except Exception as ee: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.py377 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_annots.py808 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.py766 except Exception as e:CODE
LOWtests/test_general.py940 except Exception as e:CODE
LOWtests/test_general.py949 except Exception as e:CODE
LOWtests/test_general.py1205 except Exception as e:CODE
LOWtests/test_general.py1393 except Exception as e:CODE
LOWtests/test_general.py1505 except Exception:CODE
LOWtests/test_general.py1533 except Exception as ee:CODE
LOWtests/test_general.py1548 except Exception as ee:CODE
LOWtests/test_general.py2138 except Exception as e1:CODE
LOWtests/test_general.py2142 except Exception as e2:CODE
LOWtests/test_2548.py19 except Exception as ee:CODE
LOWscripts/test.py1345 except Exception:STRING
LOWscripts/test.py1350 except Exception:STRING
LOWscripts/test.py1361 except Exception:STRING
MEDIUMscripts/test.py1341def fs_read(path):CODE
MEDIUMscripts/test.py1347def fs_remove(path):CODE
MEDIUMscripts/test.py1358def getmtime(path):CODE
MEDIUMsrc/__init__.py685def _setAP(self, buffer_, rect=0):CODE
MEDIUMsrc/__init__.py1029def get_parent(self):CODE
MEDIUMsrc/__init__.py15121def __contains__(self, x):CODE
MEDIUMsrc/__init__.py23547def jm_bbox_fill_image_mask( dev, ctx, image, ctm, colorspace, color, alpha, colCODE
MEDIUMsrc/__init__.py23564def jm_bbox_fill_shade( dev, ctx, shade, ctm, alpha, color_params):CODE
MEDIUMsrc/__init__.py23572def jm_bbox_stroke_text( dev, ctx, text, stroke, ctm, *args):CODE
MEDIUMsrc/__init__.py23580def jm_bbox_fill_text( dev, ctx, text, ctm, *args):CODE
MEDIUMsrc/__init__.py23592def jm_bbox_stroke_path( dev, ctx, path, stroke, ctm, colorspace, color, alpha, CODE
MEDIUMsrc/__init__.py24265def jm_increase_seqno( dev, ctx, *vargs):CODE
LOW⚡src/__init__.py6445 except Exception:CODE
LOW⚡src/__init__.py6450 except Exception:CODE
LOW⚡src/__init__.py6460 except Exception:CODE
LOW⚡src/__init__.py7396 except Exception:CODE
LOW⚡src/__init__.py7403 except Exception:CODE
LOW⚡src/__init__.py7409 except Exception:CODE
LOW⚡src/__init__.py7415 except Exception:CODE
LOW⚡src/__init__.py7422 except Exception:CODE
LOW⚡src/__init__.py7429 except Exception:CODE
LOW⚡src/__init__.py7435 except Exception:CODE
LOW⚡src/__init__.py23550 except Exception:CODE
LOW⚡src/__init__.py23559 except Exception:CODE
LOW⚡src/__init__.py23567 except Exception:CODE
78 more matches not shown…
Hyper-Verbose Identifiers123 hits · 100 pts
SeverityFileLineSnippetContext
LOWsetup.py1293def get_requires_for_build_wheel(config_settings=None):STRING
LOWtests/test_release.py41def test_release_bug_template():CODE
LOWtests/test_release.py52def test_release_changelog_version():CODE
LOWtests/test_release.py66def 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.py468def test_strict_lines_accepts_thin_rects_batched_in_large_fill_path():CODE
LOWtests/test_tables.py500def test_strict_lines_ignores_a_dot_screen_batched_in_a_large_fill_path():CODE
LOWtests/test_tables.py524def test_get_table_drawings_is_shared_only_inside_one_call():CODE
LOWtests/test_tables.py559def test_table_header_is_computed_on_first_access():CODE
LOWtests/test_tables.py620def _make_find_tables_state_doc():CODE
LOWtests/test_tables.py636def _find_tables_use_layout_false_signature(pdf_bytes):CODE
LOWtests/test_tables.py645def test_find_tables_use_layout_false_does_not_call_get_layout():CODE
LOWtests/test_tables.py667def test_find_tables_state_is_call_local_for_threads():CODE
LOWtests/test_tables.py1142def test_table_extract_stable_after_second_find_tables():STRING
LOWtests/test_tables.py1175def test_find_tables_use_layout_true_without_layout_is_line_based():STRING
LOWtests/test_tables.py1225def test_refine_grid_splits_overmerged_body():STRING
LOWtests/test_tables.py1246def test_find_tables_refine_splits_rows_default_unchanged():STRING
LOWtests/test_tables.py1277def test_refine_repeated_leading_header_cuts_exact_signature():STRING
LOWtests/test_tables.py1301def test_refine_repeated_leading_header_cuts_rejects_body_and_short_segments():STRING
LOWtests/test_tables.py1350def test_find_tables_refine_splits_a_repeated_leading_header():STRING
LOWtests/test_tables.py1419def test_resolve_spans_merged_header():STRING
LOWtests/test_tables.py1449def test_find_tables_refine_exposes_placements_default_none():STRING
LOWtests/test_tables.py1481def test_find_tables_refine_to_html_merged_header():STRING
LOWtests/test_tables.py1502def test_find_tables_refine_header_meta():STRING
LOWtests/test_tables.py1520def test_table_to_html_fallback_flat():STRING
LOWtests/test_tables.py1541def test_render_table_html_section_row_collapse():STRING
LOWtests/test_tables.py1582def test_find_tables_refine_tags_leaf_labels_under_a_spanning_header():STRING
LOWtests/test_tables.py1643def test_header_leaf_labels_keep_a_numeric_body_row():STRING
LOWtests/test_tables.py1666def test_header_leaf_labels_need_a_spanning_header_cell():STRING
LOWtests/test_tables.py1689def test_header_leaf_labels_never_take_the_last_row():STRING
LOWtests/test_tables.py1718def test_find_tables_union_fuses_layout_grid_with_line_candidate():STRING
LOWtests/test_tables.py1764def test_find_tables_union_no_layout_degrades_to_line_candidates():STRING
LOWtests/test_tables.py1818def test_find_tables_union_forwards_virtual_lines_to_candidates():STRING
LOWtests/test_tables.py1844def test_find_tables_union_rejects_multiline_single_row_panel():STRING
LOWtests/test_tables.py1862def test_find_tables_union_inside_picture_needs_table_shaped_text():STRING
LOWtests/test_tables.py1915def test_find_tables_union_keeps_a_table_holding_a_picture_in_one_cell():STRING
LOWtests/test_tables.py1938def test_find_tables_union_keeps_one_coherent_table_group_without_content_support():STRING
LOWtests/test_drawings.py270def test_cdrawings_callback_exception():CODE
LOWtests/test_insertimage.py71def test_insert_image_stretch():CODE
LOWtests/test_page_links.py6def test_page_links_generator():CODE
LOWtests/test_widget_reproducers.py85def test_text_creation_preserves_value(tmp_path, garbage, value):CODE
LOWtests/test_widget_reproducers.py97def test_text_unicode_update_control(tmp_path, garbage):CODE
LOWtests/test_widget_reproducers.py114def test_checkbox_creation_writes_pdf_name(tmp_path, garbage, selected):CODE
LOWtests/test_widget_reproducers.py133def test_checkbox_update_writes_pdf_name(tmp_path, garbage):CODE
LOWtests/test_widget_reproducers.py158def test_delete_last_widget_removes_field(tmp_path, garbage, hierarchy):CODE
LOWtests/test_widget_reproducers.py179def test_delete_shared_widgets(tmp_path, garbage, delete_both):CODE
LOWtests/test_widget_reproducers.py204def test_shared_value_update_refreshes_other_widget(tmp_path, garbage, sync_flags):CODE
LOWtests/test_widget_reproducers.py240def test_shared_value_manual_update_control(tmp_path, garbage):CODE
LOWtests/test_widget_reproducers.py266def test_radio_creation_has_at_most_one_selected_widget(tmp_path, garbage):CODE
LOWtests/test_widget_reproducers.py285def test_radio_selection_writes_pdf_name(tmp_path, garbage):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.py799def github_workflow_unimportant():CODE
63 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__.py4513Delete an entry from EmbeddedFiles. Notes: The argument must be name or index of an EmbeddedFiles iSTRING
HIGHsrc/__init__.py5204Extract a document page's text by page number. Notes: Convenience function calling page.get_text().STRING
HIGHsrc/__init__.py11204Calculate minimal sub-rectangle for the overlay text. Notes: Because 'insert_textbox' suppoSTRING
HIGHsrc/__init__.py12646Join rectangles of neighboring vector graphic items. Args: clip: optional rect-like to restrict theSTRING
HIGHsrc/__init__.py13366Insert text into a given rectangle. Notes: Creates a Shape object, uses its same-named method and cSTRING
HIGHsrc/__init__.py23106Calculate transformation matrix from source to target rect. Notes: The product of four matrices in this seqSTRING
HIGHsrc/__init__.py24713Return rectangles of text lines between two points. Notes: The default of 'start' is top-left of 'clip'. ThSTRING
HIGHsrc/__init__.py24802Return 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.py1151Calculate 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.py226 run(f'cd {mupdf_dir} && git pull && git submodule update --init')CODE
HIGHscripts/sysinstall.py317 run(f'. {venv_name}/bin/activate && pip install --upgrade pip')CODE
HIGHscripts/sysinstall.py318 run(f'. {venv_name}/bin/activate && pip install --upgrade installer')CODE
HIGH⚡scripts/sysinstall.py333 run(f'{sudo}rm -r {p}/site-packages/pymupdf || true')CODE
HIGH⚡scripts/sysinstall.py334 run(f'{sudo}rm -r {p}/site-packages/pymupdf.py || true')CODE
HIGH⚡scripts/sysinstall.py335 run(f'{sudo}rm -r {p}/site-packages/fitz || true')CODE
HIGH⚡scripts/sysinstall.py336 run(f'{sudo}rm -r {p}/site-packages/fitz.py || true')CODE
HIGH⚡scripts/sysinstall.py337 run(f'{sudo}rm -r {p}/site-packages/pymupdf-*.dist-info || true')CODE
HIGH⚡scripts/sysinstall.py338 run(f'{sudo}rm -r {root_prefix}/bin/pymupdf || true')CODE
HIGHscripts/test.py686 run(f'cd {pyenv_dir} && src/configure && make -C src')CODE
HIGHscripts/test.py690 e = run(f'. {venv_name}/bin/activate && python {shlex.join(sys.argv)}',CODE
HIGHscripts/test.py1213 run(f'mkdir -p {pymupdf_dir}/wheelhouse && cp -p {pymupdf_dir}/dist/* {pymupdf_dir}/wheelhouse/')STRING
HIGHscripts/test.py1589 command = f'{path}\\Scripts\\activate && python'STRING
HIGHscripts/test.py1596 command = f'. {path}/bin/activate && python {shlex.join(args)}'STRING
Unused Imports62 hits · 55 pts
SeverityFileLineSnippetContext
LOWsetup.py160CODE
LOWsetup.py163CODE
LOWsetup.py175CODE
LOWtests/test_release.py1CODE
LOWtests/test_rewrite_images.py5CODE
LOWtests/test_flake8.py1CODE
LOWtests/test_flake8.py5CODE
LOWtests/conftest.py1CODE
LOWtests/test_pixmap.py17CODE
LOWtests/test_toc.py9CODE
LOWtests/test_typing.py1CODE
LOWtests/test_metadata.py7CODE
LOWtests/test_insertimage.py6CODE
LOWtests/test_pylint.py5CODE
LOWtests/test_widget_reproducers.py7CODE
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/gh_release.py79CODE
LOWscripts/gh_release.py84CODE
LOWscripts/gh_release.py86CODE
LOWsrc/__init__.py9CODE
LOWsrc/__init__.py421CODE
LOWsrc/__init__.py422CODE
LOWsrc/__init__.py423CODE
LOWsrc/__init__.py424CODE
LOWsrc/__init__.py426CODE
LOWsrc/__init__.py427CODE
LOWsrc/__init__.py428CODE
LOWsrc/__init__.py343CODE
LOWsrc/__init__.py26746CODE
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.py116CODE
LOWsrc/_table_headers.py34CODE
2 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.py1305CODE
LOWsrc/__init__.py46CODE
LOWsrc/__init__.py184CODE
LOWsrc/__init__.py213CODE
LOWsrc/__init__.py19201CODE
LOWsrc/__init__.py20259CODE
LOWsrc/__init__.py21261CODE
LOWsrc/__init__.py21907CODE
LOWsrc/__init__.py22926CODE
LOWsrc/__init__.py23064CODE
LOWsrc/__init__.py23154CODE
LOWsrc/__init__.py25067CODE
LOWsrc/__init__.py25527CODE
LOWsrc/__init__.py25657CODE
LOWsrc/__init__.py894CODE
LOWsrc/__init__.py1013CODE
LOWsrc/__init__.py1615CODE
LOWsrc/__init__.py2605CODE
LOWsrc/__init__.py2913CODE
LOWsrc/__init__.py4005CODE
LOWsrc/__init__.py4676CODE
LOWsrc/__init__.py5360CODE
LOWsrc/__init__.py5433CODE
LOWsrc/__init__.py5951CODE
LOWsrc/__init__.py6278CODE
LOWsrc/__init__.py6581CODE
LOWsrc/__init__.py6707CODE
LOWsrc/__init__.py7453CODE
LOWsrc/__init__.py7954CODE
LOWsrc/__init__.py8321CODE
LOWsrc/__init__.py8534CODE
LOWsrc/__init__.py9777CODE
LOWsrc/__init__.py10503CODE
LOWsrc/__init__.py10891CODE
LOWsrc/__init__.py10947CODE
LOWsrc/__init__.py11578CODE
LOWsrc/__init__.py11617CODE
LOWsrc/__init__.py11651CODE
LOWsrc/__init__.py11689CODE
24 more matches not shown…
Self-Referential Comments13 hits · 34 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.py494 # Create a new PDF documentCOMMENT
MEDIUMtests/test_general.py2093 # 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__.py10132 # Create a new parent field for the flat RBGCOMMENT
MEDIUMsrc/__init__.py13248 # Create a unique image reference name.COMMENT
Over-Commented Block30 hits · 28 pts
SeverityFileLineSnippetContext
LOWsetup.py1061 # Add extra flags for MacOS cross-compilation, where ARCHFLAGS can beCOMMENT
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/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.py341 else:COMMENT
LOWscripts/test.py1181 #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__.py6201 # So we first remove our reference to the `fz_page*`. This willCOMMENT
LOWsrc/__init__.py19201 return retCOMMENT
LOWsrc/__init__.py26301# If there are pending warnings when we exit, we end up in this sequence:COMMENT
LOWsrc/_table_union.py41# from the layout analyzer (each "table" group's GridPrediction, read fromCOMMENT
LOWsrc/utils.py761COMMENT
LOWsrc/_table_refine.py41# Grid refinement runs three splitters, each taking (page, grid) and returning aCOMMENT
Dead Code9 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMsrc/__init__.py22982CODE
MEDIUMsrc/__init__.py8514CODE
MEDIUMsrc/__init__.py8515CODE
MEDIUMsrc/__init__.py8516CODE
MEDIUMsrc/__init__.py8523CODE
MEDIUMsrc/__init__.py8528CODE
MEDIUMsrc/__init__.py12163CODE
MEDIUMsrc/__init__.py12168CODE
MEDIUMsrc/__init__.py12259CODE
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.py2098 # Read file as bytesCOMMENT
LOWdocs/samples/code-printer.py129 # Write the file codeCOMMENT
LOW⚡docs/samples/code-printer.py152 # Write the file content.COMMENT
LOWsrc/__init__.py24088 # Check if any items were added ...COMMENT
Fake / Example Data4 hits · 6 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_textbox.py178 base_text = """Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et doloCODE
LOW⚡tests/test_textbox.py178 base_text = """Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et doloCODE
LOW⚡tests/test_textbox.py180 text = """Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore maCODE
LOW⚡tests/test_textbox.py180 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.md587# Step 1: Mark the area(s) to redactCOMMENT
LOWREADME.md591# 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__.py7030 def set_metadata(doc: 'Document', m: dict = None) -> None:CODE
LOWsrc/__init__.py7091 def set_oc(doc: 'Document', xref: int, oc: int) -> None:CODE
LOWsrc/__init__.py13832 def update_link(page: 'Page', lnk: dict) -> None:CODE