Skip to content

Commit 8048388

Browse files
author
Radjammin@gmail.com
committed
pylint error resolved
1 parent c494957 commit 8048388

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

tools/check-translations.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,14 @@ def _print_results(grouped):
221221
for file in sorted(grouped.keys()):
222222
print(f"\n{Colors.BOLD}File: {file.name}{Colors.RESET}")
223223
for w in sorted(grouped[file], key=lambda x: x.line):
224-
color, sev = (Colors.RED, "SEVERE ") if w.severity == Severity.SEVERE else (Colors.YELLOW, "WARNING")
224+
is_severe = w.severity == Severity.SEVERE
225+
color = Colors.RED if is_severe else Colors.YELLOW
226+
sev = "SEVERE " if is_severe else "WARNING"
227+
225228
lines = w.message.split("\n")
226-
print(f" {Colors.CYAN}Line {w.line:<4}{Colors.RESET} | {color}{sev}{Colors.RESET} | {lines[0]}")
229+
prefix = f" {Colors.CYAN}Line {w.line:<4}{Colors.RESET}"
230+
231+
print(f"{prefix} | {color}{sev}{Colors.RESET} | {lines[0]}")
227232
for extra in lines[1:]:
228233
print(f" | | {extra}")
229234

0 commit comments

Comments
 (0)