D106: fix
This commit is contained in:
@@ -63,6 +63,8 @@ class AbstractLogger(ABC):
|
|||||||
|
|
||||||
class JunitXMLLogger(AbstractLogger):
|
class JunitXMLLogger(AbstractLogger):
|
||||||
class TestCaseState:
|
class TestCaseState:
|
||||||
|
"""State tracking for individual test cases in JUnit XML reports."""
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self.stdout = ""
|
self.stdout = ""
|
||||||
self.stderr = ""
|
self.stderr = ""
|
||||||
|
|||||||
@@ -296,17 +296,23 @@ class BaseImplementation:
|
|||||||
|
|
||||||
class StatusNotifierImplementation(BaseImplementation):
|
class StatusNotifierImplementation(BaseImplementation):
|
||||||
class DBusProperty:
|
class DBusProperty:
|
||||||
|
"""Represents a D-Bus property with name, signature, and value."""
|
||||||
|
|
||||||
def __init__(self, name, signature, value) -> None:
|
def __init__(self, name, signature, value) -> None:
|
||||||
self.name = name
|
self.name = name
|
||||||
self.signature = signature
|
self.signature = signature
|
||||||
self.value = value
|
self.value = value
|
||||||
|
|
||||||
class DBusSignal:
|
class DBusSignal:
|
||||||
|
"""Represents a D-Bus signal with name and arguments."""
|
||||||
|
|
||||||
def __init__(self, name, args) -> None:
|
def __init__(self, name, args) -> None:
|
||||||
self.name = name
|
self.name = name
|
||||||
self.args = args
|
self.args = args
|
||||||
|
|
||||||
class DBusMethod:
|
class DBusMethod:
|
||||||
|
"""Represents a D-Bus method with arguments and callback."""
|
||||||
|
|
||||||
def __init__(self, name, in_args, out_args, callback) -> None:
|
def __init__(self, name, in_args, out_args, callback) -> None:
|
||||||
self.name = name
|
self.name = name
|
||||||
self.in_args = in_args
|
self.in_args = in_args
|
||||||
@@ -314,6 +320,8 @@ class StatusNotifierImplementation(BaseImplementation):
|
|||||||
self.callback = callback
|
self.callback = callback
|
||||||
|
|
||||||
class DBusService:
|
class DBusService:
|
||||||
|
"""Base class for D-Bus service implementations."""
|
||||||
|
|
||||||
def __init__(self, interface_name, object_path, bus_type) -> None:
|
def __init__(self, interface_name, object_path, bus_type) -> None:
|
||||||
self._interface_name = interface_name
|
self._interface_name = interface_name
|
||||||
self._object_path = object_path
|
self._object_path = object_path
|
||||||
@@ -438,6 +446,8 @@ class StatusNotifierImplementation(BaseImplementation):
|
|||||||
return GLib.Variant(prop.signature, prop.value)
|
return GLib.Variant(prop.signature, prop.value)
|
||||||
|
|
||||||
class DBusMenuService(DBusService):
|
class DBusMenuService(DBusService):
|
||||||
|
"""D-Bus service for menu management."""
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
super().__init__(
|
super().__init__(
|
||||||
interface_name="com.canonical.dbusmenu",
|
interface_name="com.canonical.dbusmenu",
|
||||||
@@ -516,6 +526,8 @@ class StatusNotifierImplementation(BaseImplementation):
|
|||||||
self._items[idx]["callback"]()
|
self._items[idx]["callback"]()
|
||||||
|
|
||||||
class StatusNotifierItemService(DBusService):
|
class StatusNotifierItemService(DBusService):
|
||||||
|
"""D-Bus service for status notifier items."""
|
||||||
|
|
||||||
def __init__(self, activate_callback) -> None:
|
def __init__(self, activate_callback) -> None:
|
||||||
super().__init__(
|
super().__init__(
|
||||||
interface_name="org.kde.StatusNotifierItem",
|
interface_name="org.kde.StatusNotifierItem",
|
||||||
@@ -737,6 +749,8 @@ class Win32Implementation(BaseImplementation):
|
|||||||
from ctypes import Structure
|
from ctypes import Structure
|
||||||
|
|
||||||
class WNDCLASSW(Structure):
|
class WNDCLASSW(Structure):
|
||||||
|
"""Windows class structure for window registration."""
|
||||||
|
|
||||||
from ctypes import CFUNCTYPE, wintypes
|
from ctypes import CFUNCTYPE, wintypes
|
||||||
|
|
||||||
LPFN_WND_PROC = CFUNCTYPE(
|
LPFN_WND_PROC = CFUNCTYPE(
|
||||||
@@ -760,6 +774,8 @@ class Win32Implementation(BaseImplementation):
|
|||||||
]
|
]
|
||||||
|
|
||||||
class MENUITEMINFOW(Structure):
|
class MENUITEMINFOW(Structure):
|
||||||
|
"""Windows menu item information structure."""
|
||||||
|
|
||||||
from ctypes import wintypes
|
from ctypes import wintypes
|
||||||
|
|
||||||
_fields_: ClassVar = [
|
_fields_: ClassVar = [
|
||||||
@@ -778,6 +794,8 @@ class Win32Implementation(BaseImplementation):
|
|||||||
]
|
]
|
||||||
|
|
||||||
class NOTIFYICONDATAW(Structure):
|
class NOTIFYICONDATAW(Structure):
|
||||||
|
"""Windows notification icon data structure."""
|
||||||
|
|
||||||
from ctypes import wintypes
|
from ctypes import wintypes
|
||||||
|
|
||||||
_fields_: ClassVar = [
|
_fields_: ClassVar = [
|
||||||
|
|||||||
Reference in New Issue
Block a user