python-lizard
Port variant v15
Summary Cyclomatic Complexity Analyzer (3.15)
Package version 1.26.1
Homepage http://www.lizard.ws
Keywords python
Maintainer Python Automaton
License Not yet specified
Other variants v14
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 17 NOV 2026, 05:30:38 UTC
Port created 08 JAN 2023, 04:18:24 UTC
Subpackage Descriptions
single |Web Site| Lizard ================= | Lizard is an extensible Cyclomatic Complexity Analyzer for many programming languages including C/C++ (doesn't require all the header files or Java imports). It also does copy-paste detection (code clone detection/code duplicate detection) and many other forms of static code analysis. A list of supported languages: - C# (C Sharp) - C/C++ (works with C++14) - COBOL - Dart - Erlang - F# (see `F# analysis `_) - Fortran - GDScript - Golang - Java - JavaScript (With ES6 and JSX) - Kotlin - Lua - Objective-C - OCaml (see [OCaml analysis]) - Perl - PHP - PL/SQL - Python - R - Ruby - Rust - Scala - Solidity - Structured Text (St) - Swift - TTCN-3 - TypeScript (With TSX) - VueJS - Zig By default lizard will search for any source code that it knows and mix all the results together. This might not be what you want. You can use the "-l" option to select language(s). It counts - the nloc (lines of code without comments), - CCN (cyclomatic complexity number), - token count of functions, - parameter count of functions. You can set limits for CCN (-C) and the number of parameters (-a). Functions that exceed these limits will generate warnings. The exit code of lizard will be non-zero if there are warnings. This tool actually calculates how complex the code 'looks' rather than how complex the code really 'is'. People will need this tool because it's often very hard to get all the included folders and files right when they are complicated. But we don't really need that kind of accuracy for cyclomatic complexity. It requires Python 3.8 or above. The test suite runs on Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14, on Linux and Windows, in continuous integration; other versions are not verified. JavaScript and TypeScript parameters ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Named and anonymous arrows report the same formal parameter counts and binding names. Empty object and array patterns each occupy a parameter slot without adding a name to the API's parameters list; ``({}, [], tail) => tail has parameter_count 3 and parameters ['tail']``. Trailing commas and TypeScript receiver declarations add no slots. Callback types add no functions. Each default parameter or destructuring initializer adds 1 to CCN, because the initializer runs only when the supplied value is undefined. For example, ``function f(a = 1, b = a + 1) { return a + b; }`` has CCN 3: the base complexity of 1 plus two defaults. Defaults in object and array destructuring also count, including nested defaults and destructuring inside a function body. Explicit decisions within an initializer, such as a ternary expression or ``&&`` / ``||``, contribute separately. This also applies to JSX and TSX. Defaults may increase CCN above a configured threshold. See [arrow boundaries] for ternary branches, type annotations and the existing curried-arrow convention.
Configuration Switches (platform-specific settings discarded)
PY314 OFF Build using Python 3.14 PY315 ON Build using Python 3.15
Package Dependencies by Type
Build (only) python315:dev:std
python-pip:single:v15
autoselect-python:single:std
Build and Runtime python315:primary:std
Runtime (only) python-Pygments:single:v15
python-pathspec:single:v15
Download groups
main mirror://PYPIWHL/6f/c8/c4af1e2aeb2fa71495684c64d491a8b9713344f0eeb3884ccfefc7569d2f
Distribution File Information
344e2bfb1b41d31207223ba844fac1f84da80053edf901b3df4ee051b152d0f5 188521 python-src/lizard-1.26.1-py2.py3-none-any.whl
Ports that require python-lizard:v15
python-PyDriller:v15 Framework for MSR (3.15)