Repository Analysis

pypa/pipx

Install and Run Python Applications in Isolated Environments

21.8 Moderate AI signal View on GitHub

Analysis Overview

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

21.8
Adjusted Score
21.8
Raw Score
100%
Time Factor
2026-07-14
Last Push
12.9K
Stars
Python
Language
35.1K
Lines of Code
284
Files
773
Pattern Hits
2026-07-14
Scan Date
0.01
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

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

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 8LOW 761

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 773 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 Identifiers590 hits · 570 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.py68def test_interpreter_for_takes_the_newest_installed_match(mocker: MockerFixture) -> None:CODE
LOWtests/test_requires_python.py75def test_interpreter_for_skips_a_version_the_system_lacks(mocker: MockerFixture) -> None:CODE
LOWtests/test_requires_python.py86def test_interpreter_for_fetches_when_the_caller_allows_it(mocker: MockerFixture) -> None:CODE
LOWtests/test_requires_python.py96def test_interpreter_for_reports_a_system_without_a_match(mocker: MockerFixture) -> None:CODE
LOWtests/test_requires_python.py106def test_interpreter_for_reports_a_constraint_no_release_meets() -> None:CODE
LOWtests/test_requires_python.py122def project_excluding_this_python(tmp_path: Path) -> Path:CODE
LOWtests/test_requires_python.py141def test_install_moves_to_a_python_the_package_supports(CODE
LOWtests/test_ensurepath.py51def test_ensure_path_dry_run_does_not_append(mock_userpath: FakeUserpath, capsys: pytest.CaptureFixture[str]) -> None:CODE
LOWtests/test_ensurepath.py61def test_ensure_path_dry_run_reports_prepend(mock_userpath: FakeUserpath, capsys: pytest.CaptureFixture[str]) -> None:CODE
LOWtests/test_ensurepath.py69def test_ensure_path_non_dry_run_still_appends(mock_userpath: FakeUserpath, capsys: pytest.CaptureFixture[str]) -> None:CODE
LOWtests/test_ensurepath.py77def test_ensure_pipx_paths_dry_run_footer(mock_userpath: FakeUserpath, capsys: pytest.CaptureFixture[str]) -> None:CODE
LOWtests/test_ensurepath.py106def test_ensure_pipx_paths_global_updates_system_profile(CODE
LOWtests/test_ensurepath.py122def test_ensure_pipx_paths_global_skips_userpath(mocker: MockerFixture, tmp_path: Path) -> None:CODE
LOWtests/test_ensurepath.py133def test_ensure_pipx_paths_global_dry_run_does_not_write(CODE
LOWtests/test_ensurepath.py146def test_ensure_pipx_paths_global_configuration_is_world_readable(mocker: MockerFixture, tmp_path: Path) -> None:CODE
LOWtests/test_ensurepath.py159def test_ensure_pipx_paths_global_reports_existing_configuration(CODE
LOWtests/test_ensurepath.py174def test_ensurepath_cli_global_writes_system_configuration(CODE
LOWtests/test_inject.py54def test_inject_json_reports_locked_environment(CODE
LOWtests/test_inject.py87def test_inject_json_reports_already_installed(CODE
LOWtests/test_inject.py118def test_inject_json_reports_partial_failure(CODE
LOWtests/test_inject.py160def test_inject_json_reports_no_packages(CODE
LOWtests/test_inject.py201def test_inject_rejects_pylock(CODE
LOWtests/test_inject.py230def test_inject_single_package(pipx_temp_env, capsys, caplog, pkg_spec):CODE
LOWtests/test_inject.py256def test_inject_main_package_extra(CODE
LOWtests/test_inject.py287def test_inject_simple_global(pipx_temp_env, capsys):CODE
LOWtests/test_inject.py293def test_inject_simple_legacy_venv(pipx_temp_env, capsys, metadata_version):CODE
LOWtests/test_inject.py322def test_inject_include_apps_from_dependency(CODE
LOWtests/test_inject.py342def test_inject_main_package_preserves_included_dependency(CODE
LOWtests/test_inject.py355def test_inject_force_replaces_included_dependency_resources(CODE
LOWtests/test_inject.py375def test_inject_include_apps_from_missing_dependency_rolls_back(CODE
LOWtests/test_inject.py403def test_inject_with_req_file(pipx_temp_env, capsys, caplog, tmp_path, with_packages):CODE
LOWtests/test_inject.py441def test_force_inject_reinstalls_without_storing_force(pipx_temp_env, caplog):STRING
LOWtests/test_inject.py463def test_inject_inherits_cooldown(STRING
LOWtests/conftest.py76def make_project_with_dependency(root: Path, tmp_path: Path) -> Callable[[str], Path]:STRING
LOWtests/conftest.py118def copied_dependency_resource(STRING
LOWtests/test_list.py99def test_list_returns_problem_for_corrupt_metadata(pipx_temp_env: None, metadata: str) -> None:CODE
LOWtests/test_list.py107def test_list_suffix_legacy_venv(pipx_temp_env, monkeypatch, capsys, metadata_version):CODE
LOWtests/test_list.py185def test_list_json_rejects_human_filter(CODE
LOWtests/test_list.py195def test_list_selected_package_text(pipx_temp_env: None, capsys: pytest.CaptureFixture[str]) -> None:CODE
LOWtests/test_list.py206def test_list_selected_packages_json(pipx_temp_env: None, capsys: pytest.CaptureFixture[str]) -> None:CODE
LOWtests/test_list.py225def test_list_selected_package_short(CODE
LOWtests/test_list.py239def test_list_selected_package_with_suffix(pipx_temp_env: None, capsys: pytest.CaptureFixture[str]) -> None:CODE
LOWtests/test_list.py248def test_list_selected_package_pinned(pipx_temp_env: None, capsys: pytest.CaptureFixture[str]) -> None:CODE
LOWtests/test_list.py259def test_list_rejects_missing_selected_package(CODE
LOWtests/test_list.py267def test_list_injected_apps_without_symlinks(CODE
LOWtests/test_list.py282def test_list_waits_for_install(pipx_temp_env: None, tmp_path: Path) -> None:CODE
LOWtests/test_list.py307def test_install_does_not_wait_for_other_environment(pipx_temp_env: None, tmp_path: Path) -> None:CODE
LOWtests/test_list.py345def test_list_standalone_interpreter(pipx_temp_env, monkeypatch, mocked_github_api, capsys):CODE
LOWtests/test_list.py372def test_list_does_not_trigger_maintenance(pipx_temp_env, caplog):CODE
LOWtests/test_list.py401def test_list_pinned_packages(pipx_temp_env, monkeypatch, capsys):CODE
LOWtests/test_list.py414def test_list_pinned_packages_include_injected(pipx_temp_env, monkeypatch, capsys):CODE
LOWtests/test_list.py432def test_list_installed_packages_error(monkeypatch, tmp_path, fake_process):CODE
LOWtests/test_uninstall.py95def test_uninstall_json_reports_missing(CODE
LOWtests/test_uninstall.py123def test_uninstall_ignores_disappearing_resources(CODE
LOWtests/test_uninstall.py149# def test_uninstall_circular_deps(pipx_temp_env):COMMENT
LOWtests/test_uninstall.py155def test_uninstall_legacy_venv(pipx_temp_env, metadata_version):CODE
LOWtests/test_uninstall.py166def test_uninstall_legacy_venv_inspects_once(pipx_temp_env: None, mocker: MockerFixture) -> None:CODE
LOWtests/test_uninstall.py199def test_uninstall_removes_selected_dependency_resources(pipx_temp_env: None, local_extras_project: Path) -> None:CODE
530 more matches not shown…
Unused Imports84 hits · 72 pts
SeverityFileLineSnippetContext
LOWhatch_build.py1CODE
LOWtests/test_requires_python.py1CODE
LOWtests/test_inject.py1CODE
LOWtests/test_uninject.py1CODE
LOWtests/test_backends_install.py1CODE
LOWtests/test_script.py1CODE
LOWtests/test_upgrade.py1CODE
LOWtests/test_completions_expose.py1CODE
LOWtests/test_execute.py1CODE
LOWtests/test_util.py1CODE
LOWtests/test_outdated.py1CODE
LOWtests/test_standalone_interpreter.py1CODE
LOWtests/test_upgrade_all.py1CODE
LOWtests/test_backends.py1CODE
LOWtests/test_self_managed.py1CODE
LOWtests/test_reset.py1CODE
LOWtests/test_run_uv.py1CODE
LOWtests/test_install.py1CODE
LOWtests/test_cache.py1CODE
LOWscripts/release.py3CODE
LOWsrc/pipx/venv.py12CODE
LOWsrc/pipx/interpreter.py25CODE
LOWsrc/pipx/requires_python.py1CODE
LOWsrc/pipx/script.py1CODE
LOWsrc/pipx/backends/_base.py1CODE
LOWsrc/pipx/backends/__init__.py1CODE
LOWsrc/pipx/backends/__init__.py6CODE
LOWsrc/pipx/backends/uv.py1CODE
LOWsrc/pipx/backends/pip.py1CODE
LOWsrc/pipx/commands/pin.py1CODE
LOWsrc/pipx/commands/manifest.py1CODE
LOWsrc/pipx/commands/health.py1CODE
LOWsrc/pipx/commands/execute.py1CODE
LOWsrc/pipx/commands/reset.py1CODE
LOWsrc/pipx/commands/run_uv.py1CODE
LOWsrc/pipx/commands/cache.py1CODE
LOWsrc/pipx/commands/__init__.py1CODE
LOWsrc/pipx/commands/__init__.py1CODE
LOWsrc/pipx/commands/__init__.py2CODE
LOWsrc/pipx/commands/__init__.py3CODE
LOWsrc/pipx/commands/__init__.py4CODE
LOWsrc/pipx/commands/__init__.py5CODE
LOWsrc/pipx/commands/__init__.py5CODE
LOWsrc/pipx/commands/__init__.py5CODE
LOWsrc/pipx/commands/__init__.py6CODE
LOWsrc/pipx/commands/__init__.py6CODE
LOWsrc/pipx/commands/__init__.py6CODE
LOWsrc/pipx/commands/__init__.py6CODE
LOWsrc/pipx/commands/__init__.py7CODE
LOWsrc/pipx/commands/__init__.py7CODE
LOWsrc/pipx/commands/__init__.py8CODE
LOWsrc/pipx/commands/__init__.py8CODE
LOWsrc/pipx/commands/__init__.py8CODE
LOWsrc/pipx/commands/__init__.py9CODE
LOWsrc/pipx/commands/__init__.py9CODE
LOWsrc/pipx/commands/__init__.py9CODE
LOWsrc/pipx/commands/__init__.py10CODE
LOWsrc/pipx/commands/__init__.py11CODE
LOWsrc/pipx/commands/__init__.py11CODE
LOWsrc/pipx/commands/__init__.py12CODE
24 more matches not shown…
Modern Structural Boilerplate54 hits · 50 pts
SeverityFileLineSnippetContext
LOWhatch_build.py28__all__ = [CODE
LOWsrc/pipx/animate.py143__all__ = [CODE
LOWsrc/pipx/shared_libs.py26logger = logging.getLogger(__name__)CODE
LOWsrc/pipx/shared_libs.py233__all__ = [CODE
LOWsrc/pipx/paths.py171__all__ = [CODE
LOWsrc/pipx/util.py574__all__ = [STRING
LOWsrc/pipx/package_specifier.py24logger = logging.getLogger(__name__)CODE
LOWsrc/pipx/package_specifier.py305__all__ = [STRING
LOWsrc/pipx/venv.py798__all__ = [STRING
LOWsrc/pipx/self_install.py67__all__ = [CODE
LOWsrc/pipx/pipx_metadata_file.py385__all__ = [STRING
LOWsrc/pipx/emojis.py37__all__ = [CODE
LOWsrc/pipx/result.py85__all__ = [CODE
LOWsrc/pipx/interpreter.py17logger = logging.getLogger(__name__)CODE
LOWsrc/pipx/interpreter.py222__all__ = [CODE
LOWsrc/pipx/requires_python.py87__all__ = [CODE
LOWsrc/pipx/standalone_python.py252__all__ = [CODE
LOWsrc/pipx/main.py57logger = logging.getLogger(__name__)CODE
LOWsrc/pipx/main.py1917__all__ = [CODE
LOWsrc/pipx/script.py187__all__ = [CODE
LOWsrc/pipx/script.py227__all__ = [STRING
LOWsrc/pipx/venv_inspect.py29logger = logging.getLogger(__name__)CODE
LOWsrc/pipx/venv_inspect.py534__all__ = [CODE
LOWsrc/pipx/backends/_base.py158__all__ = [CODE
LOWsrc/pipx/backends/__init__.py67__all__ = [CODE
LOWsrc/pipx/backends/uv.py291__all__ = [STRING
LOWsrc/pipx/backends/pip.py178__all__ = [CODE
LOWsrc/pipx/commands/pin.py116def _update_pin_info(venv: Venv, package_name: str, *, is_main_package: bool, pinned: bool) -> None:CODE
LOWsrc/pipx/commands/pin.py183__all__ = [CODE
LOWsrc/pipx/commands/run.py551__all__ = [STRING
LOWsrc/pipx/commands/list_packages.py16logger = logging.getLogger(__name__)CODE
LOWsrc/pipx/commands/list_packages.py163__all__ = [CODE
LOWsrc/pipx/commands/manifest.py374__all__ = [CODE
LOWsrc/pipx/commands/health.py184__all__ = [CODE
LOWsrc/pipx/commands/transaction.py35__all__ = [CODE
LOWsrc/pipx/commands/execute.py60__all__ = [CODE
LOWsrc/pipx/commands/reset.py97__all__ = [CODE
LOWsrc/pipx/commands/run_uv.py176__all__ = [CODE
LOWsrc/pipx/commands/cache.py30__all__ = [CODE
LOWsrc/pipx/commands/__init__.py22__all__ = [CODE
LOWsrc/pipx/commands/uninject.py37logger = logging.getLogger(__name__)CODE
LOWsrc/pipx/commands/uninject.py262__all__ = [STRING
LOWsrc/pipx/commands/run_pip.py128__all__ = [CODE
LOWsrc/pipx/commands/upgrade.py499__all__ = [STRING
LOWsrc/pipx/commands/inject.py358__all__ = [STRING
LOWsrc/pipx/commands/interpreter.py157__all__ = [CODE
LOWsrc/pipx/commands/common.py614__all__ = [CODE
LOWsrc/pipx/commands/ensure_path.py15logger = logging.getLogger(__name__)CODE
LOWsrc/pipx/commands/uninstall.py237__all__ = [CODE
LOWsrc/pipx/commands/environment.py97__all__ = [CODE
LOWsrc/pipx/commands/install.py880__all__ = [CODE
LOWsrc/pipx/commands/outdated.py267__all__ = [CODE
LOWsrc/pipx/commands/expose.py119__all__ = [CODE
LOWsrc/pipx/commands/reinstall.py234__all__ = [CODE
Deep Nesting23 hits · 23 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py256CODE
LOWtests/helpers.py110CODE
LOWscripts/release.py48CODE
LOWscripts/list_test_packages.py46CODE
LOWscripts/update_package_cache.py54CODE
LOWsrc/pipx/animate.py79CODE
LOWsrc/pipx/venv.py203CODE
LOWsrc/pipx/venv.py366CODE
LOWsrc/pipx/venv.py662CODE
LOWsrc/pipx/pipx_metadata_file.py255CODE
LOWsrc/pipx/standalone_python.py99CODE
LOWsrc/pipx/standalone_python.py111CODE
LOWsrc/pipx/venv_inspect.py65CODE
LOWsrc/pipx/commands/pin.py18CODE
LOWsrc/pipx/commands/list_packages.py88CODE
LOWsrc/pipx/commands/list_packages.py109CODE
LOWsrc/pipx/commands/manifest.py36CODE
LOWsrc/pipx/commands/upgrade.py81CODE
LOWsrc/pipx/commands/interpreter.py89CODE
LOWsrc/pipx/commands/common.py342CODE
LOWsrc/pipx/commands/install.py56CODE
LOWsrc/pipx/commands/install.py601CODE
LOWsrc/pipx/commands/outdated.py162CODE
Self-Referential Comments6 hits · 20 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_shared_libs.py40 # Create a fake venv structureCOMMENT
MEDIUMtests/test_shared_libs.py47 # Create a pyvenv.cfg pointing to a non-existent PythonCOMMENT
MEDIUMtests/test_shared_libs.py57 # Create a fake venv structureCOMMENT
MEDIUMtests/test_shared_libs.py70 # Create a pyvenv.cfg pointing to the existing PythonCOMMENT
MEDIUMsrc/pipx/interpreter.py135# The following code was copied from https://github.com/uranusjr/pipx-standaloneCOMMENT
MEDIUMsrc/pipx/main.py1829 "# This file is a cache directory tag created by pipx.\n"STRING
Cross-Language Confusion4 hits · 18 pts
SeverityFileLineSnippetContext
HIGHtests/test_pipx_metadata_file.py160 .replace('"cooldown_days": null, ', "")CODE
HIGHscripts/release.py33 repo.git.push(push_target, "HEAD:main")CODE
HIGHscripts/release.py35 repo.git.push(push_target, str(tag))CODE
HIGHsrc/pipx/constants.py105 autoload -U compinit && compinitSTRING
Excessive Try-Catch Wrapping8 hits · 9 pts
SeverityFileLineSnippetContext
LOWsrc/pipx/shared_libs.py74 except Exception:CODE
LOWsrc/pipx/shared_libs.py224 except Exception:CODE
LOWsrc/pipx/main.py77 except Exception:CODE
LOWsrc/pipx/main.py1543 except Exception as e:STRING
LOWsrc/pipx/main.py1905 except Exception:CODE
MEDIUMsrc/pipx/main.py70def prog_name() -> str:CODE
MEDIUMsrc/pipx/main.py1738def setup_log_file() -> Path:CODE
LOWsrc/pipx/commands/run.py546 except Exception as e:STRING
AI Structural Patterns3 hits · 3 pts
SeverityFileLineSnippetContext
LOWsrc/pipx/util.py177CODE
LOWsrc/pipx/commands/upgrade.py185CODE
LOWsrc/pipx/commands/install.py56CODE
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/pipx/util.py208 # Set PYTHONSAFEPATH to prevent adding CWD to sys.path in subprocess Python commandsCOMMENT