8217:385f60c94548 | 8218:7c09585bd960 |
---|---|
178 | 178 |
179 if d: | 179 if d: |
180 yield start, d | 180 yield start, d |
181 | 181 |
182 # in case it has additional fields | 182 # in case it has additional fields |
183 d = super(DictResolver, self).getDictionary(var) | 183 d = super().getDictionary(var) |
184 yield -1, d | 184 yield -1, d |
185 | 185 |
186 while True: | 186 while True: |
187 yield -2, {} | 187 yield -2, {} |
188 | 188 |
235 | 235 |
236 if d: | 236 if d: |
237 yield start, d | 237 yield start, d |
238 | 238 |
239 # in case it has additional fields | 239 # in case it has additional fields |
240 d = super(ListResolver, self).getDictionary(var) | 240 d = super().getDictionary(var) |
241 yield -1, d | 241 yield -1, d |
242 | 242 |
243 while True: | 243 while True: |
244 yield -2, {} | 244 yield -2, {} |
245 | 245 |
262 @param attribute id of the value to extract | 262 @param attribute id of the value to extract |
263 @type str | 263 @type str |
264 @return value of the attribute | 264 @return value of the attribute |
265 @rtype any | 265 @rtype any |
266 """ | 266 """ |
267 return super(DictViewResolver, self).resolve(list(var), attribute) | 267 return super().resolve(list(var), attribute) |
268 | 268 |
269 def getDictionary(self, var): | 269 def getDictionary(self, var): |
270 """ | 270 """ |
271 Public method to get the attributes of a variable as a dictionary. | 271 Public method to get the attributes of a variable as a dictionary. |
272 | 272 |
273 @param var variable to be converted | 273 @param var variable to be converted |
274 @type any | 274 @type any |
275 @return dictionary containing the variable attributes | 275 @return dictionary containing the variable attributes |
276 @rtype dict | 276 @rtype dict |
277 """ | 277 """ |
278 return super(DictViewResolver, self).getDictionary(list(var)) | 278 return super().getDictionary(list(var)) |
279 | 279 |
280 | 280 |
281 ############################################################ | 281 ############################################################ |
282 ## Resolver for Sets and Frozensets | 282 ## Resolver for Sets and Frozensets |
283 ############################################################ | 283 ############################################################ |
334 | 334 |
335 if d: | 335 if d: |
336 yield start, d | 336 yield start, d |
337 | 337 |
338 # in case it has additional fields | 338 # in case it has additional fields |
339 additionals = super(SetResolver, self).getDictionary(var) | 339 additionals = super().getDictionary(var) |
340 yield -1, additionals | 340 yield -1, additionals |
341 | 341 |
342 while True: | 342 while True: |
343 yield -2, {} | 343 yield -2, {} |
344 | 344 |
431 | 431 |
432 if d: | 432 if d: |
433 yield start, d | 433 yield start, d |
434 | 434 |
435 # in case it has additional fields | 435 # in case it has additional fields |
436 d = super(NdArrayResolver, self).getDictionary(var) | 436 d = super().getDictionary(var) |
437 | 437 |
438 if var.size > 1024 * 1024: | 438 if var.size > 1024 * 1024: |
439 d['min'] = ( | 439 d['min'] = ( |
440 'ndarray too big, calculating min would slow down debugging') | 440 'ndarray too big, calculating min would slow down debugging') |
441 d['max'] = ( | 441 d['max'] = ( |
527 | 527 |
528 if d: | 528 if d: |
529 yield start, d | 529 yield start, d |
530 | 530 |
531 # in case it has additional fields | 531 # in case it has additional fields |
532 d = super(DictResolver, self).getDictionary(var) | 532 d = super().getDictionary(var) |
533 yield -1, d | 533 yield -1, d |
534 | 534 |
535 while True: | 535 while True: |
536 yield -2, {} | 536 yield -2, {} |
537 | 537 |
604 | 604 |
605 if d: | 605 if d: |
606 yield start, d | 606 yield start, d |
607 | 607 |
608 # in case it has additional fields | 608 # in case it has additional fields |
609 d = super(ArrayResolver, self).getDictionary(var) | 609 d = super().getDictionary(var) |
610 | 610 |
611 # Special data for array type: convert typecode to readable text | 611 # Special data for array type: convert typecode to readable text |
612 d['type'] = self.TypeCodeMap.get(var.typecode, 'illegal type') | 612 d['type'] = self.TypeCodeMap.get(var.typecode, 'illegal type') |
613 | 613 |
614 yield -1, d | 614 yield -1, d |