Python Enhancement Proposals
This report summarizes scanner evidence for python/peps, a reStructuredText project with 5,026 GitHub stars. SynthScan examined 14,359 lines of code across 94 source files, recording 129 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 14.7 (Moderate 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? 88 finding(s).
Are imports declared and package/API names verified? 22 finding(s).
Are wrappers, guards, and repeated structures necessary? 79 finding(s).
Which changes need focused human review? 129 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 129 distinct pattern matches across 10 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 |
|---|---|---|---|---|
| HIGH | peps/pep-0418/clockutils.py | 238 | except AttributeError: | CODE |
| HIGH | peps/pep-0418/clockutils.py | 260 | except AttributeError: | CODE |
| HIGH | peps/pep-0418/clockutils.py | 281 | except AttributeError: | CODE |
| HIGH | peps/pep-0418/clockutils.py | 302 | except AttributeError: | CODE |
| HIGH | peps/pep-0418/clockutils.py | 323 | except AttributeError: | CODE |
| HIGH | peps/pep-0418/clockutils.py | 163 | except AttributeError: | CODE |
| HIGH | peps/pep-0418/clockutils.py | 243 | except OSError: | CODE |
| HIGH | peps/pep-0418/clockutils.py | 265 | except OSError: | CODE |
| HIGH | peps/pep-0418/clockutils.py | 286 | except OSError: | CODE |
| HIGH | peps/pep-0418/clockutils.py | 307 | except OSError: | CODE |
| HIGH | peps/pep-0418/clockutils.py | 328 | except OSError: | CODE |
| HIGH | peps/pep-0418/clockutils.py | 385 | except AttributeError: | CODE |
| HIGH | …_extensions/pep_processor/transforms/pep_references.py | 35 | except KeyError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | check-peps.py | 238 | def _validate_required_headers(found_headers: KeysView[str]) -> MessageIterator: | CODE |
| LOW | release_management/serialize.py | 68 | def create_release_schedule_calendar() -> str: | CODE |
| LOW | release_management/serialize.py | 83 | def release_schedule_calendar_lines( | CODE |
| LOW | …ase_management/tests/test_release_schedule_calendar.py | 13 | def test_create_release_calendar_has_calendar_metadata() -> None: | CODE |
| LOW | …ase_management/tests/test_release_schedule_calendar.py | 33 | def test_create_release_calendar_first_event() -> None: | CODE |
| LOW | pep_sphinx_extensions/__init__.py | 33 | def _update_config_for_builder(app: Sphinx) -> None: | CODE |
| LOW | …inx_extensions/tests/pep_zero_generator/test_parser.py | 105 | def test_parse_authors_invalid(): | CODE |
| LOW | …inx_extensions/tests/pep_zero_generator/test_parser.py | 127 | def test_abbreviate_type_status(test_type, test_status, expected): | CODE |
| LOW | …inx_extensions/tests/pep_zero_generator/test_writer.py | 8 | def test_pep_zero_writer_emit_text_newline(): | CODE |
| LOW | …inx_extensions/tests/pep_zero_generator/test_writer.py | 17 | def test_pep_zero_writer_emit_title(): | CODE |
| LOW | …inx_extensions/tests/pep_zero_generator/test_writer.py | 48 | def test_verify_email_addresses(test_input, expected): | CODE |
| LOW | …inx_extensions/tests/pep_zero_generator/test_writer.py | 59 | def test_verify_email_addresses_multiple_emails(): | CODE |
| LOW | …inx_extensions/tests/pep_zero_generator/test_writer.py | 104 | def test_emit_pep_row_links_python_version_to_release_pep( | CODE |
| LOW | …s/tests/pep_zero_generator/test_pep_index_generator.py | 14 | def test_build_release_peps_links_individual_versions_from_joint_release_pep(): | CODE |
| LOW | …ions/tests/pep_processor/transform/test_pep_headers.py | 91 | def test_process_pretty_url_invalid(test_input, expected): | CODE |
| LOW | …ions/tests/pep_processor/transform/test_pep_headers.py | 152 | def test_abbreviate_status_unknown(): | CODE |
| LOW | …ions/tests/pep_processor/transform/test_pep_headers.py | 183 | def test_abbreviate_type_unknown(): | CODE |
| LOW | …sions/tests/pep_processor/transform/test_pep_footer.py | 6 | def test_get_page_footer_context(): | CODE |
| LOW | …sions/tests/pep_processor/transform/test_pep_footer.py | 19 | def test_get_page_footer_context_no_history(): | CODE |
| LOW | …sions/tests/pep_processor/transform/test_pep_footer.py | 28 | def test_get_last_modified_timestamps(): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_email.py | 35 | def test_validate_author_over__indented(line: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_email.py | 49 | def test_validate_author_continuation(line: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_post_url.py | 23 | def test_validate_discussions_to_valid(line: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_post_url.py | 37 | def test_validate_discussions_to_list_name(line: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_post_url.py | 51 | def test_validate_discussions_to_invalid_list_domain(line: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_post_url.py | 79 | def test_validate_post_history_valid(body: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_post_url.py | 91 | def test_validate_post_history_unbalanced_link(body: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_post_url.py | 112 | def test_validate_resolution_valid(line: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_post_url.py | 132 | def test_validate_resolution_invalid(line: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_post_url.py | 144 | def test_validate_resolution_unbalanced_link(line: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_post_url.py | 171 | def test_thread_checker_valid(thread_url: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_post_url.py | 224 | def test_thread_checker_invalid(thread_url: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_post_url.py | 244 | def test_thread_checker_valid_allow_message(thread_url: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_post_url.py | 269 | def test_thread_checker_invalid_allow_message(thread_url: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_post_url.py | 296 | def test_thread_checker_valid_discussions_to(thread_url: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_post_url.py | 320 | def test_thread_checker_invalid_discussions_to(thread_url: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_post_url.py | 330 | def test_thread_checker_allow_message_discussions_to(): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_pep_number.py | 27 | def test_validate_pep_number_invalid_header(line: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_pep_lint.py | 50 | def test_skip_direct_pep_link_check(): | CODE |
| LOW | …_sphinx_extensions/tests/pep_lint/test_direct_links.py | 14 | def test_check_direct_links_pep(line: str): | CODE |
| LOW | …_sphinx_extensions/tests/pep_lint/test_direct_links.py | 28 | def test_check_direct_links_rfc(line: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_date.py | 69 | def test_date_checker_malformed(date_str: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_date.py | 85 | def test_date_checker_too_early(date_str: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_date.py | 102 | def test_date_checker_too_late(date_str: str): | CODE |
| LOW⚡ | pep_sphinx_extensions/tests/pep_lint/test_headers.py | 47 | def test_header_pattern_no_match(test_input): | CODE |
| LOW⚡ | pep_sphinx_extensions/tests/pep_lint/test_headers.py | 51 | def test_validate_required_headers(): | CODE |
| LOW⚡ | pep_sphinx_extensions/tests/pep_lint/test_headers.py | 61 | def test_validate_required_headers_missing(): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_headers.py | 72 | def test_validate_required_headers_order(): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_headers.py | 97 | def test_validate_title_blank(): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_headers.py | 102 | def test_validate_title_too_long(): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_headers.py | 122 | def test_validate_status_valid(line: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_headers.py | 145 | def test_validate_status_invalid(line: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_headers.py | 181 | def test_validate_type_invalid(line: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_headers.py | 264 | def test_validate_pep_references(line: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_headers.py | 279 | def test_validate_pep_references_separators(line: str): | CODE |
| LOW | pep_sphinx_extensions/tests/pep_lint/test_headers.py | 330 | def test_validate_python_version(line: str, expected_warnings: set): | CODE |
| LOW | pep_sphinx_extensions/pep_zero_generator/writer.py | 77 | def emit_author_table_separator(self, max_name_len: int) -> None: | STRING |
| LOW | …x_extensions/pep_processor/html/pep_html_translator.py | 20 | def should_be_compact_paragraph(node: nodes.paragraph) -> bool: | CODE |
| LOW | …x_extensions/pep_processor/html/pep_html_translator.py | 75 | def depart_footnote_reference(self, node): | CODE |
| LOW | …hinx_extensions/pep_processor/transforms/pep_footer.py | 57 | def _get_last_modified_timestamps(): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | build.py | 2 | # This file is placed in the public domain or under the | COMMENT |
| MEDIUM | check-peps.py | 3 | # This file is placed in the public domain or under the | COMMENT |
| MEDIUM | release_management/python-releases.toml | 1 | # This file is placed in the public domain or under the | COMMENT |
| MEDIUM | peps/conf.py | 1 | # This file is placed in the public domain or under the | COMMENT |
| MEDIUM | pep_sphinx_extensions/generate_rss.py | 1 | # This file is placed in the public domain or under the | COMMENT |
| MEDIUM | pep_sphinx_extensions/lexers/__init__.py | 1 | # This file is placed in the public domain or under the | COMMENT |
| MEDIUM | pep_sphinx_extensions/lexers/pep823_lexer.py | 1 | # This file is placed in the public domain or under the | COMMENT |
| MEDIUM | pep_sphinx_extensions/lexers/pep824_lexer.py | 1 | # This file is placed in the public domain or under the | COMMENT |
| MEDIUM | …phinx_extensions/pep_processor/transforms/pep_title.py | 39 | # Create the title string for the PEP | COMMENT |
| MEDIUM | …nx_extensions/pep_processor/transforms/pep_contents.py | 18 | # Create the contents placeholder section | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | check-peps.py | 16 | CODE | |
| LOW | release_management/serialize.py | 1 | CODE | |
| LOW | release_management/update_release_schedules.py | 26 | CODE | |
| LOW | release_management/__init__.py | 1 | CODE | |
| LOW | release_management/__main__.py | 1 | CODE | |
| LOW | pep_sphinx_extensions/__init__.py | 3 | CODE | |
| LOW | pep_sphinx_extensions/generate_rss.py | 4 | CODE | |
| LOW | pep_sphinx_extensions/lexers/__init__.py | 4 | CODE | |
| LOW | pep_sphinx_extensions/pep_zero_generator/subindices.py | 3 | CODE | |
| LOW | pep_sphinx_extensions/pep_zero_generator/parser.py | 3 | CODE | |
| LOW | pep_sphinx_extensions/pep_zero_generator/writer.py | 3 | CODE | |
| LOW | …x_extensions/pep_zero_generator/pep_index_generator.py | 19 | CODE | |
| LOW | pep_sphinx_extensions/pep_zero_generator/errors.py | 1 | CODE | |
| LOW | …x_extensions/pep_processor/html/pep_html_translator.py | 1 | CODE | |
| LOW | …sphinx_extensions/pep_processor/transforms/pep_zero.py | 1 | CODE | |
| LOW | …nx_extensions/pep_processor/transforms/pep_contents.py | 1 | CODE | |
| LOW | …tensions/pep_processor/parsing/pep_banner_directive.py | 3 | CODE | |
| LOW | …_sphinx_extensions/pep_processor/parsing/pep_parser.py | 1 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | check-peps.py | 135 | CODE | |
| LOW | check-peps.py | 174 | CODE | |
| LOW | check-peps.py | 378 | CODE | |
| LOW | check-peps.py | 410 | CODE | |
| LOW | check-peps.py | 513 | CODE | |
| LOW | release_management/update_release_schedules.py | 118 | CODE | |
| LOW | peps/pep-0465/scan-ops.py | 50 | CODE | |
| LOW | peps/pep-0426/pepsort.py | 124 | CODE | |
| LOW | pep_sphinx_extensions/pep_zero_generator/writer.py | 316 | CODE | |
| LOW | …hinx_extensions/pep_processor/transforms/pep_footer.py | 17 | CODE | |
| LOW | …inx_extensions/pep_processor/transforms/pep_headers.py | 222 | CODE | |
| LOW | …inx_extensions/pep_processor/transforms/pep_headers.py | 58 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | pep_sphinx_extensions/pep_processor/parsing/pep_role.py | 19 | pep_base = self.inliner.document.settings.pep_url.format(pep_num) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | release_management/python-releases.toml | 1 | # This file is placed in the public domain or under the | COMMENT |
| LOW | release_management/python-releases.toml | 481 | [[release."2.4"]] | COMMENT |
| LOW | peps/pep-0465/scan-ops.py | 121 | [[], | COMMENT |
| LOW | peps/pep-0418/bench_time.c | 41 | {"CLOCK_PROCESS_CPUTIME_ID", CLOCK_PROCESS_CPUTIME_ID}, | COMMENT |
| LOW | peps/pep-0418/bench_time.c | 61 | #ifdef CLOCK_MONOTONIC_PRECISE | COMMENT |
| LOW | peps/pep-0418/clockutils.py | 1 | #!/usr/bin/python | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | release_management/update_release_schedules.py | 68 | def update_peps() -> None: | CODE |
| LOW | release_management/update_release_schedules.py | 118 | def update_pep(metadata: VersionMetadata, schedules: ReleaseSchedules) -> None: | CODE |
| LOW | peps/pep-0426/pepsort.py | 18 | logger = logging.getLogger(__name__) | CODE |
| LOW | pep_sphinx_extensions/__init__.py | 33 | def _update_config_for_builder(app: Sphinx) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …inx_extensions/tests/pep_zero_generator/test_parser.py | 79 | [_Author(full_name="First Last", email="user@example.com")], | CODE |
| LOW | …inx_extensions/tests/pep_zero_generator/test_parser.py | 87 | [_Author(full_name="First Last", email="user@example.com")], | CODE |
| LOW | …ensions/tests/pep_processor/transform/test_pep_zero.py | 12 | "", text="user@example.com", refuri="mailto:user@example.com" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | peps/pep-0465/scan-ops.py | 60 | except Exception as e: | CODE |
| LOW | peps/pep-0426/pepsort.py | 173 | except Exception: | CODE |