chore: clear typehinting errors

This commit is contained in:
aclist 2026-08-13 13:27:40 +09:00
parent 90b1c875df
commit 7994bf988c
4 changed files with 14 additions and 16 deletions

View File

@ -21,11 +21,11 @@ class FilterManager:
strings.filter_3pp: True,
strings.filter_night: True,
strings.filter_full: show_full,
strings.filter_lowpop: True,
strings.filter_nonascii: False,
strings.filter_duplicate: False,
strings.filter_official: True,
strings.filter_nonascii: False,
strings.filter_lowpop: True,
strings.filter_unofficial: True,
strings.filter_duplicate: False,
strings.filter_modded: True,
}

View File

@ -48,14 +48,14 @@ def set_map_count() -> None:
return
conf = "/etc/sysctl.d/dayz.conf"
count = f"vm.max_map_count={MIN_COUNT}"
value = f"vm.max_map_count={MIN_COUNT}"
try:
1/0
1 / 0
msg = map_count.prompt.format(conf)
print(msg)
with tempfile.NamedTemporaryFile(delete=False) as f:
tmp = f.name
Path(tmp).write_text(count)
Path(tmp).write_text(value)
mv_cmd = f"sudo mv {tmp} {conf}"
reload_cmd = f"sudo sysctl -p {conf}"

View File

@ -33,15 +33,15 @@ class ButtonGrid(Gtk.Grid):
super().__init__(
halign=Gtk.Align.CENTER, column_spacing=5, column_homogeneous=True
)
row = 1
col = 0
self.controller = controller
self.emitter = controller.get_emitter()
self.checks: list[Gtk.CheckButton] = []
# TODO: use enumerated checks
flowbox = Gtk.FlowBox(
halign=Gtk.Align.CENTER, min_children_per_line=3, max_children_per_line=3
)
for check in defaults.keys():
checkbox = Gtk.CheckButton(label=check)
label = checkbox.get_child()
@ -51,14 +51,12 @@ class ButtonGrid(Gtk.Grid):
if defaults[check]:
checkbox.set_active(True)
col = col + 1
if col > 3:
row += 1
col = 1
self.attach(checkbox, col, row, 1, 1)
checkbox.connect("toggled", self._on_check_toggled)
flowbox.add(checkbox)
self.checks.append(checkbox)
self.add(flowbox)
def block_toggles(self, state: bool) -> None:
for check in self.checks:
self.controller.suppress_signal(

View File

@ -23,7 +23,7 @@ class AbortDialog(Gtk.MessageDialog):
self.format_secondary_text(msg)
ma = self.get_message_area()
label = ma.get_children()[1]
label = ma.get_children()[1] # type: ignore
label.set_justify(Gtk.Justification.CENTER)
aa = self.get_action_area()