PyMuPDF is a high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.
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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 470 finding(s).
Are imports declared and package/API names verified? 82 finding(s).
Are wrappers, guards, and repeated structures necessary? 658 finding(s).
Which changes need focused human review? 1003 finding(s).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_tables.py | 382 | # ------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_tables.py | 385 | # ------------------------------------------------------------------------- | 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 | 151 | # -------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | docs/samples/code-printer.py | 153 | # -------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | docs/samples/code-printer.py | 162 | # -------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | docs/samples/code-printer.py | 165 | # -------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/code-printer.py | 190 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/samples/code-printer.py | 197 | # ----------------------------------------------------------------------------- | 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 |
| 210 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | docs/samples/multiprocess-gui.py | 154 | except queue.Empty as ex: | CODE |
| HIGH | src_classic/__init__.py | 239 | except: | CODE |
| HIGH | src_classic/utils.py | 959 | except: | CODE |
| HIGH | src_classic/utils.py | 1447 | except: | CODE |
| HIGH | src_classic/utils.py | 1452 | except: | CODE |
| HIGH | src_classic/utils.py | 1457 | except: | CODE |
| HIGH | src_classic/utils.py | 1462 | except: | CODE |
| HIGH | src_classic/utils.py | 1467 | except: | CODE |
| HIGH | src_classic/utils.py | 1472 | except: | CODE |
| HIGH | src_classic/utils.py | 1476 | except: | CODE |
| HIGH | src_classic/utils.py | 5295 | except: | CODE |
| HIGH | src_classic/utils.py | 5307 | except: | CODE |
| HIGH | src_classic/utils.py | 5311 | except: | CODE |
| HIGH | src_classic/utils.py | 5315 | except: | CODE |
| HIGH | src_classic/__main__.py | 376 | except: | CODE |
| HIGH | scripts/test.py | 1350 | except Exception: | CODE |
| HIGH | src/__init__.py | 344 | except ImportError: | CODE |
| HIGH | src/__init__.py | 26747 | except ImportError: | CODE |
| HIGH | src/__init__.py | 249 | except StopIteration: | CODE |
| HIGH | src/__init__.py | 12623 | except Exception: | CODE |
| HIGH | src/__init__.py | 7731 | except Exception: | CODE |
| HIGH | src/_table_union.py | 402 | except Exception: | CODE |
| HIGH | src/_table_refine.py | 107 | except Exception: | CODE |
| HIGH | src/_table_refine.py | 205 | except Exception: | CODE |
| HIGH | src/table.py | 3282 | except Exception: | CODE |
| HIGH | src/__main__.py | 379 | except Exception: | CODE |
| HIGH | src/_table_spans.py | 217 | except Exception: | CODE |
| HIGH | src/_table_spans.py | 359 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 285 | CODE | |
| LOW | setup.py | 326 | CODE | |
| LOW | setup.py | 472 | CODE | |
| LOW | setup.py | 883 | CODE | |
| LOW | setup.py | 1293 | CODE | |
| LOW | setup.py | 1410 | 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_tables.py | 14 | CODE | |
| LOW | tests/test_tables.py | 60 | CODE | |
| LOW | tests/test_font.py | 141 | 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 | 454 | CODE | |
| LOW | tests/test_widgets.py | 590 | CODE | |
| LOW | tests/test_threads.py | 13 | CODE | |
| LOW | tests/test_threads.py | 49 | CODE | |
| LOW | tests/test_textbox.py | 160 | 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 | 1461 | CODE | |
| LOW | tests/test_general.py | 2009 | CODE | |
| LOW | tests/test_general.py | 2123 | CODE | |
| LOW | tests/test_svg.py | 9 | 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 | 133 | CODE | |
| LOW | scripts/test.py | 412 | CODE | |
| LOW | scripts/test.py | 889 | CODE | |
| LOW | scripts/test.py | 1305 | CODE | |
| LOW | scripts/gh_release.py | 100 | CODE | |
| 134 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 383 | except Exception as e: | CODE |
| LOW | setup.py | 752 | except Exception: | STRING |
| LOW | setup.py | 940 | except Exception as e: | STRING |
| MEDIUM | setup.py | 749 | def int_or_0(text): | CODE |
| LOW | tests/conftest.py | 210 | 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_tables.py | 1164 | except Exception as ee: | 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 | 377 | 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_annots.py | 808 | 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 | 766 | except Exception as e: | CODE |
| LOW | tests/test_general.py | 940 | except Exception as e: | CODE |
| LOW | tests/test_general.py | 949 | except Exception as e: | CODE |
| LOW | tests/test_general.py | 1205 | except Exception as e: | CODE |
| LOW | tests/test_general.py | 1393 | except Exception as e: | CODE |
| LOW | tests/test_general.py | 1505 | except Exception: | CODE |
| LOW | tests/test_general.py | 1533 | except Exception as ee: | CODE |
| LOW | tests/test_general.py | 1548 | except Exception as ee: | CODE |
| LOW | tests/test_general.py | 2138 | except Exception as e1: | CODE |
| LOW | tests/test_general.py | 2142 | except Exception as e2: | CODE |
| LOW | tests/test_2548.py | 19 | except Exception as ee: | CODE |
| LOW | scripts/test.py | 1345 | except Exception: | STRING |
| LOW | scripts/test.py | 1350 | except Exception: | STRING |
| LOW | scripts/test.py | 1361 | except Exception: | STRING |
| MEDIUM | scripts/test.py | 1341 | def fs_read(path): | CODE |
| MEDIUM | scripts/test.py | 1347 | def fs_remove(path): | CODE |
| MEDIUM | scripts/test.py | 1358 | def getmtime(path): | CODE |
| MEDIUM | src/__init__.py | 685 | def _setAP(self, buffer_, rect=0): | CODE |
| MEDIUM | src/__init__.py | 1029 | def get_parent(self): | CODE |
| MEDIUM | src/__init__.py | 15121 | def __contains__(self, x): | CODE |
| MEDIUM | src/__init__.py | 23547 | def jm_bbox_fill_image_mask( dev, ctx, image, ctm, colorspace, color, alpha, col | CODE |
| MEDIUM | src/__init__.py | 23564 | def jm_bbox_fill_shade( dev, ctx, shade, ctm, alpha, color_params): | CODE |
| MEDIUM | src/__init__.py | 23572 | def jm_bbox_stroke_text( dev, ctx, text, stroke, ctm, *args): | CODE |
| MEDIUM | src/__init__.py | 23580 | def jm_bbox_fill_text( dev, ctx, text, ctm, *args): | CODE |
| MEDIUM | src/__init__.py | 23592 | def jm_bbox_stroke_path( dev, ctx, path, stroke, ctm, colorspace, color, alpha, | CODE |
| MEDIUM | src/__init__.py | 24265 | def jm_increase_seqno( dev, ctx, *vargs): | CODE |
| LOW⚡ | src/__init__.py | 6445 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 6450 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 6460 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 7396 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 7403 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 7409 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 7415 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 7422 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 7429 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 7435 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 23550 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 23559 | except Exception: | CODE |
| LOW⚡ | src/__init__.py | 23567 | except Exception: | CODE |
| 78 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 1293 | def get_requires_for_build_wheel(config_settings=None): | STRING |
| LOW | tests/test_release.py | 41 | def test_release_bug_template(): | CODE |
| LOW | tests/test_release.py | 52 | def test_release_changelog_version(): | CODE |
| LOW | tests/test_release.py | 66 | 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 | 468 | def test_strict_lines_accepts_thin_rects_batched_in_large_fill_path(): | CODE |
| LOW | tests/test_tables.py | 500 | def test_strict_lines_ignores_a_dot_screen_batched_in_a_large_fill_path(): | CODE |
| LOW | tests/test_tables.py | 524 | def test_get_table_drawings_is_shared_only_inside_one_call(): | CODE |
| LOW | tests/test_tables.py | 559 | def test_table_header_is_computed_on_first_access(): | CODE |
| LOW | tests/test_tables.py | 620 | def _make_find_tables_state_doc(): | CODE |
| LOW | tests/test_tables.py | 636 | def _find_tables_use_layout_false_signature(pdf_bytes): | CODE |
| LOW | tests/test_tables.py | 645 | def test_find_tables_use_layout_false_does_not_call_get_layout(): | CODE |
| LOW | tests/test_tables.py | 667 | def test_find_tables_state_is_call_local_for_threads(): | CODE |
| LOW | tests/test_tables.py | 1142 | def test_table_extract_stable_after_second_find_tables(): | STRING |
| LOW | tests/test_tables.py | 1175 | def test_find_tables_use_layout_true_without_layout_is_line_based(): | STRING |
| LOW | tests/test_tables.py | 1225 | def test_refine_grid_splits_overmerged_body(): | STRING |
| LOW | tests/test_tables.py | 1246 | def test_find_tables_refine_splits_rows_default_unchanged(): | STRING |
| LOW | tests/test_tables.py | 1277 | def test_refine_repeated_leading_header_cuts_exact_signature(): | STRING |
| LOW | tests/test_tables.py | 1301 | def test_refine_repeated_leading_header_cuts_rejects_body_and_short_segments(): | STRING |
| LOW | tests/test_tables.py | 1350 | def test_find_tables_refine_splits_a_repeated_leading_header(): | STRING |
| LOW | tests/test_tables.py | 1419 | def test_resolve_spans_merged_header(): | STRING |
| LOW | tests/test_tables.py | 1449 | def test_find_tables_refine_exposes_placements_default_none(): | STRING |
| LOW | tests/test_tables.py | 1481 | def test_find_tables_refine_to_html_merged_header(): | STRING |
| LOW | tests/test_tables.py | 1502 | def test_find_tables_refine_header_meta(): | STRING |
| LOW | tests/test_tables.py | 1520 | def test_table_to_html_fallback_flat(): | STRING |
| LOW | tests/test_tables.py | 1541 | def test_render_table_html_section_row_collapse(): | STRING |
| LOW | tests/test_tables.py | 1582 | def test_find_tables_refine_tags_leaf_labels_under_a_spanning_header(): | STRING |
| LOW | tests/test_tables.py | 1643 | def test_header_leaf_labels_keep_a_numeric_body_row(): | STRING |
| LOW | tests/test_tables.py | 1666 | def test_header_leaf_labels_need_a_spanning_header_cell(): | STRING |
| LOW | tests/test_tables.py | 1689 | def test_header_leaf_labels_never_take_the_last_row(): | STRING |
| LOW | tests/test_tables.py | 1718 | def test_find_tables_union_fuses_layout_grid_with_line_candidate(): | STRING |
| LOW | tests/test_tables.py | 1764 | def test_find_tables_union_no_layout_degrades_to_line_candidates(): | STRING |
| LOW | tests/test_tables.py | 1818 | def test_find_tables_union_forwards_virtual_lines_to_candidates(): | STRING |
| LOW | tests/test_tables.py | 1844 | def test_find_tables_union_rejects_multiline_single_row_panel(): | STRING |
| LOW | tests/test_tables.py | 1862 | def test_find_tables_union_inside_picture_needs_table_shaped_text(): | STRING |
| LOW | tests/test_tables.py | 1915 | def test_find_tables_union_keeps_a_table_holding_a_picture_in_one_cell(): | STRING |
| LOW | tests/test_tables.py | 1938 | def test_find_tables_union_keeps_one_coherent_table_group_without_content_support(): | STRING |
| LOW | tests/test_drawings.py | 270 | def test_cdrawings_callback_exception(): | 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_widget_reproducers.py | 85 | def test_text_creation_preserves_value(tmp_path, garbage, value): | CODE |
| LOW | tests/test_widget_reproducers.py | 97 | def test_text_unicode_update_control(tmp_path, garbage): | CODE |
| LOW | tests/test_widget_reproducers.py | 114 | def test_checkbox_creation_writes_pdf_name(tmp_path, garbage, selected): | CODE |
| LOW | tests/test_widget_reproducers.py | 133 | def test_checkbox_update_writes_pdf_name(tmp_path, garbage): | CODE |
| LOW | tests/test_widget_reproducers.py | 158 | def test_delete_last_widget_removes_field(tmp_path, garbage, hierarchy): | CODE |
| LOW | tests/test_widget_reproducers.py | 179 | def test_delete_shared_widgets(tmp_path, garbage, delete_both): | CODE |
| LOW | tests/test_widget_reproducers.py | 204 | def test_shared_value_update_refreshes_other_widget(tmp_path, garbage, sync_flags): | CODE |
| LOW | tests/test_widget_reproducers.py | 240 | def test_shared_value_manual_update_control(tmp_path, garbage): | CODE |
| LOW | tests/test_widget_reproducers.py | 266 | def test_radio_creation_has_at_most_one_selected_widget(tmp_path, garbage): | CODE |
| LOW | tests/test_widget_reproducers.py | 285 | def test_radio_selection_writes_pdf_name(tmp_path, garbage): | 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 | 799 | def github_workflow_unimportant(): | CODE |
| 63 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 | 4513 | Delete an entry from EmbeddedFiles. Notes: The argument must be name or index of an EmbeddedFiles i | STRING |
| HIGH | src/__init__.py | 5204 | Extract a document page's text by page number. Notes: Convenience function calling page.get_text(). | STRING |
| HIGH | src/__init__.py | 11204 | Calculate minimal sub-rectangle for the overlay text. Notes: Because 'insert_textbox' suppo | STRING |
| HIGH | src/__init__.py | 12646 | Join rectangles of neighboring vector graphic items. Args: clip: optional rect-like to restrict the | STRING |
| HIGH | src/__init__.py | 13366 | Insert text into a given rectangle. Notes: Creates a Shape object, uses its same-named method and c | STRING |
| HIGH | src/__init__.py | 23106 | Calculate transformation matrix from source to target rect. Notes: The product of four matrices in this seq | STRING |
| HIGH | src/__init__.py | 24713 | Return rectangles of text lines between two points. Notes: The default of 'start' is top-left of 'clip'. Th | STRING |
| HIGH | src/__init__.py | 24802 | 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 | 1151 | 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 | 226 | run(f'cd {mupdf_dir} && git pull && git submodule update --init') | CODE |
| HIGH | scripts/sysinstall.py | 317 | run(f'. {venv_name}/bin/activate && pip install --upgrade pip') | CODE |
| HIGH | scripts/sysinstall.py | 318 | run(f'. {venv_name}/bin/activate && pip install --upgrade installer') | CODE |
| HIGH⚡ | scripts/sysinstall.py | 333 | run(f'{sudo}rm -r {p}/site-packages/pymupdf || true') | CODE |
| HIGH⚡ | scripts/sysinstall.py | 334 | run(f'{sudo}rm -r {p}/site-packages/pymupdf.py || true') | CODE |
| HIGH⚡ | scripts/sysinstall.py | 335 | run(f'{sudo}rm -r {p}/site-packages/fitz || true') | CODE |
| HIGH⚡ | scripts/sysinstall.py | 336 | run(f'{sudo}rm -r {p}/site-packages/fitz.py || true') | CODE |
| HIGH⚡ | scripts/sysinstall.py | 337 | run(f'{sudo}rm -r {p}/site-packages/pymupdf-*.dist-info || true') | CODE |
| HIGH⚡ | scripts/sysinstall.py | 338 | run(f'{sudo}rm -r {root_prefix}/bin/pymupdf || true') | CODE |
| HIGH | scripts/test.py | 686 | run(f'cd {pyenv_dir} && src/configure && make -C src') | CODE |
| HIGH | scripts/test.py | 690 | e = run(f'. {venv_name}/bin/activate && python {shlex.join(sys.argv)}', | CODE |
| HIGH | scripts/test.py | 1213 | run(f'mkdir -p {pymupdf_dir}/wheelhouse && cp -p {pymupdf_dir}/dist/* {pymupdf_dir}/wheelhouse/') | STRING |
| HIGH | scripts/test.py | 1589 | command = f'{path}\\Scripts\\activate && python' | STRING |
| HIGH | scripts/test.py | 1596 | command = f'. {path}/bin/activate && python {shlex.join(args)}' | STRING |
| 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 | 5 | 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_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_widget_reproducers.py | 7 | 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/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 | 421 | CODE | |
| LOW | src/__init__.py | 422 | CODE | |
| LOW | src/__init__.py | 423 | CODE | |
| LOW | src/__init__.py | 424 | CODE | |
| LOW | src/__init__.py | 426 | CODE | |
| LOW | src/__init__.py | 427 | CODE | |
| LOW | src/__init__.py | 428 | CODE | |
| LOW | src/__init__.py | 343 | CODE | |
| LOW | src/__init__.py | 26746 | 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 | 116 | CODE | |
| LOW | src/_table_headers.py | 34 | CODE | |
| 2 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 | 1305 | CODE | |
| LOW | src/__init__.py | 46 | CODE | |
| LOW | src/__init__.py | 184 | CODE | |
| LOW | src/__init__.py | 213 | CODE | |
| LOW | src/__init__.py | 19201 | CODE | |
| LOW | src/__init__.py | 20259 | CODE | |
| LOW | src/__init__.py | 21261 | CODE | |
| LOW | src/__init__.py | 21907 | CODE | |
| LOW | src/__init__.py | 22926 | CODE | |
| LOW | src/__init__.py | 23064 | CODE | |
| LOW | src/__init__.py | 23154 | CODE | |
| LOW | src/__init__.py | 25067 | CODE | |
| LOW | src/__init__.py | 25527 | CODE | |
| LOW | src/__init__.py | 25657 | CODE | |
| LOW | src/__init__.py | 894 | CODE | |
| LOW | src/__init__.py | 1013 | CODE | |
| LOW | src/__init__.py | 1615 | CODE | |
| LOW | src/__init__.py | 2605 | CODE | |
| LOW | src/__init__.py | 2913 | CODE | |
| LOW | src/__init__.py | 4005 | CODE | |
| LOW | src/__init__.py | 4676 | CODE | |
| LOW | src/__init__.py | 5360 | CODE | |
| LOW | src/__init__.py | 5433 | CODE | |
| LOW | src/__init__.py | 5951 | CODE | |
| LOW | src/__init__.py | 6278 | CODE | |
| LOW | src/__init__.py | 6581 | CODE | |
| LOW | src/__init__.py | 6707 | CODE | |
| LOW | src/__init__.py | 7453 | CODE | |
| LOW | src/__init__.py | 7954 | CODE | |
| LOW | src/__init__.py | 8321 | CODE | |
| LOW | src/__init__.py | 8534 | CODE | |
| LOW | src/__init__.py | 9777 | CODE | |
| LOW | src/__init__.py | 10503 | CODE | |
| LOW | src/__init__.py | 10891 | CODE | |
| LOW | src/__init__.py | 10947 | CODE | |
| LOW | src/__init__.py | 11578 | CODE | |
| LOW | src/__init__.py | 11617 | CODE | |
| LOW | src/__init__.py | 11651 | CODE | |
| LOW | src/__init__.py | 11689 | 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 | 494 | # Create a new PDF document | COMMENT |
| MEDIUM | tests/test_general.py | 2093 | # 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 | 10132 | # Create a new parent field for the flat RBG | COMMENT |
| MEDIUM | src/__init__.py | 13248 | # Create a unique image reference name. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 1061 | # Add extra flags for MacOS cross-compilation, where ARCHFLAGS can be | 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/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 | 341 | else: | COMMENT |
| LOW | scripts/test.py | 1181 | # | 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 | 6201 | # So we first remove our reference to the `fz_page*`. This will | COMMENT |
| LOW | src/__init__.py | 19201 | return ret | COMMENT |
| LOW | src/__init__.py | 26301 | # If there are pending warnings when we exit, we end up in this sequence: | COMMENT |
| LOW | src/_table_union.py | 41 | # from the layout analyzer (each "table" group's GridPrediction, read from | COMMENT |
| LOW | src/utils.py | 761 | COMMENT | |
| LOW | src/_table_refine.py | 41 | # Grid refinement runs three splitters, each taking (page, grid) and returning a | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/__init__.py | 22982 | CODE | |
| MEDIUM | src/__init__.py | 8514 | CODE | |
| MEDIUM | src/__init__.py | 8515 | CODE | |
| MEDIUM | src/__init__.py | 8516 | CODE | |
| MEDIUM | src/__init__.py | 8523 | CODE | |
| MEDIUM | src/__init__.py | 8528 | CODE | |
| MEDIUM | src/__init__.py | 12163 | CODE | |
| MEDIUM | src/__init__.py | 12168 | CODE | |
| MEDIUM | src/__init__.py | 12259 | 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 | 2098 | # Read file as bytes | COMMENT |
| LOW | docs/samples/code-printer.py | 129 | # Write the file code | COMMENT |
| LOW⚡ | docs/samples/code-printer.py | 152 | # Write the file content. | COMMENT |
| LOW | src/__init__.py | 24088 | # Check if any items were added ... | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/test_textbox.py | 178 | base_text = """Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolo | CODE |
| LOW⚡ | tests/test_textbox.py | 178 | base_text = """Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolo | CODE |
| LOW⚡ | tests/test_textbox.py | 180 | text = """Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore ma | CODE |
| LOW⚡ | tests/test_textbox.py | 180 | 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 | 587 | # Step 1: Mark the area(s) to redact | COMMENT |
| LOW | README.md | 591 | # 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 | 7030 | def set_metadata(doc: 'Document', m: dict = None) -> None: | CODE |
| LOW | src/__init__.py | 7091 | def set_oc(doc: 'Document', xref: int, oc: int) -> None: | CODE |
| LOW | src/__init__.py | 13832 | def update_link(page: 'Page', lnk: dict) -> None: | CODE |