PyMuPDF is a high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.
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).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_tables.py | 144 | # ------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_tables.py | 147 | # ------------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/filmfestival-sql.py | 36 | # ---------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/filmfestival-sql.py | 41 | # ---------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/filmfestival-sql.py | 58 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/filmfestival-sql.py | 60 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/filmfestival-sql.py | 72 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/filmfestival-sql.py | 74 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/filmfestival-sql.py | 99 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/filmfestival-sql.py | 101 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/annotations-ink.py | 4 | #------------------------------------------------------------------------------ | COMMENT |
| MEDIUM | docs/samples/annotations-ink.py | 6 | #------------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | docs/samples/annotations-ink.py | 25 | #------------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | docs/samples/annotations-ink.py | 27 | #------------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | docs/samples/annotations-ink.py | 31 | #------------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | docs/samples/annotations-ink.py | 33 | #------------------------------------------------------------------------------ | COMMENT |
| MEDIUM | docs/samples/quickfox.py | 43 | # -------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/quickfox.py | 45 | # -------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/quickfox.py | 63 | # -------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/quickfox.py | 65 | # -------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/national-capitals.py | 266 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/national-capitals.py | 271 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | docs/samples/national-capitals.py | 287 | # ------------------------------------------------------------------- | STRING |
| MEDIUM⚡ | docs/samples/national-capitals.py | 290 | # ------------------------------------------------------------------- | STRING |
| MEDIUM⚡ | docs/samples/national-capitals.py | 300 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | docs/samples/national-capitals.py | 302 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/national-capitals.py | 338 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/national-capitals.py | 341 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/national-capitals.py | 357 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/national-capitals.py | 359 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/national-capitals.py | 385 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/national-capitals.py | 387 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/national-capitals.py | 407 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/national-capitals.py | 409 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/showpdf-page.py | 53 | # ------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/showpdf-page.py | 55 | # ------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/showpdf-page.py | 71 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/showpdf-page.py | 74 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | docs/samples/code-printer.py | 145 | # -------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | docs/samples/code-printer.py | 147 | # -------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | docs/samples/code-printer.py | 156 | # -------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | docs/samples/code-printer.py | 159 | # -------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/code-printer.py | 184 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/code-printer.py | 191 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/quickfox-image-no-go.py | 117 | # -------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/quickfox-image-no-go.py | 119 | # -------------------------------------------------------------- | COMMENT |
| MEDIUM | src_classic/__init__.py | 1 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | src_classic/__init__.py | 8 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | src_classic/__init__.py | 85 | # ------------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | src_classic/__init__.py | 87 | # ------------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | src_classic/__init__.py | 94 | # ------------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | src_classic/__init__.py | 96 | # ------------------------------------------------------------------------------ | COMMENT |
| MEDIUM | src_classic/__init__.py | 125 | # ------------------------------------------------------------------------------ | COMMENT |
| MEDIUM | src_classic/__init__.py | 127 | # ------------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | src_classic/__init__.py | 164 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | src_classic/__init__.py | 166 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | src_classic/__init__.py | 170 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | src_classic/__init__.py | 172 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | src_classic/__init__.py | 176 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | src_classic/__init__.py | 178 | # ------------------------------------------------------------------------ | COMMENT |
| 212 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 250 | CODE | |
| LOW | setup.py | 291 | CODE | |
| LOW | setup.py | 437 | CODE | |
| LOW | setup.py | 627 | CODE | |
| LOW | setup.py | 1182 | CODE | |
| LOW | setup.py | 1221 | CODE | |
| LOW | tests/test_textextract.py | 447 | CODE | |
| LOW | tests/test_textextract.py | 477 | CODE | |
| LOW | tests/test_textextract.py | 546 | CODE | |
| LOW | tests/test_textextract.py | 576 | CODE | |
| LOW | tests/test_textextract.py | 665 | CODE | |
| LOW | tests/test_textextract.py | 914 | CODE | |
| LOW | tests/test_pixmap.py | 371 | CODE | |
| LOW | tests/test_font.py | 141 | CODE | |
| LOW | tests/test_font.py | 192 | CODE | |
| LOW | tests/test_2904.py | 6 | CODE | |
| LOW | tests/test_insertimage.py | 71 | CODE | |
| LOW | tests/test_barcode.py | 6 | CODE | |
| LOW | tests/run_compound.py | 43 | CODE | |
| LOW | tests/test_widgets.py | 453 | CODE | |
| LOW | tests/test_threads.py | 13 | CODE | |
| LOW | tests/test_threads.py | 49 | CODE | |
| LOW | tests/test_textbox.py | 159 | CODE | |
| LOW | tests/test_docs_samples.py | 27 | CODE | |
| LOW | tests/test_annots.py | 440 | CODE | |
| LOW | tests/test_2634.py | 9 | CODE | |
| LOW | tests/test_tesseract.py | 76 | CODE | |
| LOW | tests/test_memory.py | 17 | CODE | |
| LOW | tests/test_memory.py | 161 | CODE | |
| LOW | tests/test_memory.py | 239 | CODE | |
| LOW | tests/test_general.py | 288 | CODE | |
| LOW | tests/test_general.py | 1450 | CODE | |
| LOW | tests/test_general.py | 1996 | CODE | |
| LOW | tests/test_general.py | 2110 | CODE | |
| LOW | src_classic/utils.py | 291 | CODE | |
| LOW | src_classic/utils.py | 724 | CODE | |
| LOW | src_classic/utils.py | 761 | CODE | |
| LOW | src_classic/utils.py | 955 | CODE | |
| LOW | src_classic/utils.py | 1025 | CODE | |
| LOW | src_classic/utils.py | 1316 | CODE | |
| LOW | src_classic/utils.py | 1493 | CODE | |
| LOW | src_classic/utils.py | 1613 | CODE | |
| LOW | src_classic/utils.py | 2940 | CODE | |
| LOW | src_classic/utils.py | 2975 | CODE | |
| LOW | src_classic/utils.py | 4820 | CODE | |
| LOW | src_classic/utils.py | 1035 | CODE | |
| LOW | src_classic/utils.py | 1509 | CODE | |
| LOW | src_classic/utils.py | 3619 | CODE | |
| LOW | src_classic/__main__.py | 483 | CODE | |
| LOW | src_classic/__main__.py | 577 | CODE | |
| LOW | src_classic/__main__.py | 605 | CODE | |
| LOW | src_classic/__main__.py | 657 | CODE | |
| LOW | scripts/sysinstall.py | 115 | CODE | |
| LOW | scripts/test.py | 412 | CODE | |
| LOW | scripts/test.py | 884 | CODE | |
| LOW | scripts/test.py | 1300 | CODE | |
| LOW | scripts/gh_release.py | 100 | CODE | |
| LOW | scripts/gh_release.py | 180 | CODE | |
| LOW | src/__init__.py | 46 | CODE | |
| LOW | src/__init__.py | 18880 | CODE | |
| 130 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 348 | except Exception as e: | CODE |
| LOW | setup.py | 583 | except Exception: | CODE |
| LOW | setup.py | 684 | except Exception as e: | CODE |
| MEDIUM | setup.py | 580 | def int_or_0(text): | CODE |
| LOW | tests/conftest.py | 195 | except Exception as e: | CODE |
| LOW | tests/test_pixmap.py | 530 | except Exception as e: | STRING |
| LOW | tests/test_pixmap.py | 563 | except Exception as e: | STRING |
| LOW | tests/test_insertpdf.py | 29 | except Exception: | CODE |
| LOW | tests/test_2904.py | 19 | except Exception as ee: | CODE |
| LOW | tests/test_pagedelete.py | 176 | except Exception as e: | CODE |
| LOW | tests/test_pylint.py | 136 | except Exception as e: | CODE |
| LOW | tests/test_widgets.py | 376 | except Exception as e: | CODE |
| LOW | tests/test_threads.py | 44 | except Exception as e: | CODE |
| LOW | tests/test_docs_samples.py | 47 | except Exception: | CODE |
| LOW | tests/test_annots.py | 469 | except Exception as e: | CODE |
| LOW | tests/test_tesseract.py | 41 | except Exception as e: | CODE |
| LOW | tests/test_tesseract.py | 68 | except Exception as e: | CODE |
| LOW | tests/test_tesseract.py | 91 | except Exception as e: | CODE |
| LOW | tests/test_general.py | 157 | except Exception as e: | CODE |
| LOW | tests/test_general.py | 760 | except Exception as e: | CODE |
| LOW | tests/test_general.py | 934 | except Exception as e: | CODE |
| LOW | tests/test_general.py | 943 | except Exception as e: | CODE |
| LOW | tests/test_general.py | 1194 | except Exception as e: | CODE |
| LOW | tests/test_general.py | 1382 | except Exception as e: | CODE |
| LOW | tests/test_general.py | 1494 | except Exception: | CODE |
| LOW | tests/test_general.py | 1522 | except Exception as ee: | CODE |
| LOW | tests/test_general.py | 1537 | except Exception as ee: | CODE |
| LOW | tests/test_general.py | 2125 | except Exception as e1: | CODE |
| LOW | tests/test_general.py | 2129 | except Exception as e2: | CODE |
| LOW | tests/test_2548.py | 19 | except Exception as ee: | CODE |
| LOW | scripts/test.py | 1340 | except Exception: | STRING |
| LOW | scripts/test.py | 1345 | except Exception: | STRING |
| LOW | scripts/test.py | 1356 | except Exception: | STRING |
| MEDIUM | scripts/test.py | 1336 | def fs_read(path): | CODE |
| MEDIUM | scripts/test.py | 1342 | def fs_remove(path): | CODE |
| MEDIUM | scripts/test.py | 1353 | def getmtime(path): | CODE |
| MEDIUM | src/__init__.py | 659 | def _setAP(self, buffer_, rect=0): | CODE |
| MEDIUM | src/__init__.py | 1003 | def get_parent(self): | CODE |
| MEDIUM | src/__init__.py | 14877 | def __contains__(self, x): | CODE |
| MEDIUM | src/__init__.py | 23236 | def jm_bbox_fill_image_mask( dev, ctx, image, ctm, colorspace, color, alpha, col | CODE |
| MEDIUM | src/__init__.py | 23253 | def jm_bbox_fill_shade( dev, ctx, shade, ctm, alpha, color_params): | CODE |
| MEDIUM | src/__init__.py | 23261 | def jm_bbox_stroke_text( dev, ctx, text, stroke, ctm, *args): | CODE |
| MEDIUM | src/__init__.py | 23269 | def jm_bbox_fill_text( dev, ctx, text, ctm, *args): | CODE |
| MEDIUM | src/__init__.py | 23281 | def jm_bbox_stroke_path( dev, ctx, path, stroke, ctm, colorspace, color, alpha, | CODE |
| MEDIUM | src/__init__.py | 23951 | def jm_increase_seqno( dev, ctx, *vargs): | CODE |
| LOW⚡ | src/__init__.py | 6404 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 6409 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 6419 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 7355 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 7362 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 7368 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 7374 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 7381 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 7388 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 7394 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 23239 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 23248 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 23256 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 23264 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 23272 | except Exception: | CODE |
| 71 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src_classic/utils.py | 147 | Calculate transformation matrix from source to target rect. Notes: The product of four matrices in | STRING |
| HIGH | src_classic/utils.py | 507 | Return the text blocks on a page. Notes: Lines in a block are concatenated with line breaks. Args: | STRING |
| HIGH | src_classic/utils.py | 866 | Extract a document page's text by page number. Notes: Convenience function calling page.get_text(). Arg | STRING |
| HIGH | src_classic/utils.py | 1750 | Insert text into a given rectangle. Notes: Creates a Shape object, uses its same-named method and commits i | STRING |
| HIGH | src_classic/utils.py | 4060 | Calculate minimal sub-rectangle for the overlay text. Notes: Because 'insert_textbox' supports no v | STRING |
| HIGH | src_classic/utils.py | 4163 | Remove hidden text from a PDF page. Args: cont_lines: list of lines with /Contents content. Should | STRING |
| HIGH | src_classic/utils.py | 5090 | Calculate the span quad for 'dict' / 'rawdict' text extractions. Notes: There are two execution paths: | STRING |
| HIGH | src/__init__.py | 4475 | Delete an entry from EmbeddedFiles. Notes: The argument must be name or index of an EmbeddedFiles i | STRING |
| HIGH | src/__init__.py | 5166 | Extract a document page's text by page number. Notes: Convenience function calling page.get_text(). | STRING |
| HIGH | src/__init__.py | 11052 | Calculate minimal sub-rectangle for the overlay text. Notes: Because 'insert_textbox' suppo | STRING |
| HIGH | src/__init__.py | 12402 | Join rectangles of neighboring vector graphic items. Args: clip: optional rect-like to restrict the | STRING |
| HIGH | src/__init__.py | 13122 | Insert text into a given rectangle. Notes: Creates a Shape object, uses its same-named method and c | STRING |
| HIGH | src/__init__.py | 22795 | Calculate transformation matrix from source to target rect. Notes: The product of four matrices in this seq | STRING |
| HIGH | src/__init__.py | 24399 | Return rectangles of text lines between two points. Notes: The default of 'start' is top-left of 'clip'. Th | STRING |
| HIGH | src/__init__.py | 24488 | Return a list of (rows x cols) equal sized rectangles. Notes: A utility to fill a given area with table cel | STRING |
| HIGH | src/utils.py | 49 | Return the text blocks on a page. Notes: Lines in a block are concatenated with line breaks. Args: | STRING |
| HIGH | src/utils.py | 162 | Extract plain text avoiding unacceptable line breaks. Text contained in clip will be sorted in reading sequence. So | STRING |
| HIGH | src/utils.py | 1152 | Calculate the span quad for 'dict' / 'rawdict' text extractions. Notes: There are two execution paths: | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/test_typing.py | 42 | run(f'cd {root}/tests && mypy --no-incremental {os.path.abspath(__file__)}') | CODE |
| HIGH | tests/test_named_links.py | 122 | f"/FitHNull [{page_xref} 0 R /FitH null] " # codespell:ignore | CODE |
| HIGH | scripts/sysinstall.py | 208 | run(f'cd {mupdf_dir} && git pull && git submodule update --init') | CODE |
| HIGH | scripts/sysinstall.py | 296 | run(f'. {venv_name}/bin/activate && pip install --upgrade pip') | CODE |
| HIGH | scripts/sysinstall.py | 297 | run(f'. {venv_name}/bin/activate && pip install --upgrade installer') | CODE |
| HIGH⚡ | scripts/sysinstall.py | 312 | run(f'{sudo}rm -r {p}/site-packages/pymupdf || true') | CODE |
| HIGH⚡ | scripts/sysinstall.py | 313 | run(f'{sudo}rm -r {p}/site-packages/pymupdf.py || true') | CODE |
| HIGH⚡ | scripts/sysinstall.py | 314 | run(f'{sudo}rm -r {p}/site-packages/fitz || true') | CODE |
| HIGH⚡ | scripts/sysinstall.py | 315 | run(f'{sudo}rm -r {p}/site-packages/fitz.py || true') | CODE |
| HIGH⚡ | scripts/sysinstall.py | 316 | run(f'{sudo}rm -r {p}/site-packages/pymupdf-*.dist-info || true') | CODE |
| HIGH⚡ | scripts/sysinstall.py | 317 | run(f'{sudo}rm -r {root_prefix}/bin/pymupdf || true') | CODE |
| HIGH | scripts/test.py | 681 | run(f'cd {pyenv_dir} && src/configure && make -C src') | CODE |
| HIGH | scripts/test.py | 685 | e = run(f'. {venv_name}/bin/activate && python {shlex.join(sys.argv)}', | CODE |
| HIGH | scripts/test.py | 1208 | run(f'mkdir -p {pymupdf_dir}/wheelhouse && cp -p {pymupdf_dir}/dist/* {pymupdf_dir}/wheelhouse/') | STRING |
| HIGH | scripts/test.py | 1584 | command = f'{path}\\Scripts\\activate && python' | STRING |
| HIGH | scripts/test.py | 1591 | command = f'. {path}/bin/activate && python {shlex.join(args)}' | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 1182 | def get_requires_for_build_wheel(config_settings=None): | STRING |
| LOW | tests/test_release.py | 51 | def test_release_bug_template(): | CODE |
| LOW | tests/test_release.py | 62 | def test_release_changelog_version(): | CODE |
| LOW | tests/test_release.py | 76 | def test_release_changelog_mupdf_version(): | CODE |
| LOW | tests/conftest.py | 16 | def install_required_packages(): | CODE |
| LOW | tests/test_pixmap.py | 155 | def test_fz_write_pixmap_as_jpeg(): | CODE |
| LOW | tests/test_pixmap.py | 763 | def text_pixmap_transpositions(): | STRING |
| LOW | tests/test_tables.py | 253 | def _make_find_tables_state_doc(): | CODE |
| LOW | tests/test_tables.py | 269 | def _find_tables_use_layout_false_signature(pdf_bytes): | CODE |
| LOW | tests/test_tables.py | 278 | def test_find_tables_use_layout_false_does_not_call_get_layout(): | CODE |
| LOW | tests/test_tables.py | 300 | def test_find_tables_state_is_call_local_for_threads(): | CODE |
| LOW | tests/test_tables.py | 551 | def test_table_extract_stable_after_second_find_tables(): | CODE |
| LOW | tests/test_tables.py | 577 | def test_find_tables_use_layout_true_without_layout_is_line_based(): | CODE |
| LOW | tests/test_tables.py | 627 | def test_refine_grid_splits_overmerged_body(): | CODE |
| LOW | tests/test_tables.py | 648 | def test_find_tables_refine_splits_rows_default_unchanged(): | CODE |
| LOW | tests/test_tables.py | 702 | def test_resolve_spans_merged_header(): | CODE |
| LOW | tests/test_tables.py | 732 | def test_find_tables_refine_exposes_placements_default_none(): | CODE |
| LOW | tests/test_tables.py | 764 | def test_find_tables_refine_to_html_merged_header(): | CODE |
| LOW | tests/test_tables.py | 785 | def test_find_tables_refine_header_meta(): | CODE |
| LOW | tests/test_tables.py | 803 | def test_table_to_html_fallback_flat(): | CODE |
| LOW | tests/test_tables.py | 824 | def test_render_table_html_section_row_collapse(): | CODE |
| LOW | tests/test_tables.py | 869 | def test_find_tables_union_fuses_layout_grid_with_line_candidate(): | CODE |
| LOW | tests/test_tables.py | 915 | def test_find_tables_union_no_layout_degrades_to_line_candidates(): | CODE |
| LOW | tests/test_insertimage.py | 71 | def test_insert_image_stretch(): | CODE |
| LOW | tests/test_page_links.py | 6 | def test_page_links_generator(): | CODE |
| LOW | tests/test_story.py | 156 | def test_write_stabilized_with_links(): | STRING |
| LOW | tests/test_widgets.py | 257 | def test_interfield_calculation(): | CODE |
| LOW | tests/test_markdown_support.py | 89 | def test_markdown_bad_unicode(): | STRING |
| LOW | tests/test_named_links.py | 108 | def test_resolve_names_fit_variants(): | CODE |
| LOW | tests/test_named_links.py | 150 | def test_linkdest_view_fith_uri(): | CODE |
| LOW | tests/test_general.py | 66 | def test_cansaveincrementally(): | CODE |
| LOW | tests/test_general.py | 108 | def test_annot_clean_contents(): | CODE |
| LOW | scripts/test.py | 794 | def github_workflow_unimportant(): | CODE |
| LOW | scripts/test.py | 1041 | def get_requires_for_build_wheel(config_settings=None): | CODE |
| LOW | scripts/test.py | 1526 | def wrap_get_requires_for_build_wheel(dir_): | STRING |
| LOW | src/__init__.py | 5803 | def location_from_page_number(self, pno): | CODE |
| LOW | src/__init__.py | 6001 | def page_number_from_location(self, page_id): | CODE |
| LOW | src/__init__.py | 6683 | def add_hidden_text_redactions(page): | CODE |
| LOW | src/__init__.py | 16618 | def write_stabilized_with_links(contentfn, rectfn, user_css=None, em=12, positionfn=None, pagefn=None, archive=None, | CODE |
| LOW | src/__init__.py | 20491 | def pdf_dict_get_inheritable_nonempty_label(node, key): | CODE |
| LOW | src/__init__.py | 23854 | def jm_lineart_clip_stroke_path(dev, ctx, path, stroke, ctm, scissor): | CODE |
| LOW | src/__init__.py | 23874 | def jm_lineart_clip_stroke_text(dev, ctx, text, stroke, ctm, scissor): | CODE |
| LOW | src/__init__.py | 23888 | def jm_lineart_clip_image_mask( dev, ctx, image, ctm, scissor): | CODE |
| LOW | src/__init__.py | 24681 | def util_include_point_in_rect( r, p): | CODE |
| LOW | src/__init__.py | 25909 | def set_graphics_min_line_width(min_line_width): | CODE |
| LOW | src/_table_union.py | 195 | def _union_cell_span_group_count(cell, text_spans): | CODE |
| LOW | src/_table_union.py | 248 | def _union_one_to_one_grid_refs(existing, candidates, *, iou_threshold, page, span_mult_gate, span_mult_threshold): | CODE |
| LOW | src/_table_refine.py | 84 | def _refine_is_vertical_or_rotated(span): | CODE |
| LOW | src/_table_refine.py | 168 | def _refine_has_digit_no_alpha(text): | CODE |
| LOW | src/_table_refine.py | 225 | def _refine_cell_background_rects(raw_rects, *, contain_frac=0.9): | CODE |
| LOW | src/_table_refine.py | 310 | def _refine_content_filter_row_edges(words, y0, y1, candidates, x0, x1, *, margin): | CODE |
| LOW | src/_table_refine.py | 446 | def _refine_detect_span_columns( | CODE |
| LOW | src/_table_refine.py | 578 | def _split_undersegmented_columns( | CODE |
| LOW | src/_table_refine.py | 619 | def _refine_best_column_bounds(cells): | CODE |
| LOW | src/_table_refine.py | 635 | def _refine_cluster_words_by_y(words): | CODE |
| LOW | src/_table_refine.py | 677 | def _refine_page_words_in_rect(page, rect): | CODE |
| LOW | src/_table_refine.py | 690 | def _refine_merge_overlapping_lines(lines, *, frac): | CODE |
| LOW | src/_table_refine.py | 707 | def _refine_detect_row_overmerge(page, cells, *, clean_threshold=0.85, header_row_count=1): | CODE |
| LOW⚡ | src/table.py | 2723 | def _refine_placement_grid_width(placements): | CODE |
| LOW | src/table.py | 2740 | def _refine_flat_placement_grid(page, cells, col_count): | CODE |
| 32 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 160 | CODE | |
| LOW | setup.py | 163 | CODE | |
| LOW | setup.py | 175 | CODE | |
| LOW | tests/test_release.py | 1 | CODE | |
| LOW | tests/test_rewrite_images.py | 3 | CODE | |
| LOW | tests/test_flake8.py | 1 | CODE | |
| LOW | tests/test_flake8.py | 5 | CODE | |
| LOW | tests/conftest.py | 1 | CODE | |
| LOW | tests/test_pixmap.py | 17 | CODE | |
| LOW | tests/test_toc.py | 9 | CODE | |
| LOW | tests/test_drawings.py | 7 | CODE | |
| LOW | tests/test_typing.py | 1 | CODE | |
| LOW | tests/test_metadata.py | 7 | CODE | |
| LOW | tests/test_insertimage.py | 6 | CODE | |
| LOW | tests/test_pylint.py | 5 | CODE | |
| LOW | tests/test_2634.py | 4 | CODE | |
| LOW | tests/test_tesseract.py | 3 | CODE | |
| LOW | tests/test_memory.py | 181 | CODE | |
| LOW | tests/test_codespell.py | 1 | CODE | |
| LOW | tests/test_codespell.py | 7 | CODE | |
| LOW | docs/samples/multiprocess-render.py | 13 | CODE | |
| LOW | docs/samples/multiprocess-render.py | 13 | CODE | |
| LOW | docs/samples/multiprocess-render.py | 15 | CODE | |
| LOW | docs/samples/new-annots.py | 18 | CODE | |
| LOW | docs/samples/multiprocess-gui.py | 35 | CODE | |
| LOW | docs/samples/multiprocess-gui.py | 35 | CODE | |
| LOW | docs/samples/multiprocess-gui.py | 41 | CODE | |
| LOW | docs/samples/multiprocess-gui.py | 41 | CODE | |
| LOW | src_classic/__init__.py | 25 | CODE | |
| LOW | src_classic/utils.py | 17 | CODE | |
| LOW | src_classic/utils.py | 19 | CODE | |
| LOW | src_classic/__main__.py | 13 | CODE | |
| LOW | scripts/sysinstall.py | 84 | CODE | |
| LOW | scripts/gh_release.py | 79 | CODE | |
| LOW | scripts/gh_release.py | 84 | CODE | |
| LOW | scripts/gh_release.py | 86 | CODE | |
| LOW | src/__init__.py | 9 | CODE | |
| LOW | src/__init__.py | 416 | CODE | |
| LOW | src/__init__.py | 417 | CODE | |
| LOW | src/__init__.py | 418 | CODE | |
| LOW | src/__init__.py | 419 | CODE | |
| LOW | src/__init__.py | 421 | CODE | |
| LOW | src/__init__.py | 422 | CODE | |
| LOW | src/__init__.py | 423 | CODE | |
| LOW | src/fitz_utils.py | 2 | CODE | |
| LOW | src/fitz___init__.py | 4 | CODE | |
| LOW | src/fitz___init__.py | 5 | CODE | |
| LOW | src/fitz___init__.py | 6 | CODE | |
| LOW | src/fitz___init__.py | 7 | CODE | |
| LOW | src/fitz___init__.py | 8 | CODE | |
| LOW | src/fitz___init__.py | 9 | CODE | |
| LOW | src/fitz___init__.py | 10 | CODE | |
| LOW | src/fitz___init__.py | 11 | CODE | |
| LOW | src/fitz___init__.py | 12 | CODE | |
| LOW | src/fitz___init__.py | 13 | CODE | |
| LOW | src/fitz___init__.py | 14 | CODE | |
| LOW | src/fitz___init__.py | 15 | CODE | |
| LOW | src/table.py | 114 | CODE | |
| LOW | src/_table_headers.py | 33 | CODE | |
| LOW | src/fitz_table.py | 2 | CODE | |
| 1 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_toc.py | 177 | CODE | |
| LOW | src_classic/utils.py | 1090 | CODE | |
| LOW | src_classic/utils.py | 1727 | CODE | |
| LOW | src_classic/utils.py | 1797 | CODE | |
| LOW | src_classic/utils.py | 1893 | CODE | |
| LOW | src_classic/utils.py | 1928 | CODE | |
| LOW | src_classic/utils.py | 1964 | CODE | |
| LOW | src_classic/utils.py | 2000 | CODE | |
| LOW | src_classic/utils.py | 2036 | CODE | |
| LOW | src_classic/utils.py | 2071 | CODE | |
| LOW | src_classic/utils.py | 2108 | CODE | |
| LOW | src_classic/utils.py | 2143 | CODE | |
| LOW | src_classic/utils.py | 2178 | CODE | |
| LOW | src_classic/utils.py | 2217 | CODE | |
| LOW | src_classic/utils.py | 2257 | CODE | |
| LOW | src_classic/utils.py | 4146 | CODE | |
| LOW | src_classic/utils.py | 4299 | CODE | |
| LOW | src_classic/utils.py | 4836 | CODE | |
| LOW | src_classic/utils.py | 3435 | CODE | |
| LOW | src_classic/utils.py | 3619 | CODE | |
| LOW | src_classic/utils.py | 3938 | CODE | |
| LOW | scripts/test.py | 1300 | CODE | |
| LOW | src/__init__.py | 46 | CODE | |
| LOW | src/__init__.py | 184 | CODE | |
| LOW | src/__init__.py | 213 | CODE | |
| LOW | src/__init__.py | 18957 | CODE | |
| LOW | src/__init__.py | 20015 | CODE | |
| LOW | src/__init__.py | 21017 | CODE | |
| LOW | src/__init__.py | 21654 | CODE | |
| LOW | src/__init__.py | 22615 | CODE | |
| LOW | src/__init__.py | 22753 | CODE | |
| LOW | src/__init__.py | 22843 | CODE | |
| LOW | src/__init__.py | 24781 | CODE | |
| LOW | src/__init__.py | 25241 | CODE | |
| LOW | src/__init__.py | 25371 | CODE | |
| LOW | src/__init__.py | 868 | CODE | |
| LOW | src/__init__.py | 987 | CODE | |
| LOW | src/__init__.py | 1589 | CODE | |
| LOW | src/__init__.py | 2579 | CODE | |
| LOW | src/__init__.py | 2887 | CODE | |
| LOW | src/__init__.py | 3967 | CODE | |
| LOW | src/__init__.py | 4638 | CODE | |
| LOW | src/__init__.py | 5322 | CODE | |
| LOW | src/__init__.py | 5395 | CODE | |
| LOW | src/__init__.py | 5910 | CODE | |
| LOW | src/__init__.py | 6237 | CODE | |
| LOW | src/__init__.py | 6540 | CODE | |
| LOW | src/__init__.py | 6666 | CODE | |
| LOW | src/__init__.py | 7412 | CODE | |
| LOW | src/__init__.py | 7913 | CODE | |
| LOW | src/__init__.py | 8280 | CODE | |
| LOW | src/__init__.py | 8493 | CODE | |
| LOW | src/__init__.py | 9743 | CODE | |
| LOW | src/__init__.py | 10351 | CODE | |
| LOW | src/__init__.py | 10739 | CODE | |
| LOW | src/__init__.py | 10795 | CODE | |
| LOW | src/__init__.py | 11334 | CODE | |
| LOW | src/__init__.py | 11373 | CODE | |
| LOW | src/__init__.py | 11407 | CODE | |
| LOW | src/__init__.py | 11445 | CODE | |
| 24 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_textextract.py | 691 | # Create a textpage for both of these pages. Then when extracting text, | COMMENT |
| MEDIUM | tests/test_textextract.py | 729 | # Create a stext page for the text regions in both pages of our document, | COMMENT |
| MEDIUM | tests/test_textextract.py | 786 | # Create a pymupdf.TextPage() for <stext_page> so we can use | COMMENT |
| MEDIUM | tests/test_insertpdf.py | 113 | # Create a raw file descriptor. If the above pymupdf.open() context leaks | COMMENT |
| MEDIUM | tests/test_toc.py | 87 | # Create a test PDF with toc. | COMMENT |
| MEDIUM | tests/test_widgets.py | 493 | # Create a new PDF document | COMMENT |
| MEDIUM | tests/test_general.py | 2080 | # Create a sample file. | COMMENT |
| MEDIUM | tests/test_optional_content.py | 81 | # Define the items for the combo box | COMMENT |
| MEDIUM | tests/test_optional_content.py | 84 | # Create a combo box field | COMMENT |
| MEDIUM | docs/conf.py | 289 | # Create a compressed PDF | COMMENT |
| MEDIUM | src_classic/utils.py | 391 | # Create a unique image reference name. | COMMENT |
| MEDIUM | src/__init__.py | 13004 | # Create a unique image reference name. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 821 | # | COMMENT |
| LOW | tests/test_textextract.py | 661 | pymupdf.TOOLS.set_aa_level(aa) | COMMENT |
| LOW | tests/test_textextract.py | 681 | # Page 2: | COMMENT |
| LOW | tests/test_textextract.py | 741 | # | COMMENT |
| LOW | tests/test_typing.py | 21 | return | COMMENT |
| LOW | docs/conf.py | 1 | # -*- coding: utf-8 -*- | COMMENT |
| LOW | docs/conf.py | 101 | # There are two options for replacing |today|: either, you set today to some | COMMENT |
| LOW | docs/conf.py | 201 | # Add any extra paths that contain custom files (such as robots.txt or | COMMENT |
| LOW | docs/conf.py | 261 | # the title page. | COMMENT |
| LOW | docs/extensions/fulltoc.py | 1 | # -*- encoding: utf-8 -*- | COMMENT |
| LOW | docs/samples/code-printer.py | 141 | if hdr_ok != 0: | COMMENT |
| LOW | docs/samples/quickfox-image-no-go.py | 181 | COMMENT | |
| LOW | src_classic/_config.h | 1 | // Copyright (C) 2004-2021 Artifex Software, Inc. | COMMENT |
| LOW | src_classic/_config.h | 121 | /* #define TOFU_BASE14 */ | COMMENT |
| LOW | src_classic/_config.h | 141 | #define FZ_PLOTTERS_RGB 1 | COMMENT |
| LOW | src_classic/_config.h | 161 | COMMENT | |
| LOW | src_classic/_config.h | 181 | COMMENT | |
| LOW | src_classic/_config.h | 201 | COMMENT | |
| LOW | src_classic/__init__.py | 41 | # create the TOOLS object. | COMMENT |
| LOW | src_classic/utils.py | 2301 | return Q | COMMENT |
| LOW | scripts/sysinstall.py | 321 | run(f'{sudo}{sys.executable} -m installer --destdir {root} --prefix {prefix} {wheel}') | COMMENT |
| LOW | scripts/gh_release.py | 461 | # wheel. | COMMENT |
| LOW | .github/workflows/test_sysinstall.yml | 21 | COMMENT | |
| LOW | .github/workflows/cla.yml | 21 | # branch should not be protected | COMMENT |
| LOW | src/__init__.py | 6161 | # decrement .refs, and if .refs was 1, this is guaranteed to free the | COMMENT |
| LOW | src/__init__.py | 18961 | # `c` is typically from SWIG which will have converted a `const char*` from | COMMENT |
| LOW | src/__init__.py | 26021 | # -> SWIG Director code | COMMENT |
| LOW | src/__init__.py | 26121 | # Make symbolic links within the installed pymupdf module so | COMMENT |
| LOW | src/utils.py | 761 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/__init__.py | 22671 | CODE | |
| MEDIUM | src/__init__.py | 8473 | CODE | |
| MEDIUM | src/__init__.py | 8474 | CODE | |
| MEDIUM | src/__init__.py | 8475 | CODE | |
| MEDIUM | src/__init__.py | 8482 | CODE | |
| MEDIUM | src/__init__.py | 8487 | CODE | |
| MEDIUM | src/__init__.py | 11919 | CODE | |
| MEDIUM | src/__init__.py | 11924 | CODE | |
| MEDIUM | src/__init__.py | 12015 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/gentle_compare.py | 96 | # Set byte to 128 plus half the diff so we represent the full | COMMENT |
| LOW | tests/test_general.py | 2085 | # Read file as bytes | COMMENT |
| LOW | docs/samples/code-printer.py | 123 | # Write the file code | COMMENT |
| LOW⚡ | docs/samples/code-printer.py | 146 | # Write the file content. | COMMENT |
| LOW | src/__init__.py | 23774 | # Check if any items were added ... | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/test_textbox.py | 177 | base_text = """Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolo | CODE |
| LOW⚡ | tests/test_textbox.py | 177 | base_text = """Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolo | CODE |
| LOW⚡ | tests/test_textbox.py | 179 | text = """Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore ma | CODE |
| LOW⚡ | tests/test_textbox.py | 179 | text = """Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore ma | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | README.md | 594 | # Step 1: Mark the area(s) to redact | COMMENT |
| LOW | README.md | 598 | # Step 2: Apply — permanently removes the underlying content | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_toc.py | 252 | # draw a circle at the middle point to facilitate debugging | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src_classic/utils.py | 1199 | def set_metadata(doc: Document, m: dict) -> None: | CODE |
| LOW | src_classic/utils.py | 1706 | def update_link(page: Page, lnk: dict) -> None: | CODE |
| LOW | src_classic/utils.py | 4542 | def set_oc(doc: Document, xref: int, oc: int) -> None: | CODE |
| LOW | src/__init__.py | 6989 | def set_metadata(doc: 'Document', m: dict = None) -> None: | CODE |
| LOW | src/__init__.py | 7050 | def set_oc(doc: 'Document', xref: int, oc: int) -> None: | CODE |
| LOW | src/__init__.py | 13588 | def update_link(page: 'Page', lnk: dict) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/llms/llms-full.txt | 13 | pip install pymupdf4llm # for LLM/RAG features | CODE |