mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-13 10:30:16 +00:00
operation: Drop type annotations on enum members
Type checkers will report errors when enum members have type annotations. https://typing.python.org/en/latest/spec/enums.html#defining-members Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
f4f417cbb6
commit
df8d41e7fb
@ -20,9 +20,9 @@ class Operation:
|
|||||||
class State(enum.Enum):
|
class State(enum.Enum):
|
||||||
"""Various states of an operation."""
|
"""Various states of an operation."""
|
||||||
|
|
||||||
WAITING: str = 'waiting'
|
WAITING = 'waiting'
|
||||||
RUNNING: str = 'running'
|
RUNNING = 'running'
|
||||||
COMPLETED: str = 'completed'
|
COMPLETED = 'completed'
|
||||||
|
|
||||||
def __init__(self, op_id: str, app_id: str, name: str, target: Callable,
|
def __init__(self, op_id: str, app_id: str, name: str, target: Callable,
|
||||||
args: list | None = None, kwargs: dict | None = None,
|
args: list | None = None, kwargs: dict | None = None,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user