Repository Analysis

pallets/click

Python composable command line interface toolkit

14.6 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of pallets/click, a Python project with 17,639 GitHub stars. SynthScan v2.0 examined 37,845 lines of code across 145 source files, recording 538 pattern matches distributed across 15 syntactic categories. The overall adjusted score of 14.6 places this repository in the Low 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).

14.6
Adjusted Score
14.6
Raw Score
100%
Time Factor
2026-08-27
Last Push
17.6K
Stars
Python
Language
37.8K
Lines of Code
145
Files
538
Pattern Hits
2026-08-29
Scan Date
0.03
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 5MEDIUM 21LOW 512

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 538 distinct pattern matches across 15 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 Identifiers354 hits · 313 pts
SeverityFileLineSnippetContext
LOWtests/test_parser.py22def test_parser_default_prefixes():CODE
LOWtests/test_parser.py27def test_parser_collects_prefixes():CODE
LOWtests/test_shell_completion.py79def test_group_command_same_option():CODE
LOWtests/test_shell_completion.py153def test_choice_special_characters():CODE
LOWtests/test_shell_completion.py160def test_choice_conflicting_prefix():CODE
LOWtests/test_shell_completion.py227def test_flag_option_with_nargs_option():CODE
LOWtests/test_shell_completion.py336def test_completion_item_data():CODE
LOWtests/test_shell_completion.py357def test_full_source_powershell(runner):CODE
LOWtests/test_shell_completion.py394def test_source_uses_lf_line_endings(monkeypatch):CODE
LOWtests/test_shell_completion.py459def test_zsh_full_complete_with_colons(CODE
LOWtests/test_shell_completion.py497def test_choice_case_sensitive(value, expect):CODE
LOWtests/test_shell_completion.py507def _restore_available_shells(tmpdir):CODE
LOWtests/test_shell_completion.py516def test_add_completion_class():CODE
LOWtests/test_shell_completion.py536def test_add_completion_class_with_name():CODE
LOWtests/test_shell_completion.py562def test_add_completion_class_decorator():CODE
LOWtests/test_shell_completion.py599def test_fish_format_completion_escapes_help():CODE
LOWtests/test_shell_completion.py607def test_powershell_format_completion_escapes_help():CODE
LOWtests/test_basic.py73def test_param_squatting_help_option_name(runner):CODE
LOWtests/test_basic.py90def test_option_reusing_help_flag(runner):CODE
LOWtests/test_basic.py395def test_flag_value_dual_options(runner, default, args, expected):CODE
LOWtests/test_basic.py565def test_choice_argument_enum(runner):CODE
LOWtests/test_basic.py592def test_choice_argument_custom_type(runner):CODE
LOWtests/test_basic.py623def test_choice_argument_none(runner):CODE
LOWtests/test_basic.py651def test_choice_argument_optional_metavar(runner):CODE
LOWtests/test_basic.py678def test_datetime_argument_optional_metavar(runner):CODE
LOWtests/test_basic.py691def test_datetime_option_default(runner):CODE
LOWtests/test_basic.py718def test_datetime_option_custom(runner):CODE
LOWtests/test_basic.py846def test_help_invalid_default(runner):CODE
LOWtests/test_basic.py863def test_version_option_resolves_import_name_to_distribution(runner, monkeypatch):CODE
LOWtests/test_basic.py893def test_version_option_ambiguous_import_name_errors(runner, monkeypatch):CODE
LOWtests/test_basic.py922def test_version_option_unknown_package_errors(runner, monkeypatch):CODE
LOWtests/test_basic.py943def test_custom_version_option(runner, args):CODE
LOWtests/test_basic.py954def test_custom_version_option_receives_context(runner):CODE
LOWtests/test_termui.py230def test_progressbar_init_exceptions(runner):CODE
LOWtests/test_termui.py235def test_progressbar_iter_outside_with_exceptions(runner):CODE
LOWtests/test_termui.py242def test_progressbar_is_iterator(runner, monkeypatch):CODE
LOWtests/test_termui.py597def test_editor_env_passed_through():CODE
LOWtests/test_termui.py607def test_editor_failure_exception():CODE
LOWtests/test_termui.py614def test_editor_nonexistent_exception():CODE
LOWtests/test_termui.py44def test_progressbar_strip_regression(runner, monkeypatch):CODE
LOWtests/test_termui.py60def test_progressbar_length_hint(runner, monkeypatch):CODE
LOWtests/test_termui.py101def test_progressbar_hidden_manual(runner, monkeypatch):CODE
LOWtests/test_termui.py114def test_progressbar_lands_on_final_position(monkeypatch, update_min_steps, drive):CODE
LOWtests/test_termui.py144def test_progressbar_time_per_iteration(runner, avg, expected):CODE
LOWtests/test_termui.py167def test_progressbar_format_eta(runner, eta, expected):CODE
LOWtests/test_termui.py173def test_progressbar_format_pos(runner, pos, length):CODE
LOWtests/test_termui.py186def test_progressbar_format_bar(runner, length, finished, pos, avg, expected):CODE
LOWtests/test_termui.py203def test_progressbar_format_progress_line(CODE
LOWtests/test_termui.py217def test_progressbar_format_progress_line_with_show_func(runner, test_item):CODE
LOWtests/test_termui.py257def test_choices_list_in_prompt(runner, monkeypatch):CODE
LOWtests/test_termui.py285def test_file_prompt_default_format(runner, file_kwargs):CODE
LOWtests/test_termui.py313def test_progressbar_yields_all_items(runner):CODE
LOWtests/test_termui.py341def test_progressbar_item_show_func(runner, monkeypatch):CODE
LOWtests/test_termui.py357def test_progressbar_update_with_item_show_func(runner, monkeypatch):CODE
LOWtests/test_termui.py377def test_progress_bar_update_min_steps(runner):CODE
LOWtests/test_termui.py403def test_getchar_special_key_windows(runner, monkeypatch, special_key_char, key_char):CODE
LOWtests/test_termui.py416def test_getchar_windows_exceptions(runner, monkeypatch, key_char, exc):CODE
LOWtests/test_termui.py558def test_editor_path_normalization(editor_cmd, filenames, expected_args):CODE
LOWtests/test_termui.py585def test_editor_windows_path_normalization(editor_cmd, expected_cmd):CODE
LOWtests/test_termui.py688def _run_get_pager_file_with_real_pager(monkeypatch, capfd, writer, color=False):CODE
294 more matches not shown…
Unused Imports86 hits · 63 pts
SeverityFileLineSnippetContext
LOWtests/test_basic.py1CODE
LOWtests/test_stream_lifecycle.py40CODE
LOWtests/test_compat.py1CODE
LOWtests/typing/typing_aliased_group.py3CODE
LOWtests/typing/typing_progressbar.py1CODE
LOWsrc/click/_winconsole.py9CODE
LOWsrc/click/_textwrap.py1CODE
LOWsrc/click/globals.py1CODE
LOWsrc/click/__init__.py8CODE
LOWsrc/click/__init__.py10CODE
LOWsrc/click/__init__.py11CODE
LOWsrc/click/__init__.py12CODE
LOWsrc/click/__init__.py13CODE
LOWsrc/click/__init__.py14CODE
LOWsrc/click/__init__.py15CODE
LOWsrc/click/__init__.py16CODE
LOWsrc/click/__init__.py17CODE
LOWsrc/click/__init__.py18CODE
LOWsrc/click/__init__.py19CODE
LOWsrc/click/__init__.py20CODE
LOWsrc/click/__init__.py21CODE
LOWsrc/click/__init__.py22CODE
LOWsrc/click/__init__.py23CODE
LOWsrc/click/__init__.py24CODE
LOWsrc/click/__init__.py25CODE
LOWsrc/click/__init__.py26CODE
LOWsrc/click/__init__.py27CODE
LOWsrc/click/__init__.py28CODE
LOWsrc/click/__init__.py29CODE
LOWsrc/click/__init__.py30CODE
LOWsrc/click/__init__.py31CODE
LOWsrc/click/__init__.py32CODE
LOWsrc/click/__init__.py33CODE
LOWsrc/click/__init__.py34CODE
LOWsrc/click/__init__.py35CODE
LOWsrc/click/__init__.py36CODE
LOWsrc/click/__init__.py37CODE
LOWsrc/click/__init__.py38CODE
LOWsrc/click/__init__.py39CODE
LOWsrc/click/__init__.py40CODE
LOWsrc/click/__init__.py41CODE
LOWsrc/click/__init__.py42CODE
LOWsrc/click/__init__.py43CODE
LOWsrc/click/__init__.py44CODE
LOWsrc/click/__init__.py45CODE
LOWsrc/click/__init__.py46CODE
LOWsrc/click/__init__.py47CODE
LOWsrc/click/__init__.py48CODE
LOWsrc/click/__init__.py49CODE
LOWsrc/click/__init__.py50CODE
LOWsrc/click/__init__.py51CODE
LOWsrc/click/__init__.py52CODE
LOWsrc/click/__init__.py53CODE
LOWsrc/click/__init__.py54CODE
LOWsrc/click/__init__.py55CODE
LOWsrc/click/__init__.py56CODE
LOWsrc/click/__init__.py57CODE
LOWsrc/click/__init__.py58CODE
LOWsrc/click/__init__.py59CODE
LOWsrc/click/__init__.py60CODE
26 more matches not shown…
Decorative Section Separators12 hits · 54 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_stream_lifecycle.py57# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_stream_lifecycle.py59# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_stream_lifecycle.py108# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_stream_lifecycle.py110# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_stream_lifecycle.py184# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_stream_lifecycle.py186# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_stream_lifecycle.py292# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_stream_lifecycle.py294# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_stream_lifecycle.py369# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_stream_lifecycle.py371# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_stream_lifecycle.py483# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_stream_lifecycle.py490# ---------------------------------------------------------------------------COMMENT
Excessive Try-Catch Wrapping23 hits · 27 pts
SeverityFileLineSnippetContext
LOWtests/test_commands.py160 except Exception as e:CODE
MEDIUMtests/test_commands.py157def parse_args(self, ctx, args):CODE
LOWexamples/imagepipe/imagepipe.py97 except Exception as e:CODE
LOWexamples/imagepipe/imagepipe.py117 except Exception as e:CODE
LOWsrc/click/_winconsole.py209 except Exception:CODE
LOWsrc/click/core.py2779 except Exception:STRING
LOWsrc/click/utils.py45 except Exception:CODE
LOWsrc/click/_compat.py77 except Exception:CODE
LOWsrc/click/_compat.py124 except Exception:CODE
LOWsrc/click/_compat.py136 except Exception:CODE
LOWsrc/click/_compat.py139 except Exception:CODE
LOWsrc/click/_compat.py149 except Exception:CODE
LOWsrc/click/_compat.py157 except Exception:CODE
LOWsrc/click/_compat.py166 except Exception:CODE
LOWsrc/click/_compat.py170 except Exception:CODE
LOWsrc/click/_compat.py543 except Exception:CODE
LOWsrc/click/_compat.py561 except Exception:CODE
LOWsrc/click/_compat.py568 except Exception:CODE
MEDIUMsrc/click/_compat.py74def __del__(self) -> None:CODE
LOWsrc/click/_termui_impl.py602 except Exception as e:CODE
LOWsrc/click/testing.py571 except Exception:CODE
LOWsrc/click/testing.py581 except Exception:CODE
LOWsrc/click/testing.py705 except Exception as e:CODE
Deep Nesting20 hits · 20 pts
SeverityFileLineSnippetContext
LOWexamples/termui/termui.py145CODE
LOWsrc/click/_textwrap.py66CODE
LOWsrc/click/core.py857CODE
LOWsrc/click/core.py1102CODE
LOWsrc/click/core.py1484CODE
LOWsrc/click/core.py3235CODE
LOWsrc/click/core.py3383CODE
LOWsrc/click/types.py296CODE
LOWsrc/click/parser.py51CODE
LOWsrc/click/parser.py169CODE
LOWsrc/click/parser.py327CODE
LOWsrc/click/termui.py168CODE
LOWsrc/click/termui.py289CODE
LOWsrc/click/shell_completion.py696CODE
LOWsrc/click/_termui_impl.py520CODE
LOWsrc/click/_termui_impl.py799CODE
LOWsrc/click/testing.py399CODE
LOWsrc/click/testing.py596CODE
LOWsrc/click/decorators.py421CODE
LOWsrc/click/decorators.py501CODE
Cross-File Repetition4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHREADME.md0simple program that greets name for a total of count times.STRING
HIGHtests/typing/typing_help_option.py0simple program that greets name for a total of count times.STRING
HIGHtests/typing/typing_simple_example.py0simple program that greets name for a total of count times.STRING
HIGHdocs/index.md0simple program that greets name for a total of count times.STRING
Self-Referential Comments5 hits · 13 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_testing.py691 # Create a writer backed by the real fd 2, simulating a handlerCOMMENT
MEDIUMtests/test_utils/test_open_file.py107 # Create a test file to get the expected permissions for new filesCOMMENT
MEDIUMexamples/repo/repo.py51 # Create a repo object and remember it as the context object. FromCOMMENT
MEDIUMsrc/click/_winconsole.py1# This module is based on the excellent work by Adam Bartoš whoCOMMENT
MEDIUMsrc/click/core.py2550 # Define the conversion function based on nargs and type.STRING
AI Structural Patterns13 hits · 13 pts
SeverityFileLineSnippetContext
LOWsrc/click/core.py340CODE
LOWsrc/click/core.py1035CODE
LOWsrc/click/core.py2299CODE
LOWsrc/click/core.py2951CODE
LOWsrc/click/types.py1093CODE
LOWsrc/click/termui.py139CODE
LOWsrc/click/termui.py154CODE
LOWsrc/click/termui.py168CODE
LOWsrc/click/termui.py403CODE
LOWsrc/click/termui.py423CODE
LOWsrc/click/termui.py443CODE
LOWsrc/click/termui.py641CODE
LOWsrc/click/_termui_impl.py44CODE
Fake / Example Data6 hits · 9 pts
SeverityFileLineSnippetContext
LOWtests/test_formatting.py430 text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit"CODE
LOWtests/test_formatting.py430 text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit"CODE
LOWtests/test_formatting.py431 formatter = click.HelpFormatter(width=len(" Lorem ipsum dolor sit amet,"))CODE
LOWtests/test_formatting.py431 formatter = click.HelpFormatter(width=len(" Lorem ipsum dolor sit amet,"))CODE
LOWtests/test_formatting.py435 expected = " Lorem ipsum dolor sit amet,\n consectetur adipiscing elit\n"CODE
LOWtests/test_formatting.py435 expected = " Lorem ipsum dolor sit amet,\n consectetur adipiscing elit\n"CODE
Over-Commented Block9 hits · 9 pts
SeverityFileLineSnippetContext
LOWsrc/click/core.py1681COMMENT
LOWsrc/click/core.py2641COMMENT
LOWsrc/click/core.py3001 # Phase 2: flag-kind inference.COMMENT
LOWsrc/click/core.py3481 # If we have no boolean default, we force the user to explicitly provideCOMMENT
LOWsrc/click/types.py1381COMMENT
LOWsrc/click/parser.py341 returnCOMMENT
LOWsrc/click/shell_completion.py461 except IndexError:COMMENT
LOWsrc/click/_termui_impl.py881 import msvcrtCOMMENT
LOWsrc/click/_termui_impl.py901 # resulting Unicode string reads as "a with grave" + "capital H".COMMENT
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHsrc/click/_termui_impl.py819 return subprocess.Popen(args, stderr=null).wait()CODE
Modern Structural Boilerplate2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/test_context.py462 def set_level(self, ctx: Context, param: Parameter, value: str) -> None:CODE
LOWsrc/click/core.py931 def set_parameter_source(self, name: str, source: ParameterSource) -> None:CODE
Dead Code1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_utils/test_echo_via_pager.py36CODE
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtests/test_options.py1615 # Print the value received by the callback as-is, so we can check for it.COMMENT
AI Slop Vocabulary1 hit · 1 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_types.py272 """Ensures that the error handling in ``click.File`` is robust.STRING