File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
tableauserverclient/models Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change 1
- from typing import List
1
+ from datetime import datetime
2
+ from typing import List , Optional
2
3
3
4
from defusedxml .ElementTree import fromstring
4
5
@@ -21,14 +22,14 @@ class Type:
21
22
22
23
def __init__ (
23
24
self ,
24
- id_ ,
25
- task_type ,
26
- priority ,
27
- consecutive_failed_count = 0 ,
28
- schedule_id = None ,
29
- schedule_item = None ,
30
- last_run_at = None ,
31
- target = None ,
25
+ id_ : str ,
26
+ task_type : str ,
27
+ priority : int ,
28
+ consecutive_failed_count : int = 0 ,
29
+ schedule_id : Optional [ str ] = None ,
30
+ schedule_item : Optional [ str ] = None ,
31
+ last_run_at : Optional [ datetime ] = None ,
32
+ target : Optional [ Target ] = None ,
32
33
):
33
34
self .id = id_
34
35
self .task_type = task_type
@@ -39,7 +40,7 @@ def __init__(
39
40
self .last_run_at = last_run_at
40
41
self .target = target
41
42
42
- def __repr__ (self ):
43
+ def __repr__ (self ) -> str :
43
44
return (
44
45
"<Task#{id} {task_type} pri({priority}) failed({consecutive_failed_count}) schedule_id({"
45
46
"schedule_id}) target({target})>" .format (** self .__dict__ )
You can’t perform that action at this time.
0 commit comments