mirror of
https://github.com/aclist/dztui.git
synced 2026-11-01 15:42:51 +01:00
chore: clear typehinting errors
This commit is contained in:
1 parent
90b1c875df
commit
7994bf988c
4 files changed
+14
-16
No files matched your search
@@ -21,11 +21,11 @@ class FilterManager:
|
|||||||
strings.filter_3pp: True,
|
strings.filter_3pp: True,
|
||||||
strings.filter_night: True,
|
strings.filter_night: True,
|
||||||
strings.filter_full: show_full,
|
strings.filter_full: show_full,
|
||||||
strings.filter_lowpop: True,
|
|
||||||
strings.filter_nonascii: False,
|
|
||||||
strings.filter_duplicate: False,
|
|
||||||
strings.filter_official: True,
|
strings.filter_official: True,
|
||||||
|
strings.filter_nonascii: False,
|
||||||
|
strings.filter_lowpop: True,
|
||||||
strings.filter_unofficial: True,
|
strings.filter_unofficial: True,
|
||||||
|
strings.filter_duplicate: False,
|
||||||
strings.filter_modded: True,
|
strings.filter_modded: True,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,14 +48,14 @@ def set_map_count() -> None:
|
|||||||
return
|
return
|
||||||
|
|
||||||
conf = "/etc/sysctl.d/dayz.conf"
|
conf = "/etc/sysctl.d/dayz.conf"
|
||||||
count = f"vm.max_map_count={MIN_COUNT}"
|
value = f"vm.max_map_count={MIN_COUNT}"
|
||||||
try:
|
try:
|
||||||
1/0
|
1 / 0
|
||||||
msg = map_count.prompt.format(conf)
|
msg = map_count.prompt.format(conf)
|
||||||
print(msg)
|
print(msg)
|
||||||
with tempfile.NamedTemporaryFile(delete=False) as f:
|
with tempfile.NamedTemporaryFile(delete=False) as f:
|
||||||
tmp = f.name
|
tmp = f.name
|
||||||
Path(tmp).write_text(count)
|
Path(tmp).write_text(value)
|
||||||
|
|
||||||
mv_cmd = f"sudo mv {tmp} {conf}"
|
mv_cmd = f"sudo mv {tmp} {conf}"
|
||||||
reload_cmd = f"sudo sysctl -p {conf}"
|
reload_cmd = f"sudo sysctl -p {conf}"
|
||||||
|
|||||||
@@ -33,15 +33,15 @@ class ButtonGrid(Gtk.Grid):
|
|||||||
super().__init__(
|
super().__init__(
|
||||||
halign=Gtk.Align.CENTER, column_spacing=5, column_homogeneous=True
|
halign=Gtk.Align.CENTER, column_spacing=5, column_homogeneous=True
|
||||||
)
|
)
|
||||||
row = 1
|
|
||||||
col = 0
|
|
||||||
|
|
||||||
self.controller = controller
|
self.controller = controller
|
||||||
self.emitter = controller.get_emitter()
|
self.emitter = controller.get_emitter()
|
||||||
|
|
||||||
self.checks: list[Gtk.CheckButton] = []
|
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():
|
for check in defaults.keys():
|
||||||
checkbox = Gtk.CheckButton(label=check)
|
checkbox = Gtk.CheckButton(label=check)
|
||||||
label = checkbox.get_child()
|
label = checkbox.get_child()
|
||||||
@@ -51,14 +51,12 @@ class ButtonGrid(Gtk.Grid):
|
|||||||
if defaults[check]:
|
if defaults[check]:
|
||||||
checkbox.set_active(True)
|
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)
|
checkbox.connect("toggled", self._on_check_toggled)
|
||||||
|
flowbox.add(checkbox)
|
||||||
self.checks.append(checkbox)
|
self.checks.append(checkbox)
|
||||||
|
|
||||||
|
self.add(flowbox)
|
||||||
|
|
||||||
def block_toggles(self, state: bool) -> None:
|
def block_toggles(self, state: bool) -> None:
|
||||||
for check in self.checks:
|
for check in self.checks:
|
||||||
self.controller.suppress_signal(
|
self.controller.suppress_signal(
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class AbortDialog(Gtk.MessageDialog):
|
|||||||
self.format_secondary_text(msg)
|
self.format_secondary_text(msg)
|
||||||
|
|
||||||
ma = self.get_message_area()
|
ma = self.get_message_area()
|
||||||
label = ma.get_children()[1]
|
label = ma.get_children()[1] # type: ignore
|
||||||
label.set_justify(Gtk.Justification.CENTER)
|
label.set_justify(Gtk.Justification.CENTER)
|
||||||
|
|
||||||
aa = self.get_action_area()
|
aa = self.get_action_area()
|
||||||
|
|||||||
Reference in new issue
Block a user