def _convert_rating_to_percent(self, ratios, rating):
        percent = None

        for threshold in sorted(ratios.keys()):
            if threshold <= self._character.level:
                percent = rating / ratios[threshold]

        if percent is None:
            percent = rating / rating[max(ratios.keys())]

        return percent
dataset/ETHPy150Open vishnevskiy/battlenet/battlenet/things.py/Stats._convert_rating_to_percent/swapped operands of `<=`