radon icon indicating copy to clipboard operation
radon copied to clipboard

Various code metrics for Python code

Results 40 radon issues
Sort by recently updated
recently updated
newest added

The `future` package is not used anywhere in the code, so remove the dependency.

While trying to fix #160, I noticed that the Halstead visitor counts operands incorrectly. Essentially, it states that every expression that an operator is applied to is a distinct operator....

For reference, please see https://github.com/dollodart/pymetrics. This amounts to adding new node visitors and is like issue #163. Since complexity metrics are used in linters which have the main purpose enforcing...

Added support of match pattern introduced in python 3.10. @rubik comments/proposals are welcomed.

According to https://pypi.org/project/radon/ the latest version is 5.1.0. However, the link to the documentation page https://radon.readthedocs.org/ redirects to an outdated version of 4.1.0. Please fix! E.g. the --codeclimate option is...

``` class student2: def nott(self): if True and False: return elif True: return else: return return self class classmate: def example(self): return 0 @staticmethod def staticMethod(): return None ``` the...

This is a first attempt at implementing a raw_visitor to provide metrics by block type. It is lightly tested reusing some of the tests from test_raw.py, not all of which...

I have analyzed cyclomatic complexity of a function that has this new Python 3.10 match-case syntax. The result of that function was `A (1)`. That's not correct. The function had...

I have some large files that radon struggles to analyse. I created an example to demonstrate the problem: https://gist.githubusercontent.com/Sam152/50e8ef27cceb899084b42a069237a7b8/raw/bb21870395df86a0062c22353b532b45d31bd3f5/sample.py (~800 lines) In my case running `radon raw big-package` takes 28.38s....