Panel View: Omit the `:` if there is no error code to follow
@@ -348,8 +348,9 @@ def run_update_panel_cmd(panel, text=None):
def format_row(item):
line = item["line"] + 1
start = item["start"] + 1
- tmpl = " {LINE:>5}:{START:<4} {error_type:7} {linter:>12}:{code:12} {msg}"
- return tmpl.format(LINE=line, START=start, **item)
+ code = ":{code:12}".format(**item) if item['code'] else ''
+ tmpl = " {LINE:>5}:{START:<4} {error_type:7} {linter:>12}{CODE} {msg}"
+ return tmpl.format(LINE=line, START=start, CODE=code, **item)
def fill_panel(window):
