Explorar o código

Simplify chained comparison (#3816)

Matheus Rocha Vieira %!s(int64=7) %!d(string=hai) anos
pai
achega
477eb4978e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      toolset/utils/results.py

+ 1 - 1
toolset/utils/results.py

@@ -534,7 +534,7 @@ class Results:
             # We'll assume that any number we get is convertable to a float, just in case
             num = float(num)
             for x in ['bytes', 'KB', 'MB', 'GB']:
-                if num < 1024.0 and num > -1024.0:
+                if 1024.0 > num > -1024.0:
                     return "%3.1f%s" % (num, x)
                 num /= 1024.0
             return "%3.1f%s" % (num, 'TB')