mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-15 05:50:07 +00:00
action typing
This commit is contained in:
@@ -23,7 +23,7 @@ class Cmd(DictParser):
|
|||||||
eq_ignore = ('log',)
|
eq_ignore = ('log',)
|
||||||
descr = 'command'
|
descr = 'command'
|
||||||
|
|
||||||
def __init__(self, key: str, action: str):
|
def __init__(self, key: str, action: str) -> None:
|
||||||
"""constructor
|
"""constructor
|
||||||
@key: action key
|
@key: action key
|
||||||
@action: action string
|
@action: action string
|
||||||
@@ -121,7 +121,7 @@ class Action(Cmd):
|
|||||||
post = 'post'
|
post = 'post'
|
||||||
descr = 'action'
|
descr = 'action'
|
||||||
|
|
||||||
def __init__(self, key: str, kind: str, action: str):
|
def __init__(self, key: str, kind: str, action: str) -> None:
|
||||||
"""constructor
|
"""constructor
|
||||||
@key: action key
|
@key: action key
|
||||||
@kind: type of action (pre or post)
|
@kind: type of action (pre or post)
|
||||||
@@ -131,7 +131,7 @@ class Action(Cmd):
|
|||||||
self.kind = kind
|
self.kind = kind
|
||||||
self.args = []
|
self.args = []
|
||||||
|
|
||||||
def copy(self, args: List[str]):
|
def copy(self, args: List[str]) -> "Action":
|
||||||
"""return a copy of this object with arguments"""
|
"""return a copy of this object with arguments"""
|
||||||
action = Action(self.key, self.kind, self.action)
|
action = Action(self.key, self.kind, self.action)
|
||||||
action.args = args
|
action.args = args
|
||||||
|
|||||||
Reference in New Issue
Block a user