Add type hints to auto_repairs and auto_setup
This commit is contained in:
parent
386a8b7000
commit
a253fdc80f
2 changed files with 20 additions and 6 deletions
|
|
@ -1,6 +1,8 @@
|
|||
"""WizardKit: Auto Repair Tool"""
|
||||
# vim: sts=2 sw=2 ts=2
|
||||
|
||||
from typing import Any
|
||||
|
||||
import wk
|
||||
|
||||
|
||||
|
|
@ -8,9 +10,14 @@ import wk
|
|||
REBOOT_STR = wk.ui.ansi.color_string('Reboot', 'YELLOW')
|
||||
class MenuEntry():
|
||||
"""Simple class to allow cleaner code below."""
|
||||
def __init__(self, name, function=None, selected=True, **kwargs):
|
||||
self.name = name
|
||||
self.details = {
|
||||
def __init__(
|
||||
self,
|
||||
name: str,
|
||||
function: str | None = None,
|
||||
selected: bool = True,
|
||||
**kwargs):
|
||||
self.name: str = name
|
||||
self.details: dict[str, Any] = {
|
||||
'Function': function,
|
||||
'Selected': selected,
|
||||
**kwargs,
|
||||
|
|
|
|||
|
|
@ -1,15 +1,22 @@
|
|||
"""WizardKit: Auto System Setup Tool"""
|
||||
# vim: sts=2 sw=2 ts=2
|
||||
|
||||
from typing import Any
|
||||
|
||||
import wk
|
||||
|
||||
|
||||
# Classes
|
||||
class MenuEntry():
|
||||
"""Simple class to allow cleaner code below."""
|
||||
def __init__(self, name, function=None, selected=True, **kwargs):
|
||||
self.name = name
|
||||
self.details = {
|
||||
def __init__(
|
||||
self,
|
||||
name: str,
|
||||
function: str | None = None,
|
||||
selected: bool = True,
|
||||
**kwargs):
|
||||
self.name: str = name
|
||||
self.details: dict[str, Any] = {
|
||||
'Function': function,
|
||||
'Selected': selected,
|
||||
**kwargs,
|
||||
|
|
|
|||
Loading…
Reference in a new issue