Skip to content

sumeet/method_length

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prints out method lengths for Python files.

Examples

Longest methods in a project

$ find . -name '*.py' | xargs -n1 python ./method_length.py | sort -nr | head
4    test_finds_method_lengths (./test.py)
3    test_ignores_docstrings (./test.py)
3    last_line (./method_length.py)
3    find_method_lengths (./method_length.py)
2    docstring_length (./method_length.py)
1    length (./method_length.py)
1    get_line_no (./method_length.py)

Average length for a project

$ alias average='awk '\''{ total += $1; count++ } END { print total/count }'\'
$ find . -name '*.py' | xargs -n1 python ./method_length.py | average
2.42857

About

Prints out method lengths for Python files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages