fragile version check comparison
infinitewarp opened this issue · 0 comments
infinitewarp commented
Very minor nitpick I found while reading through the code:
https://github.com/j-e-k/poketrainer/blob/develop/poketrainer/poketrainer.py#L431
if settings.get('minimum_client_version', '0.0.0') > '0.33.0':
That works only in some cases because of how strings do comparisons:
>>> '0.40.0' > '0.33.0'
True
>>> '0.100.0' > '0.33.0'
False
It'll probably be good enough for a long time, but maybe we should do something more robust.