The cost value should always be a float.
The per share calculation shouldn't be changed dramatically by being
a float, (except for potential rounding errors), but change to so
that PerShare and PerTrade are aligned.
# Please enter the commit message for your changes. Lines starting
When the cost basis was set to an integer the division in the
calculation would floor down to the nearest integer.
Ensuring that the number is a float during PerTrade's init
will ensure that the calculation doesn't use integer division.
Do the conversion to float in init rather than calculate, so that
calling the builtin `float` is not added to any inner loops.
Mostly whitespace, line width and other spacing changes.
Also, removes use of deprecated has_key in favor of `in`
Going forward new patches should pass running `flake8` before
submission.