Repository Analysis

pypa/pipx

Install and Run Python Applications in Isolated Environments

25.7 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of pypa/pipx, a Python project with 12,947 GitHub stars. SynthScan v2.0 examined 34,535 lines of code across 166 source files, recording 919 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 25.7 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).

25.7
Adjusted Score
25.7
Raw Score
100%
Time Factor
2026-08-25
Last Push
12.9K
Stars
Python
Language
34.5K
Lines of Code
166
Files
919
Pattern Hits
2026-08-29
Scan Date
0.02
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 4MEDIUM 7LOW 908

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 919 distinct pattern matches across 9 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.

Hyper-Verbose Identifiers658 hits · 619 pts
SeverityFileLineSnippetContext
LOWtests/test_requires_python.py42def test_rejected_constraint_reads_the_backend_complaint(output: str, expected: str | None) -> None:CODE
LOWtests/test_requires_python.py58def test_unsatisfied_constraint_reports_only_a_mismatch(CODE
LOWtests/test_requires_python.py83def test_interpreter_for_takes_the_newest_installed_match(mocker: MockerFixture) -> None:CODE
LOWtests/test_requires_python.py89def test_interpreter_for_skips_a_version_the_system_lacks(mocker: MockerFixture) -> None:CODE
LOWtests/test_requires_python.py95def test_interpreter_for_accepts_a_patch_above_a_lower_bound(mocker: MockerFixture) -> None:CODE
LOWtests/test_requires_python.py101def test_interpreter_for_rejects_a_patch_above_an_upper_bound(mocker: MockerFixture) -> None:CODE
LOWtests/test_requires_python.py107def test_interpreter_for_rejects_every_patch_below_a_lower_bound(mocker: MockerFixture) -> None:CODE
LOWtests/test_requires_python.py114def test_interpreter_for_fetches_when_the_caller_allows_it(mocker: MockerFixture) -> None:CODE
LOWtests/test_requires_python.py120def test_interpreter_for_reports_a_system_without_a_match(mocker: MockerFixture) -> None:CODE
LOWtests/test_requires_python.py127def test_interpreter_for_reports_a_constraint_no_release_meets() -> None:CODE
LOWtests/test_requires_python.py144def project_excluding_this_python(tmp_path: Path) -> Path:CODE
LOWtests/test_requires_python.py164def test_install_moves_to_a_python_the_package_supports(CODE
LOWtests/test_transaction.py11def test_preserve_venv_keeps_the_backup_out_of_the_venv_namespace() -> None:CODE
LOWtests/test_transaction.py24def test_preserve_venv_restores_the_backup_on_failure() -> None:CODE
LOWtests/test_ensurepath.py55def test_ensure_path_dry_run_does_not_append(mock_userpath: FakeUserpath, capsys: pytest.CaptureFixture[str]) -> None:CODE
LOWtests/test_ensurepath.py65def test_ensure_path_dry_run_reports_prepend(mock_userpath: FakeUserpath, capsys: pytest.CaptureFixture[str]) -> None:CODE
LOWtests/test_ensurepath.py73def test_ensure_path_non_dry_run_still_appends(mock_userpath: FakeUserpath, capsys: pytest.CaptureFixture[str]) -> None:CODE
LOWtests/test_ensurepath.py81def test_ensure_pipx_paths_dry_run_footer(mock_userpath: FakeUserpath, capsys: pytest.CaptureFixture[str]) -> None:CODE
LOWtests/test_ensurepath.py110def test_ensure_pipx_paths_global_updates_system_profile(CODE
LOWtests/test_ensurepath.py126def test_ensure_pipx_paths_global_skips_userpath(mocker: MockerFixture, tmp_path: Path) -> None:CODE
LOWtests/test_ensurepath.py137def test_ensure_pipx_paths_global_dry_run_does_not_write(CODE
LOWtests/test_ensurepath.py150def test_ensure_pipx_paths_global_configuration_is_world_readable(mocker: MockerFixture, tmp_path: Path) -> None:CODE
LOWtests/test_ensurepath.py163def test_ensure_pipx_paths_global_reports_existing_configuration(CODE
LOWtests/test_ensurepath.py179def test_ensurepath_cli_global_writes_system_configuration(mocker: MockerFixture, tmp_path: Path) -> None:CODE
LOWtests/test_inject.py63def test_inject_json_reports_locked_environment(CODE
LOWtests/test_inject.py98def test_inject_json_reports_already_installed(CODE
LOWtests/test_inject.py130def test_inject_json_reports_partial_failure(CODE
LOWtests/test_inject.py174def test_inject_json_reports_no_packages(CODE
LOWtests/test_inject.py221def test_inject_rejects_pylock(CODE
LOWtests/test_inject.py250def test_inject_single_package(CODE
LOWtests/test_inject.py281def test_inject_main_package_extra(CODE
LOWtests/test_inject.py312def test_inject_simple_global() -> None:CODE
LOWtests/test_inject.py319def test_inject_simple_legacy_venv(CODE
LOWtests/test_inject.py353def test_inject_include_resources_from_dependency(CODE
LOWtests/test_inject.py373def test_inject_main_package_preserves_included_dependency(CODE
LOWtests/test_inject.py386def test_inject_force_replaces_included_dependency_resources(CODE
LOWtests/test_inject.py406def test_inject_include_resources_from_missing_dependency_rolls_back(CODE
LOWtests/test_inject.py434def test_inject_with_req_file(CODE
LOWtests/test_inject.py482def test_force_inject_reinstalls_without_storing_force(caplog: pytest.LogCaptureFixture) -> None:STRING
LOWtests/test_inject.py503def test_inject_inherits_cooldown(STRING
LOWtests/test_result_contract.py43def test_contract_success_envelope(capsys: pytest.CaptureFixture[str]) -> None:CODE
LOWtests/test_result_contract.py56def test_contract_error_envelope_names_the_failure(CODE
LOWtests/test_result_contract.py68def test_contract_dispatch_error_uses_the_envelope(CODE
LOWtests/conftest.py83def make_project_with_dependency(root: Path, tmp_path: Path) -> Callable[[str], Path]:STRING
LOWtests/conftest.py125def copied_dependency_resource(STRING
LOWtests/test_list.py52def test_list_allows_read_only_venv_lock(tmp_path: Path, mocker: MockerFixture) -> None:CODE
LOWtests/test_list.py143def test_list_returns_problem_for_corrupt_metadata(metadata: str) -> None:CODE
LOWtests/test_list.py152def test_list_suffix_legacy_venv(capsys: pytest.CaptureFixture[str], metadata_version: str) -> None:CODE
LOWtests/test_list.py234def test_list_json_rejects_human_filter(CODE
LOWtests/test_list.py246def test_list_selected_package_text(capsys: pytest.CaptureFixture[str]) -> None:CODE
LOWtests/test_list.py258def test_list_selected_packages_json(capsys: pytest.CaptureFixture[str]) -> None:CODE
LOWtests/test_list.py278def test_list_selected_package_short(CODE
LOWtests/test_list.py292def test_list_selected_package_with_suffix(capsys: pytest.CaptureFixture[str]) -> None:CODE
LOWtests/test_list.py302def test_list_selected_package_pinned(capsys: pytest.CaptureFixture[str]) -> None:CODE
LOWtests/test_list.py314def test_list_rejects_missing_selected_package(CODE
LOWtests/test_list.py322def test_list_injected_apps_without_symlinks(CODE
LOWtests/test_list.py337def test_list_waits_for_install(tmp_path: Path) -> None:CODE
LOWtests/test_list.py363def test_install_does_not_wait_for_other_environment(tmp_path: Path) -> None:CODE
LOWtests/test_list.py402def test_list_standalone_interpreter(monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]) -> None:CODE
LOWtests/test_list.py428def test_list_does_not_trigger_maintenance() -> None:CODE
598 more matches not shown…
Unused Imports165 hits · 148 pts
SeverityFileLineSnippetContext
LOWget-pipx.py2CODE
LOWhatch_build.py1CODE
LOWtests/test_requires_python.py1CODE
LOWtests/test_transaction.py1CODE
LOWtests/package_info.py1CODE
LOWtests/test_ensurepath.py1CODE
LOWtests/test_inject.py1CODE
LOWtests/test_result_contract.py1CODE
LOWtests/conftest.py1CODE
LOWtests/test_list.py1CODE
LOWtests/test_uninstall.py1CODE
LOWtests/test_max_logs.py3CODE
LOWtests/test_common.py1CODE
LOWtests/test_animate.py1CODE
LOWtests/test_uninject.py1CODE
LOWtests/test_venv_inspect.py1CODE
LOWtests/test_pin.py1CODE
LOWtests/test_unpin.py1CODE
LOWtests/test_install_all.py1CODE
LOWtests/test_backends_install.py1CODE
LOWtests/test_script.py1CODE
LOWtests/test_run.py1CODE
LOWtests/test_expose.py1CODE
LOWtests/test_upgrade.py1CODE
LOWtests/test_imports.py1CODE
LOWtests/test_uninstall_all.py1CODE
LOWtests/test_reinstall.py1CODE
LOWtests/test_venv.py1CODE
LOWtests/test_completions_expose.py1CODE
LOWtests/test_shared_libs.py1CODE
LOWtests/test_execute.py1CODE
LOWtests/test_manifest.py1CODE
LOWtests/test_util.py1CODE
LOWtests/test_upgrade_shared.py1CODE
LOWtests/test_pth_encoding.py1CODE
LOWtests/test_outdated.py1CODE
LOWtests/test_standalone_interpreter.py1CODE
LOWtests/test_pipx_metadata_file.py1CODE
LOWtests/test_subprocess_env.py1CODE
LOWtests/test_upgrade_all.py1CODE
LOWtests/test_docs_urls.py1CODE
LOWtests/test_paths.py1CODE
LOWtests/test_backends.py1CODE
LOWtests/test_health.py1CODE
LOWtests/test_self_managed.py1CODE
LOWtests/test_completions.py1CODE
LOWtests/test_runpip.py1CODE
LOWtests/test_interpreter.py1CODE
LOWtests/test_reset.py1CODE
LOWtests/test_package_specifier.py1CODE
LOWtests/test_run_uv.py1CODE
LOWtests/test_reinstall_all.py1CODE
LOWtests/helpers.py1CODE
LOWtests/test_main.py1CODE
LOWtests/test_install.py1CODE
LOWtests/test_cache.py1CODE
LOWtests/test_environment.py1CODE
LOWtests/test_install_all_packages.py16CODE
LOWtests/test_emojis.py1CODE
LOWdocs/conf.py3CODE
105 more matches not shown…
Modern Structural Boilerplate54 hits · 50 pts
SeverityFileLineSnippetContext
LOWhatch_build.py27__all__ = [CODE
LOWsrc/pipx/animate.py147__all__ = [CODE
LOWsrc/pipx/shared_libs.py31logger = logging.getLogger(__name__)CODE
LOWsrc/pipx/shared_libs.py238__all__ = [CODE
LOWsrc/pipx/paths.py175__all__ = [CODE
LOWsrc/pipx/util.py596__all__ = [STRING
LOWsrc/pipx/package_specifier.py26logger = logging.getLogger(__name__)CODE
LOWsrc/pipx/package_specifier.py319__all__ = [STRING
LOWsrc/pipx/venv.py830__all__ = [STRING
LOWsrc/pipx/self_install.py72__all__ = [CODE
LOWsrc/pipx/pipx_metadata_file.py395__all__ = [STRING
LOWsrc/pipx/emojis.py39__all__ = [CODE
LOWsrc/pipx/result.py123__all__ = [CODE
LOWsrc/pipx/interpreter.py19logger = logging.getLogger(__name__)CODE
LOWsrc/pipx/interpreter.py231__all__ = [CODE
LOWsrc/pipx/requires_python.py124__all__ = [CODE
LOWsrc/pipx/standalone_python.py384__all__ = [CODE
LOWsrc/pipx/main.py62logger = logging.getLogger(__name__)CODE
LOWsrc/pipx/main.py2049__all__ = [CODE
LOWsrc/pipx/script.py209__all__ = [CODE
LOWsrc/pipx/script.py249__all__ = [STRING
LOWsrc/pipx/venv_inspect.py30logger = logging.getLogger(__name__)CODE
LOWsrc/pipx/venv_inspect.py558__all__ = [CODE
LOWsrc/pipx/backends/_base.py160__all__ = [CODE
LOWsrc/pipx/backends/__init__.py70__all__ = [CODE
LOWsrc/pipx/backends/uv.py322__all__ = [STRING
LOWsrc/pipx/backends/pip.py181__all__ = [CODE
LOWsrc/pipx/commands/pin.py118def _update_pin_info(venv: Venv, package_name: str, *, is_main_package: bool, pinned: bool) -> None:CODE
LOWsrc/pipx/commands/pin.py178__all__ = [CODE
LOWsrc/pipx/commands/run.py638__all__ = [CODE
LOWsrc/pipx/commands/list_packages.py20logger = logging.getLogger(__name__)CODE
LOWsrc/pipx/commands/list_packages.py180__all__ = [CODE
LOWsrc/pipx/commands/manifest.py477__all__ = [CODE
LOWsrc/pipx/commands/health.py188__all__ = [CODE
LOWsrc/pipx/commands/transaction.py44__all__ = [CODE
LOWsrc/pipx/commands/execute.py65__all__ = [CODE
LOWsrc/pipx/commands/reset.py127__all__ = [CODE
LOWsrc/pipx/commands/run_uv.py181__all__ = [CODE
LOWsrc/pipx/commands/cache.py44__all__ = [CODE
LOWsrc/pipx/commands/__init__.py29__all__ = [CODE
LOWsrc/pipx/commands/uninject.py36logger = logging.getLogger(__name__)CODE
LOWsrc/pipx/commands/uninject.py271__all__ = [STRING
LOWsrc/pipx/commands/run_pip.py135__all__ = [CODE
LOWsrc/pipx/commands/upgrade.py545__all__ = [STRING
LOWsrc/pipx/commands/inject.py363__all__ = [STRING
LOWsrc/pipx/commands/interpreter.py215__all__ = [CODE
LOWsrc/pipx/commands/common.py724__all__ = [CODE
LOWsrc/pipx/commands/ensure_path.py17logger = logging.getLogger(__name__)CODE
LOWsrc/pipx/commands/uninstall.py242__all__ = [CODE
LOWsrc/pipx/commands/environment.py102__all__ = [CODE
LOWsrc/pipx/commands/install.py913__all__ = [CODE
LOWsrc/pipx/commands/outdated.py292__all__ = [CODE
LOWsrc/pipx/commands/expose.py152__all__ = [CODE
LOWsrc/pipx/commands/reinstall.py327__all__ = [CODE
Deep Nesting22 hits · 22 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py334CODE
LOWtests/helpers.py124CODE
LOWscripts/release.py44CODE
LOWsrc/pipx/animate.py83CODE
LOWsrc/pipx/venv.py220CODE
LOWsrc/pipx/venv.py385CODE
LOWsrc/pipx/venv.py691CODE
LOWsrc/pipx/pipx_metadata_file.py257CODE
LOWsrc/pipx/standalone_python.py152CODE
LOWsrc/pipx/standalone_python.py184CODE
LOWsrc/pipx/standalone_python.py238CODE
LOWsrc/pipx/venv_inspect.py76CODE
LOWsrc/pipx/commands/pin.py18CODE
LOWsrc/pipx/commands/list_packages.py97CODE
LOWsrc/pipx/commands/list_packages.py120CODE
LOWsrc/pipx/commands/manifest.py43CODE
LOWsrc/pipx/commands/manifest.py352CODE
LOWsrc/pipx/commands/upgrade.py84CODE
LOWsrc/pipx/commands/interpreter.py118CODE
LOWsrc/pipx/commands/install.py58CODE
LOWsrc/pipx/commands/install.py625CODE
LOWsrc/pipx/commands/outdated.py169CODE
Self-Referential Comments6 hits · 20 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_shared_libs.py64 # Create a fake venv structureCOMMENT
MEDIUMtests/test_shared_libs.py71 # Create a pyvenv.cfg pointing to a non-existent PythonCOMMENT
MEDIUMtests/test_shared_libs.py81 # Create a fake venv structureCOMMENT
MEDIUMtests/test_shared_libs.py94 # Create a pyvenv.cfg pointing to the existing PythonCOMMENT
MEDIUMsrc/pipx/interpreter.py141# The following code was copied from https://github.com/uranusjr/pipx-standaloneCOMMENT
MEDIUMsrc/pipx/main.py1954 "# This file is a cache directory tag created by pipx.\n"STRING
Cross-Language Confusion4 hits · 18 pts
SeverityFileLineSnippetContext
HIGHtests/test_pipx_metadata_file.py180 .replace('"cooldown_days": null, ', "")CODE
HIGHscripts/release.py31 repo.git.push(push_target, "HEAD:main")CODE
HIGHscripts/release.py32 repo.git.push(push_target, str(tag))CODE
HIGHsrc/pipx/constants.py107 autoload -U compinit && compinitSTRING
Excessive Try-Catch Wrapping5 hits · 6 pts
SeverityFileLineSnippetContext
LOWsrc/pipx/shared_libs.py229 except Exception:CODE
LOWsrc/pipx/main.py1656 except Exception as e:STRING
LOWsrc/pipx/main.py2037 except Exception:CODE
MEDIUMsrc/pipx/main.py1863def setup_log_file() -> Path:CODE
LOWsrc/pipx/commands/run.py632 except Exception as error:CODE
AI Structural Patterns4 hits · 4 pts
SeverityFileLineSnippetContext
LOWsrc/pipx/util.py191CODE
LOWsrc/pipx/commands/run.py87CODE
LOWsrc/pipx/commands/upgrade.py203CODE
LOWsrc/pipx/commands/install.py58CODE
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/pipx/util.py223 # Set PYTHONSAFEPATH to prevent adding CWD to sys.path in subprocess Python commandsCOMMENT