Repository Analysis

pallets/click

Python composable command line interface toolkit

14.5 Low AI signal View on GitHub
14.5
Adjusted Score
14.5
Raw Score
100%
Time Factor
2026-05-30
Last Push
17,507
Stars
Python
Language
33,775
Lines of Code
128
Files
469
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 5MEDIUM 19LOW 445

Pattern Findings

469 matches across 12 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers304 hits · 270 pts
SeverityFileLineSnippet
LOWtests/test_parser.py22def test_parser_default_prefixes():
LOWtests/test_parser.py27def test_parser_collects_prefixes():
LOWtests/test_shell_completion.py78def test_group_command_same_option():
LOWtests/test_shell_completion.py152def test_choice_special_characters():
LOWtests/test_shell_completion.py159def test_choice_conflicting_prefix():
LOWtests/test_shell_completion.py226def test_flag_option_with_nargs_option():
LOWtests/test_shell_completion.py335def test_completion_item_data():
LOWtests/test_shell_completion.py376def test_source_uses_lf_line_endings(monkeypatch):
LOWtests/test_shell_completion.py441def test_zsh_full_complete_with_colons(
LOWtests/test_shell_completion.py479def test_choice_case_sensitive(value, expect):
LOWtests/test_shell_completion.py489def _restore_available_shells(tmpdir):
LOWtests/test_shell_completion.py498def test_add_completion_class():
LOWtests/test_shell_completion.py518def test_add_completion_class_with_name():
LOWtests/test_shell_completion.py544def test_add_completion_class_decorator():
LOWtests/test_shell_completion.py582def test_fish_format_completion_escapes_help():
LOWtests/test_basic.py314def test_flag_value_dual_options(runner, default, args, expected):
LOWtests/test_basic.py486def test_choice_argument_enum(runner):
LOWtests/test_basic.py513def test_choice_argument_custom_type(runner):
LOWtests/test_basic.py544def test_choice_argument_none(runner):
LOWtests/test_basic.py572def test_datetime_option_default(runner):
LOWtests/test_basic.py599def test_datetime_option_custom(runner):
LOWtests/test_basic.py727def test_help_invalid_default(runner):
LOWtests/test_utils.py249def test_full_prompt_passed_to_readline(monkeypatch, call, expected_prompt):
LOWtests/test_utils.py299def _test_simulate_keyboard_interrupt(file=None):
LOWtests/test_utils.py497def test_echo_writing_to_standard_error(capfd, monkeypatch):
LOWtests/test_utils.py608def test_open_file_pathlib_dash(runner):
LOWtests/test_utils.py624def test_open_file_ignore_errors_stdin(runner):
LOWtests/test_utils.py635def test_open_file_respects_ignore(runner):
LOWtests/test_utils.py653def test_open_file_ignore_no_encoding(runner):
LOWtests/test_utils.py664def test_open_file_atomic_permissions_existing_file(runner, permissions):
LOWtests/test_utils.py681def test_open_file_atomic_permissions_new_file(runner):
LOWtests/test_utils.py781def test_make_default_short_help(value, max_length, alter, expect):
LOWtests/test_termui.py195def test_progressbar_init_exceptions(runner):
LOWtests/test_termui.py200def test_progressbar_iter_outside_with_exceptions(runner):
LOWtests/test_termui.py207def test_progressbar_is_iterator(runner, monkeypatch):
LOWtests/test_termui.py549def test_editor_env_passed_through():
LOWtests/test_termui.py559def test_editor_failure_exception():
LOWtests/test_termui.py566def test_editor_nonexistent_exception():
LOWtests/test_termui.py40def test_progressbar_strip_regression(runner, monkeypatch):
LOWtests/test_termui.py56def test_progressbar_length_hint(runner, monkeypatch):
LOWtests/test_termui.py97def test_progressbar_hidden_manual(runner, monkeypatch):
LOWtests/test_termui.py109def test_progressbar_time_per_iteration(runner, avg, expected):
LOWtests/test_termui.py132def test_progressbar_format_eta(runner, eta, expected):
LOWtests/test_termui.py138def test_progressbar_format_pos(runner, pos, length):
LOWtests/test_termui.py151def test_progressbar_format_bar(runner, length, finished, pos, avg, expected):
LOWtests/test_termui.py168def test_progressbar_format_progress_line(
LOWtests/test_termui.py182def test_progressbar_format_progress_line_with_show_func(runner, test_item):
LOWtests/test_termui.py222def test_choices_list_in_prompt(runner, monkeypatch):
LOWtests/test_termui.py250def test_file_prompt_default_format(runner, file_kwargs):
LOWtests/test_termui.py278def test_progressbar_yields_all_items(runner):
LOWtests/test_termui.py306def test_progressbar_item_show_func(runner, monkeypatch):
LOWtests/test_termui.py322def test_progressbar_update_with_item_show_func(runner, monkeypatch):
LOWtests/test_termui.py342def test_progress_bar_update_min_steps(runner):
LOWtests/test_termui.py368def test_getchar_special_key_windows(runner, monkeypatch, special_key_char, key_char):
LOWtests/test_termui.py381def test_getchar_windows_exceptions(runner, monkeypatch, key_char, exc):
LOWtests/test_termui.py510def test_editor_path_normalization(editor_cmd, filenames, expected_args):
LOWtests/test_termui.py537def test_editor_windows_path_normalization(editor_cmd, expected_cmd):
LOWtests/test_termui.py640def _run_get_pager_file_with_real_pager(monkeypatch, capfd, writer, color=False):
LOWtests/test_termui.py656def _write_pager_from_multiple_sites(pager):
LOWtests/test_termui.py693def test_get_pager_file_with_real_pager_binary_stream(
244 more matches not shown…
Unused Imports87 hits · 64 pts
SeverityFileLineSnippet
LOWtests/test_basic.py1
LOWtests/test_stream_lifecycle.py40
LOWtests/test_compat.py1
LOWtests/typing/typing_aliased_group.py3
LOWtests/typing/typing_progressbar.py1
LOWsrc/click/_winconsole.py9
LOWsrc/click/_textwrap.py1
LOWsrc/click/globals.py1
LOWsrc/click/__init__.py8
LOWsrc/click/__init__.py10
LOWsrc/click/__init__.py11
LOWsrc/click/__init__.py12
LOWsrc/click/__init__.py13
LOWsrc/click/__init__.py14
LOWsrc/click/__init__.py15
LOWsrc/click/__init__.py16
LOWsrc/click/__init__.py17
LOWsrc/click/__init__.py18
LOWsrc/click/__init__.py19
LOWsrc/click/__init__.py20
LOWsrc/click/__init__.py21
LOWsrc/click/__init__.py22
LOWsrc/click/__init__.py23
LOWsrc/click/__init__.py24
LOWsrc/click/__init__.py25
LOWsrc/click/__init__.py26
LOWsrc/click/__init__.py27
LOWsrc/click/__init__.py28
LOWsrc/click/__init__.py29
LOWsrc/click/__init__.py30
LOWsrc/click/__init__.py31
LOWsrc/click/__init__.py32
LOWsrc/click/__init__.py33
LOWsrc/click/__init__.py34
LOWsrc/click/__init__.py35
LOWsrc/click/__init__.py36
LOWsrc/click/__init__.py37
LOWsrc/click/__init__.py38
LOWsrc/click/__init__.py39
LOWsrc/click/__init__.py40
LOWsrc/click/__init__.py41
LOWsrc/click/__init__.py42
LOWsrc/click/__init__.py43
LOWsrc/click/__init__.py44
LOWsrc/click/__init__.py45
LOWsrc/click/__init__.py46
LOWsrc/click/__init__.py47
LOWsrc/click/__init__.py48
LOWsrc/click/__init__.py49
LOWsrc/click/__init__.py50
LOWsrc/click/__init__.py51
LOWsrc/click/__init__.py52
LOWsrc/click/__init__.py53
LOWsrc/click/__init__.py54
LOWsrc/click/__init__.py55
LOWsrc/click/__init__.py56
LOWsrc/click/__init__.py57
LOWsrc/click/__init__.py58
LOWsrc/click/__init__.py59
LOWsrc/click/__init__.py60
27 more matches not shown…
Decorative Section Separators12 hits · 54 pts
SeverityFileLineSnippet
MEDIUMtests/test_stream_lifecycle.py57# ---------------------------------------------------------------------------
MEDIUMtests/test_stream_lifecycle.py59# ---------------------------------------------------------------------------
MEDIUMtests/test_stream_lifecycle.py108# ---------------------------------------------------------------------------
MEDIUMtests/test_stream_lifecycle.py110# ---------------------------------------------------------------------------
MEDIUMtests/test_stream_lifecycle.py184# ---------------------------------------------------------------------------
MEDIUMtests/test_stream_lifecycle.py186# ---------------------------------------------------------------------------
MEDIUMtests/test_stream_lifecycle.py292# ---------------------------------------------------------------------------
MEDIUMtests/test_stream_lifecycle.py294# ---------------------------------------------------------------------------
MEDIUMtests/test_stream_lifecycle.py369# ---------------------------------------------------------------------------
MEDIUMtests/test_stream_lifecycle.py371# ---------------------------------------------------------------------------
MEDIUMtests/test_stream_lifecycle.py483# ---------------------------------------------------------------------------
MEDIUMtests/test_stream_lifecycle.py488# ---------------------------------------------------------------------------
Excessive Try-Catch Wrapping23 hits · 28 pts
SeverityFileLineSnippet
LOWtests/test_commands.py160 except Exception as e:
MEDIUMtests/test_commands.py157def parse_args(self, ctx, args):
LOWexamples/imagepipe/imagepipe.py97 except Exception as e:
LOWexamples/imagepipe/imagepipe.py117 except Exception as e:
LOWsrc/click/_winconsole.py209 except Exception:
LOWsrc/click/core.py2658 except Exception:
LOWsrc/click/utils.py42 except Exception:
LOWsrc/click/_compat.py74 except Exception:
LOWsrc/click/_compat.py121 except Exception:
LOWsrc/click/_compat.py133 except Exception:
LOWsrc/click/_compat.py136 except Exception:
LOWsrc/click/_compat.py146 except Exception:
LOWsrc/click/_compat.py154 except Exception:
LOWsrc/click/_compat.py163 except Exception:
LOWsrc/click/_compat.py167 except Exception:
LOWsrc/click/_compat.py540 except Exception:
LOWsrc/click/_compat.py558 except Exception:
LOWsrc/click/_compat.py565 except Exception:
MEDIUMsrc/click/_compat.py71def __del__(self) -> None:
LOWsrc/click/_termui_impl.py525 except Exception as e:
LOWsrc/click/testing.py568 except Exception:
LOWsrc/click/testing.py578 except Exception:
LOWsrc/click/testing.py702 except Exception as e:
Cross-File Repetition4 hits · 20 pts
SeverityFileLineSnippet
HIGHREADME.md0simple program that greets name for a total of count times.
HIGHtests/typing/typing_help_option.py0simple program that greets name for a total of count times.
HIGHtests/typing/typing_simple_example.py0simple program that greets name for a total of count times.
HIGHdocs/index.md0simple program that greets name for a total of count times.
Deep Nesting18 hits · 18 pts
SeverityFileLineSnippet
LOWexamples/termui/termui.py145
LOWsrc/click/_textwrap.py66
LOWsrc/click/core.py823
LOWsrc/click/core.py1392
LOWsrc/click/core.py2811
LOWsrc/click/core.py3036
LOWsrc/click/core.py3181
LOWsrc/click/core.py3381
LOWsrc/click/types.py231
LOWsrc/click/parser.py51
LOWsrc/click/parser.py169
LOWsrc/click/parser.py327
LOWsrc/click/termui.py118
LOWsrc/click/termui.py231
LOWsrc/click/shell_completion.py576
LOWsrc/click/_termui_impl.py756
LOWsrc/click/testing.py396
LOWsrc/click/testing.py593
Self-Referential Comments5 hits · 13 pts
SeverityFileLineSnippet
MEDIUMtests/test_utils.py689 # Create a test file to get the expected permissions for new files
MEDIUMtests/test_testing.py611 # Create a writer backed by the real fd 2, simulating a handler
MEDIUMexamples/repo/repo.py51 # Create a repo object and remember it as the context object. From
MEDIUMsrc/click/_winconsole.py1# This module is based on the excellent work by Adam Bartoš who
MEDIUMsrc/click/core.py2429 # Define the conversion function based on nargs and type.
Fake / Example Data6 hits · 9 pts
SeverityFileLineSnippet
LOWtests/test_formatting.py430 text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
LOWtests/test_formatting.py430 text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
LOWtests/test_formatting.py431 formatter = click.HelpFormatter(width=len(" Lorem ipsum dolor sit amet,"))
LOWtests/test_formatting.py431 formatter = click.HelpFormatter(width=len(" Lorem ipsum dolor sit amet,"))
LOWtests/test_formatting.py435 expected = " Lorem ipsum dolor sit amet,\n consectetur adipiscing elit\n"
LOWtests/test_formatting.py435 expected = " Lorem ipsum dolor sit amet,\n consectetur adipiscing elit\n"
Over-Commented Block7 hits · 7 pts
SeverityFileLineSnippet
LOWsrc/click/core.py361
LOWsrc/click/core.py2521 # Legacy case: provide a temporarily manipulated context to the callback
LOWsrc/click/core.py3281 if default in (UNSET, None):
LOWsrc/click/parser.py341 return
LOWsrc/click/shell_completion.py381 incomplete = cwords[cword]
LOWsrc/click/_termui_impl.py841 def raw_terminal() -> cabc.Iterator[int]:
LOWsrc/click/_termui_impl.py861 #
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippet
HIGHsrc/click/_termui_impl.py776 return subprocess.Popen(args, stderr=null).wait()
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippet
LOWtests/test_options.py1615 # Print the value received by the callback as-is, so we can check for it.
Verbosity Indicators1 hit · 0 pts
SeverityFileLineSnippet
LOWsrc/click/core.py2880 # value, we need to check if `flag_value` or `default` was set. Either one is