File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 55from collections import OrderedDict
66
77schema_cache = None
8- show_warnings = True
98
109
11- def disable_warnings ():
12- """
13- Turn off warnings to console. These can get very verbose.
14- """
15- show_warnings = False
16-
1710class ReadOnlyDict (OrderedDict ):
1811 def __missing__ (self , key ):
1912 raise KeyError (f"'{ key } ' not found in this object. List of keys = { self .keys ()} ." )
@@ -111,7 +104,7 @@ def to_file(self, config_name="config.json"):
111104 with open ( config_name , "w" ) as config_file :
112105 json .dump ( config , config_file , indent = 4 , sort_keys = True )
113106
114- def finalize (self ):
107+ def finalize (self , show_warnings : bool = False ):
115108 """
116109 Remove all params that are disabled by depends-on param being off and schema node.
117110 """
@@ -212,7 +205,8 @@ def get_schema( schema_path=None ):
212205 schema = schema_cache
213206 return schema
214207
215- def get_class_with_defaults ( classname , schema_path = None ):
208+
209+ def get_class_with_defaults (classname , schema_path = None , show_warnings : bool = False ):
216210 """
217211 Returns the default config for a datatype in the schema.
218212 """
You can’t perform that action at this time.
0 commit comments