resolve code quality issues

This commit is contained in:
bobsfriend12 2024-07-30 19:04:02 -06:00
parent b31690d71b
commit 3da3c899e4

View File

@ -971,7 +971,7 @@ class Helpers:
] ]
return colors[ansi_code - 8] return colors[ansi_code - 8]
elif 16 <= ansi_code <= 231: if 16 <= ansi_code <= 231:
# 216 color cube # 216 color cube
ansi_code -= 16 ansi_code -= 16
r = (ansi_code // 36) % 6 * 51 r = (ansi_code // 36) % 6 * 51
@ -979,17 +979,16 @@ class Helpers:
b = (ansi_code % 6) * 51 b = (ansi_code % 6) * 51
return (r, g, b) return (r, g, b)
elif 232 <= ansi_code <= 255: if 232 <= ansi_code <= 255:
# Grayscale colors # Grayscale colors
level = (ansi_code - 232) * 10 + 8 level = (ansi_code - 232) * 10 + 8
return (level, level, level) return (level, level, level)
else: return (
return ( 0,
0, 0,
0, 0,
0, ) # Default to black
) # Default to black
@staticmethod @staticmethod
def validate_traversal(base_path, filename): def validate_traversal(base_path, filename):