-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathtask.pyi
More file actions
46 lines (41 loc) · 1.48 KB
/
task.pyi
File metadata and controls
46 lines (41 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from typing import List, Optional, Type, TypeVar, Union
from typing_extensions import Literal
from pythonanywhere.api.schedule import Schedule
T = TypeVar("T", bound="Task")
class Task:
command: Optional[str] = ...
hour: Optional[int] = ...
minute: Optional[int] = ...
interval: Optional[Literal["daily", "hourly"]] = ...
enabled: Optional[bool] = ...
task_id: Optional[int] = ...
can_enable: Optional[bool] = ...
expiry: Optional[str] = ...
extend_url: Optional[str] = ...
logfile: Optional[str] = ...
printable_time: Optional[str] = ...
url: Optional[str] = ...
user: Optional[str] = ...
schedule: Schedule = ...
def __init__(self) -> None: ...
def __repr__(self) -> str: ...
@classmethod
def from_id(cls: Type[T], task_id: int) -> T: ...
@classmethod
def to_be_created(
cls: Type[T], *, command: str, minute: int, hour: Optional[int], disabled: bool,
) -> T: ...
@classmethod
def from_api_specs(cls: Type[T], specs: dict) -> T: ...
def create_schedule(self) -> None: ...
def delete_schedule(self) -> None: ...
def update_specs(self, specs: dict) -> None: ...
def update_schedule(self, params: dict, *, porcelain: bool) -> None:
def make_spec_str(
key: str, old_spec: Union[str, int], new_spec: Union[str, int]
) -> str: ...
def make_msg(join_with: str) -> str: ...
...
class TaskList:
tasks = List[Task]
def __init__(self) -> None: ...