mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 14:42:54 +01:00
chore: deprecation warnings
This commit is contained in:
1 parent
93c5acb66d
commit
0306cc4380
3 files changed
+6
-10
No files matched your search
@@ -2,6 +2,7 @@ import argparse
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import warnings
|
||||||
|
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
@@ -70,6 +71,8 @@ def main() -> None:
|
|||||||
uninstall()
|
uninstall()
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
if args.developers is True:
|
||||||
|
warnings.filterwarnings("default", category=DeprecationWarning)
|
||||||
version = get_version()
|
version = get_version()
|
||||||
set_locale()
|
set_locale()
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from warnings import deprecated
|
from warnings import deprecated
|
||||||
from typing import Self, Union, TYPE_CHECKING
|
from typing import Self, Union, TYPE_CHECKING
|
||||||
|
|
||||||
from dzgui.const.enum import NotebookPage, Preferences, RowType
|
from dzgui.const.enum import NotebookPage, RowType
|
||||||
from dzgui.util import strings
|
from dzgui.util import strings
|
||||||
|
|
||||||
import gi
|
import gi
|
||||||
@@ -142,11 +142,4 @@ class Statusbar(Gtk.Grid):
|
|||||||
@deprecated("use controller")
|
@deprecated("use controller")
|
||||||
def format_metadata(self, row: "RowType") -> str:
|
def format_metadata(self, row: "RowType") -> str:
|
||||||
prefix = row.dict["tooltip"]
|
prefix = row.dict["tooltip"]
|
||||||
|
return prefix
|
||||||
if row == RowType.QUICK_CONNECT or row == RowType.CHNG_FAV:
|
|
||||||
label = self.controller.query_config(Preferences.FAV_LBL)
|
|
||||||
if len(label) < 1:
|
|
||||||
label = "unset"
|
|
||||||
return f"{prefix} ({label})"
|
|
||||||
else:
|
|
||||||
return prefix
|
|
||||||
@@ -135,7 +135,7 @@ class ServerTreeView(TreeView):
|
|||||||
continue
|
continue
|
||||||
if title == "IP":
|
if title == "IP":
|
||||||
continue
|
continue
|
||||||
label = Gtk.Label(title)
|
label = Gtk.Label(label=title)
|
||||||
pango = label.get_layout()
|
pango = label.get_layout()
|
||||||
size = pango.get_pixel_size()
|
size = pango.get_pixel_size()
|
||||||
if size.width > 50:
|
if size.width > 50:
|
||||||
|
|||||||
Reference in new issue
Block a user