1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 11:01:45 +00:00

action typing

This commit is contained in:
deadc0de6
2024-01-18 22:26:36 +01:00
parent 3a336dc8a8
commit 377b4770f6

View File

@@ -23,7 +23,7 @@ class Cmd(DictParser):
eq_ignore = ('log',)
descr = 'command'
def __init__(self, key: str, action: str):
def __init__(self, key: str, action: str) -> None:
"""constructor
@key: action key
@action: action string
@@ -121,7 +121,7 @@ class Action(Cmd):
post = 'post'
descr = 'action'
def __init__(self, key: str, kind: str, action: str):
def __init__(self, key: str, kind: str, action: str) -> None:
"""constructor
@key: action key
@kind: type of action (pre or post)
@@ -131,7 +131,7 @@ class Action(Cmd):
self.kind = kind
self.args = []
def copy(self, args: List[str]):
def copy(self, args: List[str]) -> "Action":
"""return a copy of this object with arguments"""
action = Action(self.key, self.kind, self.action)
action.args = args