1
1
"""
2
2
Do fun things with objects and classes
3
3
"""
4
- from collections import namedtuple
5
4
import importlib
6
5
7
6
none_type = type (None )
@@ -16,31 +15,13 @@ def __repr__(self):
16
15
17
16
18
17
missing_instrument = named_object ("missing instrument" )
19
-
20
- missing_order = named_object ("missing order" )
21
- locked_order = named_object ("locked order" )
22
- duplicate_order = named_object ("duplicate order" )
23
- zero_order = named_object ("zero order" )
24
-
18
+ missing_file = named_object ("missing file" )
19
+ missing_data = named_object ("missing data" )
25
20
market_closed = named_object ("market closed" )
26
-
27
21
fill_exceeds_trade = named_object ("fill too big for trade" )
28
22
29
- order_is_in_status_finished = named_object ("order status is modification close" )
30
- order_is_in_status_modified = named_object ("order status is being modified" )
31
- order_is_in_status_not_modified = named_object ("order status is not currently modified" )
32
- order_is_in_status_reject_modification = named_object (
33
- "order status is modification rejected"
34
- )
35
-
36
- no_order_id = named_object ("no order ID" )
37
- no_children = named_object ("no_children" )
38
- no_parent = named_object ("no parent" )
39
-
40
- rolling_cant_trade = named_object ("rolling can't trade" )
41
- ROLL_PSEUDO_STRATEGY = "_ROLL_PSEUDO_STRATEGY"
42
-
43
- not_updated = named_object ("not updated" )
23
+ arg_not_supplied = named_object ("arg not supplied" )
24
+ user_exit = named_object ("exit" )
44
25
45
26
46
27
class status (named_object ):
@@ -50,13 +31,7 @@ class status(named_object):
50
31
success = status ("success" )
51
32
failure = status ("failure" )
52
33
53
- arg_not_supplied = named_object ("arg not supplied" )
54
- user_exit = named_object ("exit" )
55
-
56
- table = namedtuple ("table" , "Heading Body" )
57
- header = namedtuple ("header" , "Heading" )
58
- body_text = namedtuple ("bodytext" , "Text" )
59
- figure = namedtuple ("figure" , "pdf_filename" )
34
+ ## FIXME HERE
60
35
61
36
62
37
def get_methods (a_stage_object ) -> list :
@@ -67,7 +42,7 @@ def get_methods(a_stage_object) -> list:
67
42
dir_list = [method_name for method_name in dir_list if method_name [0 ] != "_" ]
68
43
69
44
# remove special
70
- special_list = ["log" , "name" , "parent" , "description" ]
45
+ special_list = ["log" , "name" , "parent" , "description" , "data" ]
71
46
dir_list = [
72
47
method_name for method_name in dir_list if method_name not in special_list
73
48
]
@@ -219,8 +194,3 @@ def hasallattr(some_object, attrlist=[]):
219
194
220
195
def get_class_name (class_object ):
221
196
return class_object .__name__
222
-
223
-
224
- missing_file = named_object ("missing file" )
225
- missing_data = named_object ("missing data" )
226
- ALL_ROLL_INSTRUMENTS = "ALL"
0 commit comments