mirror of
https://github.com/aclist/dztui.git
synced 2026-08-26 01:37:18 +02:00
chore: clear linting errors
This commit is contained in:
parent
6e8a78cf3e
commit
3ea2afabed
@ -19,11 +19,10 @@ class Changelog(Gtk.Box):
|
||||
try:
|
||||
changelog = resources.read_text(APP_NAME_LOWER, "data/CHANGELOG.md")
|
||||
except OSError as e:
|
||||
changelog = "Error: Failed to read changelog"
|
||||
# TODO: log error
|
||||
changelog = "Error: Failed to read changelog"
|
||||
|
||||
# TODO: should long text be wrapped?
|
||||
|
||||
formatted = format_pango(changelog)
|
||||
self.changelog_label = Gtk.Label(valign=Gtk.Align.START, margin=15)
|
||||
self.changelog_label.set_markup(formatted)
|
||||
|
||||
@ -1,9 +1,3 @@
|
||||
import typing
|
||||
|
||||
import gi # noqa E402
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import Gtk
|
||||
|
||||
from dataclasses import fields
|
||||
from typing import Union, TYPE_CHECKING
|
||||
|
||||
@ -11,6 +5,10 @@ from dzgui.const.enum import NotebookPage
|
||||
from dzgui.util.strings import developers
|
||||
from dzgui.util.css import add_class
|
||||
|
||||
import gi # noqa E402
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import Gtk # noqa E402
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from dzgui.controllers.mc import Controller
|
||||
from dzgui.config.userprefs import UserPrefs
|
||||
|
||||
@ -1,18 +1,17 @@
|
||||
import gi
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import Gtk, Gdk # noqa
|
||||
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from dzgui.api import pefile as PeFile
|
||||
from dzgui.api.steam import find_user_id
|
||||
from dzgui.config import query
|
||||
from dzgui.util import strings, css, open_links
|
||||
|
||||
from dzgui.views.components.label import LeftLabel
|
||||
from dzgui.views.components.eventbox import InfoEventBox
|
||||
from dzgui.views.components.icon import Icon
|
||||
from dzgui.views.components.web_button import WebButton
|
||||
from dzgui.views.dialogs.link_dialog import WorkshopLinkDialog
|
||||
|
||||
from dzgui.util import strings, css, open_links
|
||||
from dzgui.const.enum import Preferences, RowType, Popup
|
||||
from dzgui.const.enum import Preferences, Popup
|
||||
from dzgui.const.endpoints import STEAM_API_SETUP, BM_API_SETUP
|
||||
from dzgui.const.constants import (
|
||||
APPID_DAYZ,
|
||||
@ -29,9 +28,9 @@ from dzgui.const.constants import (
|
||||
VIEW_REVEAL,
|
||||
)
|
||||
|
||||
from dzgui.config import query
|
||||
from dzgui.api import pefile as PeFile
|
||||
from dzgui.api.steam import find_user_id
|
||||
import gi
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import Gtk, Gdk # noqa
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from dzgui.controllers.mc import Controller
|
||||
@ -264,7 +263,6 @@ class Options(Gtk.Box):
|
||||
) -> None:
|
||||
old_text = self.controller.query_config(enum)
|
||||
button.set_sensitive(False)
|
||||
wait_msg = strings.dialog.working
|
||||
match enum:
|
||||
case Preferences.NAME:
|
||||
value = entry.get_text().strip()
|
||||
@ -315,10 +313,6 @@ class Options(Gtk.Box):
|
||||
def _on_radio_toggled(
|
||||
self, button: Gtk.RadioButton, context: Preferences
|
||||
) -> None:
|
||||
AppNav = self.controller.get_mediator()
|
||||
|
||||
state = button.get_group()[0].get_active()
|
||||
|
||||
try:
|
||||
self.controller.toggle_config(context)
|
||||
except Exception:
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
from dzgui.util.format import format_pango
|
||||
from dzgui.util.strings import thanks
|
||||
|
||||
import gi # noqa E402
|
||||
import gi
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Gtk # noqa E402
|
||||
|
||||
"""
|
||||
Special thanks page recognizing contributors to the project in alpha-order
|
||||
|
||||
Loading…
Reference in New Issue
Block a user