pallets/click
85 findings in 17 Python files · 12,945 lines · scanned in 12.5 s on 2026-11-12
Every number here comes from the same analyzer that runs on your upload, on the tree as it is in the repository. A finding is listed with the function or module it sits in; nothing is matched from text. Tests, examples and benchmarks are excluded from the scan, so "never referenced inside the project" means exactly that.
import_cycle 1
modules that import each other
src.click._compatCircular import between 5 modules: src.click._compat -> src.click._winconsole -> src.click.exceptions -> src.click.types -> src.click.utils
swallowed_error 6
an except that hides what went wrong
src.click._compat._NonClosingTextIOWrapper.__del__exception caught at line(s) 77 and dropped silently — log it or re-raise, or the failure never reaches anyonesrc.click._compat._is_binary_writerexception caught at line(s) 170 and dropped silently — log it or re-raise, or the failure never reaches anyone - reachable from 2 call sites (src/click/_compat.py:199, src/click/_compat.py:206)src.click._compat._make_cached_stream_func.<locals>.funcexception caught at line(s) 568 and dropped silently — log it or re-raise, or the failure never reaches anyonesrc.click._winconsole.ConsoleStream.writeexception caught at line(s) 204 and dropped silently — log it or re-raise, or the failure never reaches anyone - reachable from 44 call sites (src/click/_compat.py:135, src/click/_compat.py:138, src/click/_compat.py:165)src.click.testing.CliRunner.isolationexception caught at line(s) 600, 610 and dropped silently — log it or re-raise, or the failure never reaches anyone - reachable from 1 call site (src/click/testing.py:704)src.click.utils._safecall.<locals>.wrapperexception caught at line(s) 45 and dropped silently — log it or re-raise, or the failure never reaches anyone
god_class 1
a class that owns too much
src.click.core.Context28 methods — likely does too much
wide_signature 22
functions that take so many arguments the call sites are unreadable
src.click._compat._NonClosingTextIOWrapper.__init__6 parameters — a call site says nothing about them; group them into one object or split the function - reachable from 17 call sites (src/click/_compat.py:72, src/click/core.py:1768, src/click/core.py:2190)src.click._compat._force_correct_text_stream7 parameters — a call site says nothing about them; group them into one object or split the function - reachable from 2 call sites (src/click/_compat.py:293, src/click/_compat.py:309)src.click._termui_impl.ProgressBar.__init__16 parameters — a call site says nothing about them; group them into one object or split the function - reachable from 17 call sites (src/click/_compat.py:72, src/click/core.py:1768, src/click/core.py:2190)src.click.core.Context.__init__16 parameters — a call site says nothing about them; group them into one object or split the function - reachable from 17 call sites (src/click/_compat.py:72, src/click/core.py:1768, src/click/core.py:2190)src.click.core.Command.__init__12 parameters — a call site says nothing about them; group them into one object or split the function - reachable from 17 call sites (src/click/_compat.py:72, src/click/core.py:1768, src/click/core.py:2190)src.click.core.Command.main6 parameters — a call site says nothing about them; group them into one object or split the function - reachable from 1 call site (src/click/testing.py:725)
and 16 more of the same check.
complex 13
branchy functions, counted from the AST
src.click.core.Option.get_help_extracyclomatic complexity 35src.click._compat.open_streamcyclomatic complexity 21src.click._termui_impl.open_urlcyclomatic complexity 19src.click._textwrap.TextWrapper._wrap_chunkscyclomatic complexity 30src.click.core.Context.__init__cyclomatic complexity 28src.click.core.Command.maincyclomatic complexity 19
and 7 more of the same check.
duplicate 2
the same block in two places
src.click._winconsole._get_text_stderrIdentical code in 2 functions (src.click._winconsole._get_text_stderr, src.click._winconsole._get_text_stdout) — extract it into one function and call it from eachsrc.click.shell_completion.BashComplete.get_completion_argsIdentical code in 3 functions (src.click.shell_completion.BashComplete.get_completion_args, src.click.shell_completion.PowerShellComplete.get_completion_args, src.click.shell_completion.ZshComplete.get_completion_args) — extract it into one function and call it from each
hub 1
a module everything depends on
src.click.utils.echocalled from 19 places — change here ripples widely
large_module 1
a check from the analyzer
src.click.core4020 lines
unused 27
never called, never imported, never read
src.click._compat._FixupStream.seekablenever referenced inside the project (dead code or public API)src.click._termui_impl._PagerWriter.writelinesnever referenced inside the project (dead code or public API)src.click._textwrap.TextWrapper._wrap_chunksnever referenced inside the project (dead code or public API)src.click._winconsole._WindowsConsoleReader.readintonever referenced inside the project (dead code or public API)src.click._winconsole.ConsoleStream.writelinesnever referenced inside the project (dead code or public API)src.click.core.Context.with_resourcenever referenced inside the project (dead code or public API)
and 21 more of the same check.
bad_name 11
a name that does not say what the thing holds
src.click._compat.open_streamnames say nothing (af, f, fd) — rename to what they holdsrc.click._compat._make_cached_stream_func.<locals>.funcnames say nothing (func, rv) — rename to what they holdsrc.click._termui_impl.Editor.editnames say nothing (f, fd, rv) — rename to what they holdsrc.click._termui_impl.raw_terminalnames say nothing (f, fd) — rename to what they holdsrc.click._textwrap._truncate_visiblenames say nothing (i, m, n) — rename to what they holdsrc.click.core.Group.result_callback.<locals>.decoratornames say nothing (f, rv) — rename to what they hold
and 5 more of the same check.
Five projects free. A .zip or a public GitHub URL.
Other repositories, same treatment
- Textualize/rich 97 findings
- celery/celery 1052 findings
- encode/django-rest-framework 337 findings
- encode/httpx 26 findings
- fastapi/fastapi 163 findings
- pallets/flask 45 findings
- psf/requests 47 findings
- pydantic/pydantic 164 findings
- scrapy/scrapy 186 findings