28
28
"optionalSignature(shape)" ,
29
29
"\n " .join (
30
30
[
31
- "dict with keys: 'checked', 'children', 'customData', 'disabled', 'label', 'primaryText', 'secondaryText', 'style', 'value'." ,
32
- "Those keys have the following types:\n " ,
33
- " - checked (boolean; optional)\n " ,
34
- " - children (a list of or a singular dash component, string or number; optional)\n " ,
31
+ "dict with keys: \n " ,
32
+ " - checked (boolean; optional) \n " ,
33
+ " - children (a list of or a singular dash component, string or number; optional) \n " ,
35
34
" - customData (bool | number | str | dict | list; required):\n "
36
- " A test description. \n " ,
37
- " - disabled (boolean; optional)\n " ,
38
- " - label (string; optional)\n " ,
35
+ " A test description. \n " ,
36
+ " - disabled (boolean; optional) \n " ,
37
+ " - label (string; optional) \n " ,
39
38
" - primaryText (string; required):\n "
40
- " Another test description. \n " ,
41
- " - secondaryText (string; optional)\n " ,
42
- " - style (dict; optional)\n " ,
39
+ " Another test description. \n " ,
40
+ " - secondaryText (string; optional) \n " ,
41
+ " - style (dict; optional) \n " ,
43
42
" - value (bool | number | str | dict | list; required)" ,
44
43
]
45
44
),
48
47
"requiredNested" ,
49
48
"\n " .join (
50
49
[
51
- "dict with keys: 'customData', 'value'." ,
52
- "Those keys have the following types:\n " ,
50
+ "dict with keys: \n " ,
53
51
" - customData (dict; required) \n \n "
54
- " `customData` is a dict with keys: 'checked', 'children', 'customData', 'disabled', 'label', 'primaryText', 'secondaryText', 'style', 'value'." ,
55
- " Those keys have the following types:\n " ,
56
- " - checked (boolean; optional)\n " ,
57
- " - children (a list of or a singular dash component, string or number; optional)\n " ,
58
- " - customData (bool | number | str | dict | list; required)\n " ,
59
- " - disabled (boolean; optional)\n " ,
60
- " - label (string; optional)\n " ,
61
- " - primaryText (string; required)\n " ,
62
- " - secondaryText (string; optional)\n " ,
63
- " - style (dict; optional)\n " ,
64
- " - value (bool | number | str | dict | list; required)\n " ,
52
+ " `customData` is a dict with keys: \n " ,
53
+ " - checked (boolean; optional) \n " ,
54
+ " - children (a list of or a singular dash component, string or number; optional) \n " ,
55
+ " - customData (bool | number | str | dict | list; required) \n " ,
56
+ " - disabled (boolean; optional) \n " ,
57
+ " - label (string; optional) \n " ,
58
+ " - primaryText (string; required) \n " ,
59
+ " - secondaryText (string; optional) \n " ,
60
+ " - style (dict; optional) \n " ,
61
+ " - value (bool | number | str | dict | list; required) \n " ,
65
62
" - value (bool | number | str | dict | list; required)" ,
66
63
]
67
64
),
90
87
"- optionalSignature(shape) (dict; optional):" ,
91
88
" This is a test of an object's shape. " ,
92
89
"" ,
93
- " `optionalSignature(shape)` is a dict with keys: 'checked', 'children', 'customData', 'disabled', 'label', 'primaryText', 'secondaryText', 'style', 'value'." ,
94
- "Those keys have the following types:" ,
90
+ " `optionalSignature(shape)` is a dict with keys: " ,
95
91
"" ,
96
- " - checked (boolean; optional)" ,
92
+ " - checked (boolean; optional) " ,
97
93
"" ,
98
- " - children (a list of or a singular dash component, string or number; optional)" ,
94
+ " - children (a list of or a singular dash component, string or number; optional) " ,
99
95
"" ,
100
96
" - customData (bool | number | str | dict | list; required):" ,
101
- " A test description. " ,
97
+ " A test description. " ,
102
98
"" ,
103
- " - disabled (boolean; optional)" ,
99
+ " - disabled (boolean; optional) " ,
104
100
"" ,
105
- " - label (string; optional)" ,
101
+ " - label (string; optional) " ,
106
102
"" ,
107
103
" - primaryText (string; required):" ,
108
- " Another test description. " ,
104
+ " Another test description. " ,
109
105
"" ,
110
- " - secondaryText (string; optional)" ,
106
+ " - secondaryText (string; optional) " ,
111
107
"" ,
112
- " - style (dict; optional)" ,
108
+ " - style (dict; optional) " ,
113
109
"" ,
114
110
" - value (bool | number | str | dict | list; required)" ,
115
111
"" ,
118
114
"" ,
119
115
"- requiredNested (dict; required) " ,
120
116
"" ,
121
- " `requiredNested` is a dict with keys: 'customData', 'value'." ,
122
- "Those keys have the following types:" ,
117
+ " `requiredNested` is a dict with keys: " ,
123
118
"" ,
124
119
" - customData (dict; required) " ,
125
120
"" ,
126
- " `customData` is a dict with keys: 'checked', 'children', 'customData', 'disabled', 'label', 'primaryText', 'secondaryText', 'style', 'value'." ,
127
- " Those keys have the following types:" ,
121
+ " `customData` is a dict with keys: " ,
128
122
"" ,
129
- " - checked (boolean; optional)" ,
123
+ " - checked (boolean; optional) " ,
130
124
"" ,
131
- " - children (a list of or a singular dash component, string or number; optional)" ,
125
+ " - children (a list of or a singular dash component, string or number; optional) " ,
132
126
"" ,
133
- " - customData (bool | number | str | dict | list; required)" ,
127
+ " - customData (bool | number | str | dict | list; required) " ,
134
128
"" ,
135
- " - disabled (boolean; optional)" ,
129
+ " - disabled (boolean; optional) " ,
136
130
"" ,
137
- " - label (string; optional)" ,
131
+ " - label (string; optional) " ,
138
132
"" ,
139
- " - primaryText (string; required)" ,
133
+ " - primaryText (string; required) " ,
140
134
"" ,
141
- " - secondaryText (string; optional)" ,
135
+ " - secondaryText (string; optional) " ,
142
136
"" ,
143
- " - style (dict; optional)" ,
137
+ " - style (dict; optional) " ,
144
138
"" ,
145
- " - value (bool | number | str | dict | list; required)" ,
139
+ " - value (bool | number | str | dict | list; required) " ,
146
140
"" ,
147
141
" - value (bool | number | str | dict | list; required)" ,
148
142
"" ,
@@ -168,6 +162,7 @@ def test_docstring(load_test_flow_metadata_json):
168
162
load_test_flow_metadata_json ["props" ],
169
163
load_test_flow_metadata_json ["description" ],
170
164
)
165
+ print (docstring .splitlines ())
171
166
prohibit_events (load_test_flow_metadata_json ["props" ]),
172
167
assert not list (unified_diff (expected_doc , docstring .splitlines ()))
173
168
0 commit comments