Skip to main content

Identify long functions to refactor with this function analyser

Project description

function-analyser

TL;DR;

pip install function-analyser

There is much debate about the ideal length of a function or method.

E.g.

The first rule of functions is that they should be small.
The second rule of functions is that they should be smaller than that.
Functions should not be 100 lines long.
Functions should hardly ever be 20 lines long.

Robert (Bob) Martin, Clean Code: A Handbook of Agile Software Craftsmanship (2008) as cited in https://softwareengineering.stackexchange.com/questions/133404/what-is-the-ideal-length-of-a-method-for-you

Common sense, therefore, offers one solution.

However, I have taken a different approach in running analysis on many codebases and using this to calibrate a functional analysis tool to run on your own codebase.

The results are encapsulated in this useful function analysis tool.

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

function-analyser-0.0.15.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

function_analyser-0.0.15-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file function-analyser-0.0.15.tar.gz.

File metadata

  • Download URL: function-analyser-0.0.15.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for function-analyser-0.0.15.tar.gz
Algorithm Hash digest
SHA256 87bd2910ef16bfa0bf4fda119ced41b02d6bf43a2b20f46cf02e9fe16c174af6
MD5 d1ad9a198e6e765cd8c0da2b9ce3a7ab
BLAKE2b-256 9d7925882f9cc4510d095fd10bc5687a0c84e46d8a064d25d7dbad4b73e0bc4e

See more details on using hashes here.

File details

Details for the file function_analyser-0.0.15-py3-none-any.whl.

File metadata

File hashes

Hashes for function_analyser-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 c8d531565b59ef2fce67a6959e19497d7e9cae4066c24535c3438a557f7bf692
MD5 f7c8fd178a88f6421925c94916f713e5
BLAKE2b-256 7095b590090723302ec1137bbe60783e5ea12a85f316a1314e2b22070c5cc13f

See more details on using hashes here.

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