mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 06:32:53 +01:00
chore: clear linting errors
This commit is contained in:
1 parent
24125a7492
commit
7b06973af3
10 files changed
+13
-21
No files matched your search
+5
-4
@@ -26,16 +26,17 @@ def get_cpu_model() -> str:
|
||||
def print_servers(servers: list[str]) -> str:
|
||||
s = ""
|
||||
for server in servers:
|
||||
s+= server + "\n"
|
||||
s += server + "\n"
|
||||
return s
|
||||
|
||||
|
||||
def print_mods(mods: list[int]) -> str:
|
||||
s = ""
|
||||
for mod in mods:
|
||||
s+= str(mod) + "\n"
|
||||
s += str(mod) + "\n"
|
||||
return s
|
||||
|
||||
|
||||
def write_diagnostic(config: Path, outfile: Path) -> None:
|
||||
# TODO: test availability on other distros
|
||||
date = datetime.now().isoformat()
|
||||
@@ -62,7 +63,7 @@ def write_diagnostic(config: Path, outfile: Path) -> None:
|
||||
servers = lookup(config, Preferences.IP_LIST)
|
||||
servers_pretty = print_servers(servers)
|
||||
|
||||
# FIXME: extraneous newlines in lists
|
||||
# FIXME: extraneous newlines in lists of mods
|
||||
template = f"""\
|
||||
{APP_NAME} version {version} ({branch})
|
||||
Date: {date}
|
||||
@@ -82,5 +83,5 @@ def write_diagnostic(config: Path, outfile: Path) -> None:
|
||||
{servers_pretty}
|
||||
"""
|
||||
|
||||
output = "\n".join([line.lstrip() for line in template.split('\n')])
|
||||
output = "\n".join([line.lstrip() for line in template.split("\n")])
|
||||
outfile.write_text(output)
|
||||
@@ -1,7 +1,7 @@
|
||||
import re
|
||||
|
||||
from dzgui.util.localize import number
|
||||
from dzgui.util.strings import no_mods, no_servers, distance_suffix
|
||||
from dzgui.util.strings import no_mods, no_servers
|
||||
|
||||
import gi
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
from dataclasses import dataclass
|
||||
from dzgui.const.constants import SYSTEM_LOG
|
||||
|
||||
# TODO: move to util.format.py
|
||||
|
||||
|
||||
def build_missing(build: str) -> str:
|
||||
msg = (
|
||||
@@ -605,7 +607,7 @@ atomic_buttons = AtomicButton(
|
||||
keys_tooltip="Toggles the keybindings dialog",
|
||||
)
|
||||
|
||||
steam_icon_missing="Steam icon not found in IconTheme"
|
||||
steam_icon_missing = "Steam icon not found in IconTheme"
|
||||
|
||||
missing_changelog = "Error: failed to read changelog"
|
||||
esc_to_return = "Press ESC to return"
|
||||
|
||||
Reference in new issue
Block a user