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,583 GitHub stars. SynthScan v2.0 examined 36,600 lines of code across 142 source files, recording 518 pattern matches distributed across 16 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-07-10
Last Push
17.6K
Stars
Python
Language
36.6K
Lines of Code
142
Files
518
Pattern Hits
2026-07-14
Scan Date
0.04
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 492

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 518 distinct pattern matches across 16 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 Identifiers332 hits · 295 pts
SeverityFileLineSnippetContext
LOWtests/test_parser.py22def test_parser_default_prefixes():CODE
LOWtests/test_parser.py27def test_parser_collects_prefixes():CODE
LOWtests/test_shell_completion.py78def test_group_command_same_option():CODE
LOWtests/test_shell_completion.py152def test_choice_special_characters():CODE
LOWtests/test_shell_completion.py159def test_choice_conflicting_prefix():CODE
LOWtests/test_shell_completion.py226def test_flag_option_with_nargs_option():CODE
LOWtests/test_shell_completion.py335def test_completion_item_data():CODE
LOWtests/test_shell_completion.py376def test_source_uses_lf_line_endings(monkeypatch):CODE
LOWtests/test_shell_completion.py441def test_zsh_full_complete_with_colons(CODE
LOWtests/test_shell_completion.py479def test_choice_case_sensitive(value, expect):CODE
LOWtests/test_shell_completion.py489def _restore_available_shells(tmpdir):CODE
LOWtests/test_shell_completion.py498def test_add_completion_class():CODE
LOWtests/test_shell_completion.py518def test_add_completion_class_with_name():CODE
LOWtests/test_shell_completion.py544def test_add_completion_class_decorator():CODE
LOWtests/test_shell_completion.py582def test_fish_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.py567def test_choice_argument_enum(runner):CODE
LOWtests/test_basic.py594def test_choice_argument_custom_type(runner):CODE
LOWtests/test_basic.py625def test_choice_argument_none(runner):CODE
LOWtests/test_basic.py653def test_choice_argument_optional_metavar(runner):CODE
LOWtests/test_basic.py680def test_datetime_argument_optional_metavar(runner):CODE
LOWtests/test_basic.py693def test_datetime_option_default(runner):CODE
LOWtests/test_basic.py720def test_datetime_option_custom(runner):CODE
LOWtests/test_basic.py848def test_help_invalid_default(runner):CODE
LOWtests/test_basic.py865def test_version_option_resolves_import_name_to_distribution(runner, monkeypatch):CODE
LOWtests/test_basic.py895def test_version_option_ambiguous_import_name_errors(runner, monkeypatch):CODE
LOWtests/test_basic.py924def test_version_option_unknown_package_errors(runner, monkeypatch):CODE
LOWtests/test_basic.py945def test_custom_version_option(runner, args):CODE
LOWtests/test_basic.py956def test_custom_version_option_receives_context(runner):CODE
LOWtests/test_termui.py196def test_progressbar_init_exceptions(runner):CODE
LOWtests/test_termui.py201def test_progressbar_iter_outside_with_exceptions(runner):CODE
LOWtests/test_termui.py208def test_progressbar_is_iterator(runner, monkeypatch):CODE
LOWtests/test_termui.py550def test_editor_env_passed_through():CODE
LOWtests/test_termui.py560def test_editor_failure_exception():CODE
LOWtests/test_termui.py567def test_editor_nonexistent_exception():CODE
LOWtests/test_termui.py41def test_progressbar_strip_regression(runner, monkeypatch):CODE
LOWtests/test_termui.py57def test_progressbar_length_hint(runner, monkeypatch):CODE
LOWtests/test_termui.py98def test_progressbar_hidden_manual(runner, monkeypatch):CODE
LOWtests/test_termui.py110def test_progressbar_time_per_iteration(runner, avg, expected):CODE
LOWtests/test_termui.py133def test_progressbar_format_eta(runner, eta, expected):CODE
LOWtests/test_termui.py139def test_progressbar_format_pos(runner, pos, length):CODE
LOWtests/test_termui.py152def test_progressbar_format_bar(runner, length, finished, pos, avg, expected):CODE
LOWtests/test_termui.py169def test_progressbar_format_progress_line(CODE
LOWtests/test_termui.py183def test_progressbar_format_progress_line_with_show_func(runner, test_item):CODE
LOWtests/test_termui.py223def test_choices_list_in_prompt(runner, monkeypatch):CODE
LOWtests/test_termui.py251def test_file_prompt_default_format(runner, file_kwargs):CODE
LOWtests/test_termui.py279def test_progressbar_yields_all_items(runner):CODE
LOWtests/test_termui.py307def test_progressbar_item_show_func(runner, monkeypatch):CODE
LOWtests/test_termui.py323def test_progressbar_update_with_item_show_func(runner, monkeypatch):CODE
LOWtests/test_termui.py343def test_progress_bar_update_min_steps(runner):CODE
LOWtests/test_termui.py369def test_getchar_special_key_windows(runner, monkeypatch, special_key_char, key_char):CODE
LOWtests/test_termui.py382def test_getchar_windows_exceptions(runner, monkeypatch, key_char, exc):CODE
LOWtests/test_termui.py511def test_editor_path_normalization(editor_cmd, filenames, expected_args):CODE
LOWtests/test_termui.py538def test_editor_windows_path_normalization(editor_cmd, expected_cmd):CODE
LOWtests/test_termui.py641def _run_get_pager_file_with_real_pager(monkeypatch, capfd, writer, color=False):CODE
LOWtests/test_termui.py657def _write_pager_from_multiple_sites(pager):CODE
LOWtests/test_termui.py694def test_get_pager_file_with_real_pager_binary_stream(CODE
LOWtests/test_termui.py716def test_echo_via_pager_real_pager_handles_ansi(monkeypatch, capfd, color, expected):CODE
272 more matches not shown…
Unused Imports88 hits · 64 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
28 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.py2768 except Exception:STRING
LOWsrc/click/utils.py42 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.py546 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 Nesting22 hits · 22 pts
SeverityFileLineSnippetContext
LOWexamples/termui/termui.py145CODE
LOWsrc/click/_textwrap.py66CODE
LOWsrc/click/core.py857CODE
LOWsrc/click/core.py1103CODE
LOWsrc/click/core.py1478CODE
LOWsrc/click/core.py2939CODE
LOWsrc/click/core.py3162CODE
LOWsrc/click/core.py3307CODE
LOWsrc/click/core.py3507CODE
LOWsrc/click/types.py249CODE
LOWsrc/click/parser.py51CODE
LOWsrc/click/parser.py169CODE
LOWsrc/click/parser.py327CODE
LOWsrc/click/termui.py132CODE
LOWsrc/click/termui.py245CODE
LOWsrc/click/shell_completion.py599CODE
LOWsrc/click/_termui_impl.py432CODE
LOWsrc/click/_termui_impl.py772CODE
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.py611 # Create a writer backed by the real fd 2, simulating a handlerCOMMENT
MEDIUMtests/test_utils/test_open_file.py114 # 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.py2539 # Define the conversion function based on nargs and type.STRING
AI Structural Patterns11 hits · 11 pts
SeverityFileLineSnippetContext
LOWsrc/click/core.py340CODE
LOWsrc/click/core.py1036CODE
LOWsrc/click/core.py2293CODE
LOWsrc/click/core.py2939CODE
LOWsrc/click/types.py1046CODE
LOWsrc/click/termui.py132CODE
LOWsrc/click/termui.py359CODE
LOWsrc/click/termui.py379CODE
LOWsrc/click/termui.py399CODE
LOWsrc/click/termui.py597CODE
LOWsrc/click/_termui_impl.py58CODE
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 Block8 hits · 8 pts
SeverityFileLineSnippetContext
LOWsrc/click/core.py1681 command_class: type[Command] | None = NoneCOMMENT
LOWsrc/click/core.py2621 # to None.COMMENT
LOWsrc/click/core.py3401 default = self.get_default(ctx)COMMENT
LOWsrc/click/types.py1341#: This is usually useful when working with file paths as they canCOMMENT
LOWsrc/click/parser.py341 returnCOMMENT
LOWsrc/click/shell_completion.py401COMMENT
LOWsrc/click/_termui_impl.py861 # The function `getch` will return a bytes object corresponding toCOMMENT
LOWsrc/click/_termui_impl.py881 # character is typed.COMMENT
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHsrc/click/_termui_impl.py792 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.py932 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.py271 """Ensures that the error handling in ``click.File`` is robust.STRING
Verbosity Indicators1 hit · 0 pts
SeverityFileLineSnippetContext
LOWsrc/click/core.py3008 # value, we need to check if `flag_value` or `default` was set. Either one isSTRING