lizard's nested-structures extension (-ENS) accumulates its counter across functions and across files, and the reported value changes with the order of files on the command line.
lizard -ENS tiny.py -> uno: max_nested_structures = 1
lizard -ENS tiny.py sample.py -> uno = 1, __init__ = 0, sumar = 11, libre = 13
libre is literally return a if b else c, reported as 13 nested structures.
Unlike the radon finding, this one is a bug: it is not a defensible design decision, and lizard's own documentation does not mention it as a limitation.
The task
- Reproduce it minimally — two small files, run in both orders, show the difference.
- Open an issue on terryyin/lizard with the reproduction.
- While there: its PyPI classifier reads
Freeware while its shipped LICENSE.txt is full MIT. That is a one-line metadata fix worth mentioning in the same breath or a separate issue.
This package deliberately does not use -ENS for this reason (see src/dca/adapters/lizard_adapter.py), so nothing here depends on the fix — it is purely for lizard's other users.
lizard's nested-structures extension (
-ENS) accumulates its counter across functions and across files, and the reported value changes with the order of files on the command line.libreis literallyreturn a if b else c, reported as 13 nested structures.Unlike the radon finding, this one is a bug: it is not a defensible design decision, and lizard's own documentation does not mention it as a limitation.
The task
Freewarewhile its shippedLICENSE.txtis full MIT. That is a one-line metadata fix worth mentioning in the same breath or a separate issue.This package deliberately does not use
-ENSfor this reason (seesrc/dca/adapters/lizard_adapter.py), so nothing here depends on the fix — it is purely for lizard's other users.