@@ -140,52 +140,58 @@ def _check(d):
140
140
)
141
141
142
142
PEOPLE_SCHEMA = Schema (
143
- {
144
- And (github_username , not_data_key ): And (
145
- {
146
- 'name' : not_empty_string ,
147
- 'email' : valid_email ,
148
- 'agreement' : valid_agreement ,
149
- Optional ('institution' ): not_empty_string ,
150
- Optional ('is_robot' ): True ,
151
- Optional ('jira' ): not_empty_string ,
152
- Optional ('comments' ): [str ],
153
- Optional ('other_emails' ): [valid_email ],
154
- Optional ('before' ): {
155
- datetime .date : And (
156
- {
157
- Optional ('agreement' ): valid_agreement ,
158
- Optional ('institution' ): not_empty_string ,
159
- Optional ('comments' ): [str ],
160
- Optional ('committer' ): COMMITTER_SCHEMA ,
161
- },
162
- check_institution ,
163
- ),
143
+ Or (
144
+ {
145
+ And (github_username , not_data_key ): And (
146
+ {
147
+ 'name' : not_empty_string ,
148
+ 'email' : valid_email ,
149
+ 'agreement' : valid_agreement ,
150
+ Optional ('institution' ): not_empty_string ,
151
+ Optional ('is_robot' ): True ,
152
+ Optional ('jira' ): not_empty_string ,
153
+ Optional ('comments' ): [str ],
154
+ Optional ('other_emails' ): [valid_email ],
155
+ Optional ('before' ): {
156
+ datetime .date : And (
157
+ {
158
+ Optional ('agreement' ): valid_agreement ,
159
+ Optional ('institution' ): not_empty_string ,
160
+ Optional ('comments' ): [str ],
161
+ Optional ('committer' ): COMMITTER_SCHEMA ,
162
+ },
163
+ check_institution ,
164
+ ),
165
+ },
166
+ Optional ('beta' ): bool ,
167
+ Optional ('contractor' ): bool ,
168
+ Optional ('committer' ): COMMITTER_SCHEMA ,
169
+ Optional ('email_ok' ): bool ,
164
170
},
165
- Optional ('beta' ): bool ,
166
- Optional ('contractor' ): bool ,
167
- Optional ('committer' ): COMMITTER_SCHEMA ,
168
- Optional ('email_ok' ): bool ,
169
- },
170
- check_institution ,
171
- ),
172
- }
171
+ check_institution ,
172
+ ),
173
+ },
174
+ {},
175
+ ),
173
176
)
174
177
175
178
ORGS_SCHEMA = Schema (
176
- {
177
- str : {
178
- Optional ("name" ): not_empty_string ,
179
- "agreement" : Or ("institution" , "none" ),
180
- Optional ("contractor" ): bool ,
181
- Optional ("committer" ): bool ,
182
- Optional ("internal-ghorgs" ): [str ],
183
- Optional (Or ("contact" , "contact1" , "contact2" )): {
184
- "name" : not_empty_string ,
185
- "email" : valid_email ,
179
+ Or (
180
+ {
181
+ str : {
182
+ Optional ("name" ): not_empty_string ,
183
+ "agreement" : Or ("institution" , "none" ),
184
+ Optional ("contractor" ): bool ,
185
+ Optional ("committer" ): bool ,
186
+ Optional ("internal-ghorgs" ): [str ],
187
+ Optional (Or ("contact" , "contact1" , "contact2" )): {
188
+ "name" : not_empty_string ,
189
+ "email" : valid_email ,
190
+ },
186
191
},
187
192
},
188
- }
193
+ {},
194
+ )
189
195
)
190
196
191
197
@@ -194,19 +200,22 @@ def color(s):
194
200
195
201
196
202
LABELS_SCHEMA = Schema (
197
- {
198
- str : Or (
199
- # A label we don't want:
200
- {
201
- "delete" : True ,
202
- },
203
- # A label we want:
204
- {
205
- "color" : color ,
206
- Optional ("description" ): str ,
207
- },
208
- ),
209
- },
203
+ Or (
204
+ {
205
+ str : Or (
206
+ # A label we don't want:
207
+ {
208
+ "delete" : True ,
209
+ },
210
+ # A label we want:
211
+ {
212
+ "color" : color ,
213
+ Optional ("description" ): str ,
214
+ },
215
+ ),
216
+ },
217
+ {},
218
+ ),
210
219
)
211
220
212
221
0 commit comments