Looking at the avg function, I was curious about potentially using statistics.mean instead. The functionality between the two seemed the same except for avg always returning a float VS statistics.mean sometimes returning an integer (where applicable).
As long it's acceptable to have an integer returned in some cases instead of always returning a float, removing the avg function allows some code and tests to be removed.
https://github.com/google/gif-for-cli/blob/288b7b3ae88661ca805ac8c6b574a8448bcf37d9/gif_for_cli/generate/utils.py#L29-L31
Looking at the
avg
function, I was curious about potentially usingstatistics.mean
instead. The functionality between the two seemed the same except foravg
always returning a float VSstatistics.mean
sometimes returning an integer (where applicable).The main issue was that
statistics.mean
requiresPython 3.4+
but the installation instructions in the README only mentionedPython 3
:Looking at the docs for the dependency
Pillow
seemed to indicate that3.4
would be the minimum supported version forgif-for-cli
:As long it's acceptable to have an integer returned in some cases instead of always returning a float, removing the
avg
function allows some code and tests to be removed.Other changes: