Skip to main content

cyclomatic complexity calculator for python file

Project description

cccalculator

calculate the cyclomatic complexity of python source file Use M = E − N + 2 to calculate the complexity . The output is the McCabe complexity of each python source file under the path.

Example

cd into the cccalculate directory

$ python calculate.py /path_to_your_python_file_directory/

The output will be like this

/path_to_your_python_file_directory/test_file4.py

fun:7----------6

/path_to_your_python_file_directory/test_file1.py

class:1--fun:2----------1

class:1--fun:5----------5

fun:26----------5

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cccalculator-0.0.1.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

cccalculator-0.0.1-py3-none-any.whl (2.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page