11"""
22Do fun things with objects and classes
33"""
4- from collections import namedtuple
54import importlib
65
76none_type = type (None )
@@ -16,31 +15,13 @@ def __repr__(self):
1615
1716
1817missing_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" )
2520market_closed = named_object ("market closed" )
26-
2721fill_exceeds_trade = named_object ("fill too big for trade" )
2822
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" )
4425
4526
4627class status (named_object ):
@@ -50,13 +31,7 @@ class status(named_object):
5031success = status ("success" )
5132failure = status ("failure" )
5233
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
6035
6136
6237def get_methods (a_stage_object ) -> list :
@@ -67,7 +42,7 @@ def get_methods(a_stage_object) -> list:
6742 dir_list = [method_name for method_name in dir_list if method_name [0 ] != "_" ]
6843
6944 # remove special
70- special_list = ["log" , "name" , "parent" , "description" ]
45+ special_list = ["log" , "name" , "parent" , "description" , "data" ]
7146 dir_list = [
7247 method_name for method_name in dir_list if method_name not in special_list
7348 ]
@@ -219,8 +194,3 @@ def hasallattr(some_object, attrlist=[]):
219194
220195def get_class_name (class_object ):
221196 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