pycomplexity
pycomplexity copied to clipboard
Scripts to show cyclomatic complexity of Python code in Vim and Emacs.
When editing a new file Python will raise an IOError and it will fill the Messages window with errors similar to this: ``` Error detected while processing function 37_ShowComplexity: line...
I needed to comment out most of it, because it was failing to find "line" key in "variables" and thus failed, i don't know if it's related to the fact...
I had to add ctermfg and ctermbg definitions in order to get a highlight in my terminal hi low_complexity guifg=#004400 guibg=#004400 ctermfg=DarkGreen ctermbg=Green hi medium_complexity guifg=#bbbb00 guibg=#bbbb00 ctermfg=DarkYellow ctermbg=Yellow hi...
I've seen groups of blank lines appear where they shouldn't be. When I save the file, they move downward for each save. The whole line marking scheme is both slow...
If I say "x = a or b", that's a branch (b might or might not be executed). The script already catches conditionals in ifs, but not outside of them.