@@ -11,13 +11,13 @@ class FormBuilder:
1111 def __init__ (self ):
1212
1313 # Contents will be written out as the form
14- self .form = dict (
15- ui = OrderedDict (),
16- form = OrderedDict (
14+ self .form = {
15+ "ui" : OrderedDict (),
16+ " form" : OrderedDict (
1717 type = "object" ,
1818 properties = OrderedDict ()
1919 )
20- )
20+ }
2121
2222 # Used to make sure that no keys are repeated
2323 self .used_keys = set ()
@@ -28,7 +28,7 @@ def __init__(self):
2828 # Store the params which will be populated either by:
2929 # a) While building the form, the optional `test_value` field will be used
3030 # b) While running non-interactively, it will use the values read from $PW_NOTEBOOK_DATA
31- self .params = dict ()
31+ self .params = {}
3232
3333 def add_param (
3434 self ,
@@ -65,7 +65,7 @@ def add_param(
6565 assert type in self .PARAM_TYPES , msg
6666
6767 # Start building the item in the form
68- item = dict ( type = type )
68+ item = { " type" : type }
6969
7070 # Populate the test value
7171 if test_value is not None :
@@ -109,11 +109,11 @@ def add_section(self, title: str = None, description: str = None):
109109 self .pointer = section_name
110110
111111 # Add the section
112- self .form ['form' ]['properties' ][section_name ] = dict (
113- title = title ,
114- description = description ,
115- properties = OrderedDict ()
116- )
112+ self .form ['form' ]['properties' ][section_name ] = {
113+ " title" : title ,
114+ " description" : description ,
115+ " properties" : OrderedDict ()
116+ }
117117
118118 def _new_section_name (self ):
119119 """Internal method to pick a new section name."""
0 commit comments