Skip to content

rename_duplicate_attributes

xsdata.codegen.handlers.rename_duplicate_attributes

RenameDuplicateAttributes

Bases: HandlerInterface

Resolve attr name conflicts defined in the class.

Source code in xsdata/codegen/handlers/rename_duplicate_attributes.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
class RenameDuplicateAttributes(HandlerInterface):
    """Resolve attr name conflicts defined in the class."""

    __slots__ = ()

    def process(self, target: Class):
        """Detect and resolve naming conflicts.

        Args:
            target: The target class instance
        """
        ClassUtils.rename_duplicate_attributes(target)

process(target)

Detect and resolve naming conflicts.

Parameters:

Name Type Description Default
target Class

The target class instance

required
Source code in xsdata/codegen/handlers/rename_duplicate_attributes.py
11
12
13
14
15
16
17
def process(self, target: Class):
    """Detect and resolve naming conflicts.

    Args:
        target: The target class instance
    """
    ClassUtils.rename_duplicate_attributes(target)