terryyin / lizard

A simple code complexity analyser without caring about the C/C++ header files or Java imports, supports most of the popular languages.
Other
1.85k stars 250 forks source link

Use Python3 division for calculation of averages #93

Closed rakhimov closed 8 years ago

rakhimov commented 8 years ago

In some places, it seems that the results of calculations are expected to be floats, but integer division of Python2 is used. In other places, explicit cast to float is made to get the float result. Python3 division approach for integers helps cleanup these places and make them consistent.

If Lizard relies on integer division approach of Python2, which doesn't seem to be the case, the code must be corrected with //.

Review on Reviewable

terryyin commented 8 years ago

hi @rakhimov , Wow, the code becomes much more clean now. Thanks.