Python composable command line interface toolkit
469 matches across 12 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/test_parser.py | 22 | def test_parser_default_prefixes(): |
| LOW | tests/test_parser.py | 27 | def test_parser_collects_prefixes(): |
| LOW | tests/test_shell_completion.py | 78 | def test_group_command_same_option(): |
| LOW | tests/test_shell_completion.py | 152 | def test_choice_special_characters(): |
| LOW | tests/test_shell_completion.py | 159 | def test_choice_conflicting_prefix(): |
| LOW | tests/test_shell_completion.py | 226 | def test_flag_option_with_nargs_option(): |
| LOW | tests/test_shell_completion.py | 335 | def test_completion_item_data(): |
| LOW | tests/test_shell_completion.py | 376 | def test_source_uses_lf_line_endings(monkeypatch): |
| LOW | tests/test_shell_completion.py | 441 | def test_zsh_full_complete_with_colons( |
| LOW | tests/test_shell_completion.py | 479 | def test_choice_case_sensitive(value, expect): |
| LOW | tests/test_shell_completion.py | 489 | def _restore_available_shells(tmpdir): |
| LOW | tests/test_shell_completion.py | 498 | def test_add_completion_class(): |
| LOW | tests/test_shell_completion.py | 518 | def test_add_completion_class_with_name(): |
| LOW | tests/test_shell_completion.py | 544 | def test_add_completion_class_decorator(): |
| LOW | tests/test_shell_completion.py | 582 | def test_fish_format_completion_escapes_help(): |
| LOW | tests/test_basic.py | 314 | def test_flag_value_dual_options(runner, default, args, expected): |
| LOW | tests/test_basic.py | 486 | def test_choice_argument_enum(runner): |
| LOW | tests/test_basic.py | 513 | def test_choice_argument_custom_type(runner): |
| LOW | tests/test_basic.py | 544 | def test_choice_argument_none(runner): |
| LOW | tests/test_basic.py | 572 | def test_datetime_option_default(runner): |
| LOW | tests/test_basic.py | 599 | def test_datetime_option_custom(runner): |
| LOW | tests/test_basic.py | 727 | def test_help_invalid_default(runner): |
| LOW | tests/test_utils.py | 249 | def test_full_prompt_passed_to_readline(monkeypatch, call, expected_prompt): |
| LOW | tests/test_utils.py | 299 | def _test_simulate_keyboard_interrupt(file=None): |
| LOW | tests/test_utils.py | 497 | def test_echo_writing_to_standard_error(capfd, monkeypatch): |
| LOW | tests/test_utils.py | 608 | def test_open_file_pathlib_dash(runner): |
| LOW | tests/test_utils.py | 624 | def test_open_file_ignore_errors_stdin(runner): |
| LOW | tests/test_utils.py | 635 | def test_open_file_respects_ignore(runner): |
| LOW | tests/test_utils.py | 653 | def test_open_file_ignore_no_encoding(runner): |
| LOW | tests/test_utils.py | 664 | def test_open_file_atomic_permissions_existing_file(runner, permissions): |
| LOW | tests/test_utils.py | 681 | def test_open_file_atomic_permissions_new_file(runner): |
| LOW | tests/test_utils.py | 781 | def test_make_default_short_help(value, max_length, alter, expect): |
| LOW | tests/test_termui.py | 195 | def test_progressbar_init_exceptions(runner): |
| LOW | tests/test_termui.py | 200 | def test_progressbar_iter_outside_with_exceptions(runner): |
| LOW | tests/test_termui.py | 207 | def test_progressbar_is_iterator(runner, monkeypatch): |
| LOW | tests/test_termui.py | 549 | def test_editor_env_passed_through(): |
| LOW | tests/test_termui.py | 559 | def test_editor_failure_exception(): |
| LOW | tests/test_termui.py | 566 | def test_editor_nonexistent_exception(): |
| LOW | tests/test_termui.py | 40 | def test_progressbar_strip_regression(runner, monkeypatch): |
| LOW | tests/test_termui.py | 56 | def test_progressbar_length_hint(runner, monkeypatch): |
| LOW | tests/test_termui.py | 97 | def test_progressbar_hidden_manual(runner, monkeypatch): |
| LOW | tests/test_termui.py | 109 | def test_progressbar_time_per_iteration(runner, avg, expected): |
| LOW | tests/test_termui.py | 132 | def test_progressbar_format_eta(runner, eta, expected): |
| LOW | tests/test_termui.py | 138 | def test_progressbar_format_pos(runner, pos, length): |
| LOW | tests/test_termui.py | 151 | def test_progressbar_format_bar(runner, length, finished, pos, avg, expected): |
| LOW | tests/test_termui.py | 168 | def test_progressbar_format_progress_line( |
| LOW | tests/test_termui.py | 182 | def test_progressbar_format_progress_line_with_show_func(runner, test_item): |
| LOW | tests/test_termui.py | 222 | def test_choices_list_in_prompt(runner, monkeypatch): |
| LOW | tests/test_termui.py | 250 | def test_file_prompt_default_format(runner, file_kwargs): |
| LOW | tests/test_termui.py | 278 | def test_progressbar_yields_all_items(runner): |
| LOW | tests/test_termui.py | 306 | def test_progressbar_item_show_func(runner, monkeypatch): |
| LOW | tests/test_termui.py | 322 | def test_progressbar_update_with_item_show_func(runner, monkeypatch): |
| LOW | tests/test_termui.py | 342 | def test_progress_bar_update_min_steps(runner): |
| LOW | tests/test_termui.py | 368 | def test_getchar_special_key_windows(runner, monkeypatch, special_key_char, key_char): |
| LOW | tests/test_termui.py | 381 | def test_getchar_windows_exceptions(runner, monkeypatch, key_char, exc): |
| LOW | tests/test_termui.py | 510 | def test_editor_path_normalization(editor_cmd, filenames, expected_args): |
| LOW | tests/test_termui.py | 537 | def test_editor_windows_path_normalization(editor_cmd, expected_cmd): |
| LOW | tests/test_termui.py | 640 | def _run_get_pager_file_with_real_pager(monkeypatch, capfd, writer, color=False): |
| LOW | tests/test_termui.py | 656 | def _write_pager_from_multiple_sites(pager): |
| LOW | tests/test_termui.py | 693 | def test_get_pager_file_with_real_pager_binary_stream( |
| 244 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/test_basic.py | 1 | |
| LOW | tests/test_stream_lifecycle.py | 40 | |
| LOW | tests/test_compat.py | 1 | |
| LOW | tests/typing/typing_aliased_group.py | 3 | |
| LOW | tests/typing/typing_progressbar.py | 1 | |
| LOW | src/click/_winconsole.py | 9 | |
| LOW | src/click/_textwrap.py | 1 | |
| LOW | src/click/globals.py | 1 | |
| LOW | src/click/__init__.py | 8 | |
| LOW | src/click/__init__.py | 10 | |
| LOW | src/click/__init__.py | 11 | |
| LOW | src/click/__init__.py | 12 | |
| LOW | src/click/__init__.py | 13 | |
| LOW | src/click/__init__.py | 14 | |
| LOW | src/click/__init__.py | 15 | |
| LOW | src/click/__init__.py | 16 | |
| LOW | src/click/__init__.py | 17 | |
| LOW | src/click/__init__.py | 18 | |
| LOW | src/click/__init__.py | 19 | |
| LOW | src/click/__init__.py | 20 | |
| LOW | src/click/__init__.py | 21 | |
| LOW | src/click/__init__.py | 22 | |
| LOW | src/click/__init__.py | 23 | |
| LOW | src/click/__init__.py | 24 | |
| LOW | src/click/__init__.py | 25 | |
| LOW | src/click/__init__.py | 26 | |
| LOW | src/click/__init__.py | 27 | |
| LOW | src/click/__init__.py | 28 | |
| LOW | src/click/__init__.py | 29 | |
| LOW | src/click/__init__.py | 30 | |
| LOW | src/click/__init__.py | 31 | |
| LOW | src/click/__init__.py | 32 | |
| LOW | src/click/__init__.py | 33 | |
| LOW | src/click/__init__.py | 34 | |
| LOW | src/click/__init__.py | 35 | |
| LOW | src/click/__init__.py | 36 | |
| LOW | src/click/__init__.py | 37 | |
| LOW | src/click/__init__.py | 38 | |
| LOW | src/click/__init__.py | 39 | |
| LOW | src/click/__init__.py | 40 | |
| LOW | src/click/__init__.py | 41 | |
| LOW | src/click/__init__.py | 42 | |
| LOW | src/click/__init__.py | 43 | |
| LOW | src/click/__init__.py | 44 | |
| LOW | src/click/__init__.py | 45 | |
| LOW | src/click/__init__.py | 46 | |
| LOW | src/click/__init__.py | 47 | |
| LOW | src/click/__init__.py | 48 | |
| LOW | src/click/__init__.py | 49 | |
| LOW | src/click/__init__.py | 50 | |
| LOW | src/click/__init__.py | 51 | |
| LOW | src/click/__init__.py | 52 | |
| LOW | src/click/__init__.py | 53 | |
| LOW | src/click/__init__.py | 54 | |
| LOW | src/click/__init__.py | 55 | |
| LOW | src/click/__init__.py | 56 | |
| LOW | src/click/__init__.py | 57 | |
| LOW | src/click/__init__.py | 58 | |
| LOW | src/click/__init__.py | 59 | |
| LOW | src/click/__init__.py | 60 | |
| 27 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tests/test_stream_lifecycle.py | 57 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/test_stream_lifecycle.py | 59 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/test_stream_lifecycle.py | 108 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/test_stream_lifecycle.py | 110 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/test_stream_lifecycle.py | 184 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/test_stream_lifecycle.py | 186 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/test_stream_lifecycle.py | 292 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/test_stream_lifecycle.py | 294 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/test_stream_lifecycle.py | 369 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/test_stream_lifecycle.py | 371 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/test_stream_lifecycle.py | 483 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/test_stream_lifecycle.py | 488 | # --------------------------------------------------------------------------- |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/test_commands.py | 160 | except Exception as e: |
| MEDIUM | tests/test_commands.py | 157 | def parse_args(self, ctx, args): |
| LOW | examples/imagepipe/imagepipe.py | 97 | except Exception as e: |
| LOW | examples/imagepipe/imagepipe.py | 117 | except Exception as e: |
| LOW | src/click/_winconsole.py | 209 | except Exception: |
| LOW | src/click/core.py | 2658 | except Exception: |
| LOW | src/click/utils.py | 42 | except Exception: |
| LOW | src/click/_compat.py | 74 | except Exception: |
| LOW | src/click/_compat.py | 121 | except Exception: |
| LOW | src/click/_compat.py | 133 | except Exception: |
| LOW | src/click/_compat.py | 136 | except Exception: |
| LOW | src/click/_compat.py | 146 | except Exception: |
| LOW | src/click/_compat.py | 154 | except Exception: |
| LOW | src/click/_compat.py | 163 | except Exception: |
| LOW | src/click/_compat.py | 167 | except Exception: |
| LOW | src/click/_compat.py | 540 | except Exception: |
| LOW | src/click/_compat.py | 558 | except Exception: |
| LOW | src/click/_compat.py | 565 | except Exception: |
| MEDIUM | src/click/_compat.py | 71 | def __del__(self) -> None: |
| LOW | src/click/_termui_impl.py | 525 | except Exception as e: |
| LOW | src/click/testing.py | 568 | except Exception: |
| LOW | src/click/testing.py | 578 | except Exception: |
| LOW | src/click/testing.py | 702 | except Exception as e: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | README.md | 0 | simple program that greets name for a total of count times. |
| HIGH | tests/typing/typing_help_option.py | 0 | simple program that greets name for a total of count times. |
| HIGH | tests/typing/typing_simple_example.py | 0 | simple program that greets name for a total of count times. |
| HIGH | docs/index.md | 0 | simple program that greets name for a total of count times. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | examples/termui/termui.py | 145 | |
| LOW | src/click/_textwrap.py | 66 | |
| LOW | src/click/core.py | 823 | |
| LOW | src/click/core.py | 1392 | |
| LOW | src/click/core.py | 2811 | |
| LOW | src/click/core.py | 3036 | |
| LOW | src/click/core.py | 3181 | |
| LOW | src/click/core.py | 3381 | |
| LOW | src/click/types.py | 231 | |
| LOW | src/click/parser.py | 51 | |
| LOW | src/click/parser.py | 169 | |
| LOW | src/click/parser.py | 327 | |
| LOW | src/click/termui.py | 118 | |
| LOW | src/click/termui.py | 231 | |
| LOW | src/click/shell_completion.py | 576 | |
| LOW | src/click/_termui_impl.py | 756 | |
| LOW | src/click/testing.py | 396 | |
| LOW | src/click/testing.py | 593 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tests/test_utils.py | 689 | # Create a test file to get the expected permissions for new files |
| MEDIUM | tests/test_testing.py | 611 | # Create a writer backed by the real fd 2, simulating a handler |
| MEDIUM | examples/repo/repo.py | 51 | # Create a repo object and remember it as the context object. From |
| MEDIUM | src/click/_winconsole.py | 1 | # This module is based on the excellent work by Adam Bartoš who |
| MEDIUM | src/click/core.py | 2429 | # Define the conversion function based on nargs and type. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/test_formatting.py | 430 | text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit" |
| LOW | tests/test_formatting.py | 430 | text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit" |
| LOW | tests/test_formatting.py | 431 | formatter = click.HelpFormatter(width=len(" Lorem ipsum dolor sit amet,")) |
| LOW | tests/test_formatting.py | 431 | formatter = click.HelpFormatter(width=len(" Lorem ipsum dolor sit amet,")) |
| LOW | tests/test_formatting.py | 435 | expected = " Lorem ipsum dolor sit amet,\n consectetur adipiscing elit\n" |
| LOW | tests/test_formatting.py | 435 | expected = " Lorem ipsum dolor sit amet,\n consectetur adipiscing elit\n" |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | src/click/core.py | 361 | |
| LOW | src/click/core.py | 2521 | # Legacy case: provide a temporarily manipulated context to the callback |
| LOW | src/click/core.py | 3281 | if default in (UNSET, None): |
| LOW | src/click/parser.py | 341 | return |
| LOW | src/click/shell_completion.py | 381 | incomplete = cwords[cword] |
| LOW | src/click/_termui_impl.py | 841 | def raw_terminal() -> cabc.Iterator[int]: |
| LOW | src/click/_termui_impl.py | 861 | # |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | src/click/_termui_impl.py | 776 | return subprocess.Popen(args, stderr=null).wait() |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/test_options.py | 1615 | # Print the value received by the callback as-is, so we can check for it. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | src/click/core.py | 2880 | # value, we need to check if `flag_value` or `default` was set. Either one is |