Skip to main content

Jones Complexity checker, plugin for flake8

Project description

Flake8 extension to calculate per-line complexity and total code density.

Installation

$ pip install jones-complexity

Usage (Standalone)

$ python -m jones_complexity --min 5 your_file.py

Usage (flake8)

$ flake8 --max-line-compexity 15 --max-jones-score 8 yourproject

What is this?

Because

if user.get_full_name().toUpper().split(' ')[0] == 'ALICE':
    return True

is harder to read and maintain than

if first_name == 'Alice':
   return True

Shamelessly named after myself, in the tradition of McCabe and Halstead.

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

jones-complexity-0.1.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

jones_complexity-0.1.0-py2-none-any.whl (5.2 kB view details)

Uploaded Python 2

File details

Details for the file jones-complexity-0.1.0.tar.gz.

File metadata

File hashes

Hashes for jones-complexity-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cddbab5bcb6b0099af2c1eabbb222c4fa0e01176783f7e3fafe8fb751cbff6f6
MD5 78fdc0c6bd87402392ed6859409d2f70
BLAKE2b-256 fbbc9afec7000fc62f8a1e65eb819e56a06056014916c42d14ef2b31f19232db

See more details on using hashes here.

Provenance

File details

Details for the file jones_complexity-0.1.0-py2-none-any.whl.

File metadata

File hashes

Hashes for jones_complexity-0.1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 04173a7d8f9df5f2ba417ccc8610d0dc233eb9194467517d025e0b84788def75
MD5 4404cffb0a92cf3c7c1a926e3af662a2
BLAKE2b-256 467268b6f32c83b63197be9ad0e164540362f700d2b44c99190d182a496d9815

See more details on using hashes here.

Provenance

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