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.3.tar.gz (213.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cccalculator-0.0.3-py3-none-any.whl (231.1 kB view details)

Uploaded Python 3

File details

Details for the file cccalculator-0.0.3.tar.gz.

File metadata

  • Download URL: cccalculator-0.0.3.tar.gz
  • Upload date:
  • Size: 213.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for cccalculator-0.0.3.tar.gz
Algorithm Hash digest
SHA256 16e4774dfe40615d062cf1520a4e88bd79b5999151d10751c35625869d258b66
MD5 102636d854c15c25ce1cc4fd8c65bc20
BLAKE2b-256 2da97adafb76548bb6141557a39e07e8f7676babd30aac40aaf068371cff4f8d

See more details on using hashes here.

File details

Details for the file cccalculator-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: cccalculator-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 231.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for cccalculator-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 13a1104fec521840631d009d8f63fd6bc803e5b72558456edbe8dab7e44e5223
MD5 a9fafb62b7bd48910ba648041d71daf4
BLAKE2b-256 5fd4cd508e97656a1e86fc9ae6a3bc15e280f8da176ac0d040f6774cb84056c9

See more details on using hashes here.

Supported by

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