Projet

Général

Profil

0056-misc-remove-dead-code-62099.patch

Lauréline Guérin, 22 mars 2022 10:31

Télécharger (1,41 ko)

Voir les différences:

Subject: [PATCH 56/65] misc: remove dead code (#62099)

passerelle/utils/xml.py:340: [E1120(no-value-for-parameter), JSONSchemaFromXMLSchema.type_to_jsonschema]
No value for argument 'schema' in classmethod call

the removed block of code is not working, and was never used
 passerelle/utils/xml.py | 8 --------
 1 file changed, 8 deletions(-)
passerelle/utils/xml.py
332 332
                    base_schema['oneOf'].append({'type': 'null'})
333 333
                    return base_schema
334 334
                return {'oneOf': [{'type': 'null'}, base_schema]}
335
        elif xmltype.has_simple_content():
336
            base_schema = cls.type_to_jsonschema(xmltype.base_type)
337
            if not xmltype.attributes:
338
                schema = base_schema
339
            else:
340
                cls.attributegroup_to_jsonschema(xmltype.attributes)
341
                schema['properties']['$'] = base_schema
342
            return schema
343 335
        else:
344 336
            if xmltype.has_mixed_content() or xmltype.name == xmlschema_names.XSD_ANY_TYPE:
345 337
                raise NotImplementedError(xmltype)
346
-