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

Uploaded Source

Built Distribution

function_analyser-0.0.9-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: function-analyser-0.0.9.tar.gz
  • Upload date:
  • Size: 9.8 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.9.tar.gz
Algorithm Hash digest
SHA256 cbc536f719051613680711b1ae98e3abb18128e049dbba85b2f01ccad8d906cb
MD5 d80a67966daa7e2d304e6294bd664b4a
BLAKE2b-256 3031347ed942d4c093d20555c333fb2bceddd0b235ed0ae2f7d3e512c702156b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for function_analyser-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 0b9ca4956ad7638e5968a1a2af7f4e8378182cea30363315e5db27bfdfeba6a9
MD5 3198f7db6fcf207b63161143cd670bbb
BLAKE2b-256 39a4faca0f29d45da7462c868e5c6a0ed35d0237c936424c59fbff6159f3a410

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