Python composable command line interface toolkit
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).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_parser.py | 22 | def test_parser_default_prefixes(): | CODE |
| LOW | tests/test_parser.py | 27 | def test_parser_collects_prefixes(): | CODE |
| LOW | tests/test_shell_completion.py | 78 | def test_group_command_same_option(): | CODE |
| LOW | tests/test_shell_completion.py | 152 | def test_choice_special_characters(): | CODE |
| LOW | tests/test_shell_completion.py | 159 | def test_choice_conflicting_prefix(): | CODE |
| LOW | tests/test_shell_completion.py | 226 | def test_flag_option_with_nargs_option(): | CODE |
| LOW | tests/test_shell_completion.py | 335 | def test_completion_item_data(): | CODE |
| LOW | tests/test_shell_completion.py | 376 | def test_source_uses_lf_line_endings(monkeypatch): | CODE |
| LOW | tests/test_shell_completion.py | 441 | def test_zsh_full_complete_with_colons( | CODE |
| LOW⚡ | tests/test_shell_completion.py | 479 | def test_choice_case_sensitive(value, expect): | CODE |
| LOW⚡ | tests/test_shell_completion.py | 489 | def _restore_available_shells(tmpdir): | CODE |
| LOW⚡ | tests/test_shell_completion.py | 498 | def test_add_completion_class(): | CODE |
| LOW | tests/test_shell_completion.py | 518 | def test_add_completion_class_with_name(): | CODE |
| LOW | tests/test_shell_completion.py | 544 | def test_add_completion_class_decorator(): | CODE |
| LOW | tests/test_shell_completion.py | 582 | def test_fish_format_completion_escapes_help(): | CODE |
| LOW | tests/test_basic.py | 73 | def test_param_squatting_help_option_name(runner): | CODE |
| LOW | tests/test_basic.py | 90 | def test_option_reusing_help_flag(runner): | CODE |
| LOW | tests/test_basic.py | 395 | def test_flag_value_dual_options(runner, default, args, expected): | CODE |
| LOW | tests/test_basic.py | 567 | def test_choice_argument_enum(runner): | CODE |
| LOW | tests/test_basic.py | 594 | def test_choice_argument_custom_type(runner): | CODE |
| LOW | tests/test_basic.py | 625 | def test_choice_argument_none(runner): | CODE |
| LOW | tests/test_basic.py | 653 | def test_choice_argument_optional_metavar(runner): | CODE |
| LOW | tests/test_basic.py | 680 | def test_datetime_argument_optional_metavar(runner): | CODE |
| LOW | tests/test_basic.py | 693 | def test_datetime_option_default(runner): | CODE |
| LOW | tests/test_basic.py | 720 | def test_datetime_option_custom(runner): | CODE |
| LOW | tests/test_basic.py | 848 | def test_help_invalid_default(runner): | CODE |
| LOW | tests/test_basic.py | 865 | def test_version_option_resolves_import_name_to_distribution(runner, monkeypatch): | CODE |
| LOW | tests/test_basic.py | 895 | def test_version_option_ambiguous_import_name_errors(runner, monkeypatch): | CODE |
| LOW | tests/test_basic.py | 924 | def test_version_option_unknown_package_errors(runner, monkeypatch): | CODE |
| LOW | tests/test_basic.py | 945 | def test_custom_version_option(runner, args): | CODE |
| LOW | tests/test_basic.py | 956 | def test_custom_version_option_receives_context(runner): | CODE |
| LOW⚡ | tests/test_termui.py | 196 | def test_progressbar_init_exceptions(runner): | CODE |
| LOW⚡ | tests/test_termui.py | 201 | def test_progressbar_iter_outside_with_exceptions(runner): | CODE |
| LOW⚡ | tests/test_termui.py | 208 | def test_progressbar_is_iterator(runner, monkeypatch): | CODE |
| LOW⚡ | tests/test_termui.py | 550 | def test_editor_env_passed_through(): | CODE |
| LOW⚡ | tests/test_termui.py | 560 | def test_editor_failure_exception(): | CODE |
| LOW⚡ | tests/test_termui.py | 567 | def test_editor_nonexistent_exception(): | CODE |
| LOW | tests/test_termui.py | 41 | def test_progressbar_strip_regression(runner, monkeypatch): | CODE |
| LOW | tests/test_termui.py | 57 | def test_progressbar_length_hint(runner, monkeypatch): | CODE |
| LOW | tests/test_termui.py | 98 | def test_progressbar_hidden_manual(runner, monkeypatch): | CODE |
| LOW | tests/test_termui.py | 110 | def test_progressbar_time_per_iteration(runner, avg, expected): | CODE |
| LOW | tests/test_termui.py | 133 | def test_progressbar_format_eta(runner, eta, expected): | CODE |
| LOW | tests/test_termui.py | 139 | def test_progressbar_format_pos(runner, pos, length): | CODE |
| LOW | tests/test_termui.py | 152 | def test_progressbar_format_bar(runner, length, finished, pos, avg, expected): | CODE |
| LOW | tests/test_termui.py | 169 | def test_progressbar_format_progress_line( | CODE |
| LOW | tests/test_termui.py | 183 | def test_progressbar_format_progress_line_with_show_func(runner, test_item): | CODE |
| LOW | tests/test_termui.py | 223 | def test_choices_list_in_prompt(runner, monkeypatch): | CODE |
| LOW | tests/test_termui.py | 251 | def test_file_prompt_default_format(runner, file_kwargs): | CODE |
| LOW | tests/test_termui.py | 279 | def test_progressbar_yields_all_items(runner): | CODE |
| LOW | tests/test_termui.py | 307 | def test_progressbar_item_show_func(runner, monkeypatch): | CODE |
| LOW | tests/test_termui.py | 323 | def test_progressbar_update_with_item_show_func(runner, monkeypatch): | CODE |
| LOW | tests/test_termui.py | 343 | def test_progress_bar_update_min_steps(runner): | CODE |
| LOW | tests/test_termui.py | 369 | def test_getchar_special_key_windows(runner, monkeypatch, special_key_char, key_char): | CODE |
| LOW | tests/test_termui.py | 382 | def test_getchar_windows_exceptions(runner, monkeypatch, key_char, exc): | CODE |
| LOW | tests/test_termui.py | 511 | def test_editor_path_normalization(editor_cmd, filenames, expected_args): | CODE |
| LOW | tests/test_termui.py | 538 | def test_editor_windows_path_normalization(editor_cmd, expected_cmd): | CODE |
| LOW | tests/test_termui.py | 641 | def _run_get_pager_file_with_real_pager(monkeypatch, capfd, writer, color=False): | CODE |
| LOW | tests/test_termui.py | 657 | def _write_pager_from_multiple_sites(pager): | CODE |
| LOW | tests/test_termui.py | 694 | def test_get_pager_file_with_real_pager_binary_stream( | CODE |
| LOW | tests/test_termui.py | 716 | def test_echo_via_pager_real_pager_handles_ansi(monkeypatch, capfd, color, expected): | CODE |
| 272 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_basic.py | 1 | CODE | |
| LOW | tests/test_stream_lifecycle.py | 40 | CODE | |
| LOW | tests/test_compat.py | 1 | CODE | |
| LOW | tests/typing/typing_aliased_group.py | 3 | CODE | |
| LOW | tests/typing/typing_progressbar.py | 1 | CODE | |
| LOW | src/click/_winconsole.py | 9 | CODE | |
| LOW | src/click/_textwrap.py | 1 | CODE | |
| LOW | src/click/globals.py | 1 | CODE | |
| LOW | src/click/__init__.py | 8 | CODE | |
| LOW | src/click/__init__.py | 10 | CODE | |
| LOW | src/click/__init__.py | 11 | CODE | |
| LOW | src/click/__init__.py | 12 | CODE | |
| LOW | src/click/__init__.py | 13 | CODE | |
| LOW | src/click/__init__.py | 14 | CODE | |
| LOW | src/click/__init__.py | 15 | CODE | |
| LOW | src/click/__init__.py | 16 | CODE | |
| LOW | src/click/__init__.py | 17 | CODE | |
| LOW | src/click/__init__.py | 18 | CODE | |
| LOW | src/click/__init__.py | 19 | CODE | |
| LOW | src/click/__init__.py | 20 | CODE | |
| LOW | src/click/__init__.py | 21 | CODE | |
| LOW | src/click/__init__.py | 22 | CODE | |
| LOW | src/click/__init__.py | 23 | CODE | |
| LOW | src/click/__init__.py | 24 | CODE | |
| LOW | src/click/__init__.py | 25 | CODE | |
| LOW | src/click/__init__.py | 26 | CODE | |
| LOW | src/click/__init__.py | 27 | CODE | |
| LOW | src/click/__init__.py | 28 | CODE | |
| LOW | src/click/__init__.py | 29 | CODE | |
| LOW | src/click/__init__.py | 30 | CODE | |
| LOW | src/click/__init__.py | 31 | CODE | |
| LOW | src/click/__init__.py | 32 | CODE | |
| LOW | src/click/__init__.py | 33 | CODE | |
| LOW | src/click/__init__.py | 34 | CODE | |
| LOW | src/click/__init__.py | 35 | CODE | |
| LOW | src/click/__init__.py | 36 | CODE | |
| LOW | src/click/__init__.py | 37 | CODE | |
| LOW | src/click/__init__.py | 38 | CODE | |
| LOW | src/click/__init__.py | 39 | CODE | |
| LOW | src/click/__init__.py | 40 | CODE | |
| LOW | src/click/__init__.py | 41 | CODE | |
| LOW | src/click/__init__.py | 42 | CODE | |
| LOW | src/click/__init__.py | 43 | CODE | |
| LOW | src/click/__init__.py | 44 | CODE | |
| LOW | src/click/__init__.py | 45 | CODE | |
| LOW | src/click/__init__.py | 46 | CODE | |
| LOW | src/click/__init__.py | 47 | CODE | |
| LOW | src/click/__init__.py | 48 | CODE | |
| LOW | src/click/__init__.py | 49 | CODE | |
| LOW | src/click/__init__.py | 50 | CODE | |
| LOW | src/click/__init__.py | 51 | CODE | |
| LOW | src/click/__init__.py | 52 | CODE | |
| LOW | src/click/__init__.py | 53 | CODE | |
| LOW | src/click/__init__.py | 54 | CODE | |
| LOW | src/click/__init__.py | 55 | CODE | |
| LOW | src/click/__init__.py | 56 | CODE | |
| LOW | src/click/__init__.py | 57 | CODE | |
| LOW | src/click/__init__.py | 58 | CODE | |
| LOW | src/click/__init__.py | 59 | CODE | |
| LOW | src/click/__init__.py | 60 | CODE | |
| 28 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/test_stream_lifecycle.py | 57 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_stream_lifecycle.py | 59 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_stream_lifecycle.py | 108 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_stream_lifecycle.py | 110 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_stream_lifecycle.py | 184 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_stream_lifecycle.py | 186 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_stream_lifecycle.py | 292 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_stream_lifecycle.py | 294 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_stream_lifecycle.py | 369 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_stream_lifecycle.py | 371 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_stream_lifecycle.py | 483 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_stream_lifecycle.py | 490 | # --------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_commands.py | 160 | except Exception as e: | CODE |
| MEDIUM | tests/test_commands.py | 157 | def parse_args(self, ctx, args): | CODE |
| LOW | examples/imagepipe/imagepipe.py | 97 | except Exception as e: | CODE |
| LOW | examples/imagepipe/imagepipe.py | 117 | except Exception as e: | CODE |
| LOW | src/click/_winconsole.py | 209 | except Exception: | CODE |
| LOW | src/click/core.py | 2768 | except Exception: | STRING |
| LOW | src/click/utils.py | 42 | except Exception: | CODE |
| LOW | src/click/_compat.py | 77 | except Exception: | CODE |
| LOW | src/click/_compat.py | 124 | except Exception: | CODE |
| LOW⚡ | src/click/_compat.py | 136 | except Exception: | CODE |
| LOW⚡ | src/click/_compat.py | 139 | except Exception: | CODE |
| LOW⚡ | src/click/_compat.py | 149 | except Exception: | CODE |
| LOW⚡ | src/click/_compat.py | 157 | except Exception: | CODE |
| LOW⚡ | src/click/_compat.py | 166 | except Exception: | CODE |
| LOW⚡ | src/click/_compat.py | 170 | except Exception: | CODE |
| LOW | src/click/_compat.py | 543 | except Exception: | CODE |
| LOW | src/click/_compat.py | 561 | except Exception: | CODE |
| LOW | src/click/_compat.py | 568 | except Exception: | CODE |
| MEDIUM | src/click/_compat.py | 74 | def __del__(self) -> None: | CODE |
| LOW | src/click/_termui_impl.py | 546 | except Exception as e: | CODE |
| LOW | src/click/testing.py | 571 | except Exception: | CODE |
| LOW | src/click/testing.py | 581 | except Exception: | CODE |
| LOW | src/click/testing.py | 705 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/termui/termui.py | 145 | CODE | |
| LOW | src/click/_textwrap.py | 66 | CODE | |
| LOW | src/click/core.py | 857 | CODE | |
| LOW | src/click/core.py | 1103 | CODE | |
| LOW | src/click/core.py | 1478 | CODE | |
| LOW | src/click/core.py | 2939 | CODE | |
| LOW | src/click/core.py | 3162 | CODE | |
| LOW | src/click/core.py | 3307 | CODE | |
| LOW | src/click/core.py | 3507 | CODE | |
| LOW | src/click/types.py | 249 | CODE | |
| LOW | src/click/parser.py | 51 | CODE | |
| LOW | src/click/parser.py | 169 | CODE | |
| LOW | src/click/parser.py | 327 | CODE | |
| LOW | src/click/termui.py | 132 | CODE | |
| LOW | src/click/termui.py | 245 | CODE | |
| LOW | src/click/shell_completion.py | 599 | CODE | |
| LOW | src/click/_termui_impl.py | 432 | CODE | |
| LOW | src/click/_termui_impl.py | 772 | CODE | |
| LOW | src/click/testing.py | 399 | CODE | |
| LOW | src/click/testing.py | 596 | CODE | |
| LOW | src/click/decorators.py | 421 | CODE | |
| LOW | src/click/decorators.py | 501 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | README.md | 0 | simple program that greets name for a total of count times. | STRING |
| HIGH | tests/typing/typing_help_option.py | 0 | simple program that greets name for a total of count times. | STRING |
| HIGH | tests/typing/typing_simple_example.py | 0 | simple program that greets name for a total of count times. | STRING |
| HIGH | docs/index.md | 0 | simple program that greets name for a total of count times. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_testing.py | 611 | # Create a writer backed by the real fd 2, simulating a handler | COMMENT |
| MEDIUM | tests/test_utils/test_open_file.py | 114 | # Create a test file to get the expected permissions for new files | COMMENT |
| MEDIUM | examples/repo/repo.py | 51 | # Create a repo object and remember it as the context object. From | COMMENT |
| MEDIUM | src/click/_winconsole.py | 1 | # This module is based on the excellent work by Adam Bartoš who | COMMENT |
| MEDIUM | src/click/core.py | 2539 | # Define the conversion function based on nargs and type. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/click/core.py | 340 | CODE | |
| LOW | src/click/core.py | 1036 | CODE | |
| LOW | src/click/core.py | 2293 | CODE | |
| LOW | src/click/core.py | 2939 | CODE | |
| LOW | src/click/types.py | 1046 | CODE | |
| LOW | src/click/termui.py | 132 | CODE | |
| LOW | src/click/termui.py | 359 | CODE | |
| LOW | src/click/termui.py | 379 | CODE | |
| LOW | src/click/termui.py | 399 | CODE | |
| LOW | src/click/termui.py | 597 | CODE | |
| LOW | src/click/_termui_impl.py | 58 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/test_formatting.py | 430 | text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit" | CODE |
| LOW⚡ | tests/test_formatting.py | 430 | text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit" | CODE |
| LOW⚡ | tests/test_formatting.py | 431 | formatter = click.HelpFormatter(width=len(" Lorem ipsum dolor sit amet,")) | CODE |
| LOW⚡ | tests/test_formatting.py | 431 | formatter = click.HelpFormatter(width=len(" Lorem ipsum dolor sit amet,")) | CODE |
| LOW⚡ | tests/test_formatting.py | 435 | expected = " Lorem ipsum dolor sit amet,\n consectetur adipiscing elit\n" | CODE |
| LOW⚡ | tests/test_formatting.py | 435 | expected = " Lorem ipsum dolor sit amet,\n consectetur adipiscing elit\n" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/click/core.py | 1681 | command_class: type[Command] | None = None | COMMENT |
| LOW | src/click/core.py | 2621 | # to None. | COMMENT |
| LOW | src/click/core.py | 3401 | default = self.get_default(ctx) | COMMENT |
| LOW | src/click/types.py | 1341 | #: This is usually useful when working with file paths as they can | COMMENT |
| LOW | src/click/parser.py | 341 | return | COMMENT |
| LOW | src/click/shell_completion.py | 401 | COMMENT | |
| LOW | src/click/_termui_impl.py | 861 | # The function `getch` will return a bytes object corresponding to | COMMENT |
| LOW | src/click/_termui_impl.py | 881 | # character is typed. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/click/_termui_impl.py | 792 | return subprocess.Popen(args, stderr=null).wait() | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_context.py | 462 | def set_level(self, ctx: Context, param: Parameter, value: str) -> None: | CODE |
| LOW | src/click/core.py | 932 | def set_parameter_source(self, name: str, source: ParameterSource) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_utils/test_echo_via_pager.py | 36 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_options.py | 1615 | # Print the value received by the callback as-is, so we can check for it. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_types.py | 271 | """Ensures that the error handling in ``click.File`` is robust. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/click/core.py | 3008 | # value, we need to check if `flag_value` or `default` was set. Either one is | STRING |