8000 Typing issues · Issue #466 · tefra/xsdata · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000
Typing issues #466
Closed
Closed
@nmrtv

Description

@nmrtv

With UBL schemas, I found 2 problems in file common\ubl_xad_esv132_2_1.py:

  1. Mypy complains about the generic Dict type in a strict mode:
@dataclass
class AnyType:
    any_element: List[object] = field(
        default_factory=list,
        metadata={
            "type": "Wildcard",
            "namespace": "##any",
            "mixed": True,
        },
    )
    any_attributes: Dict = field(
        default_factory=dict,
        metadata={
            "type": "Attributes",
            "namespace": "##any",
        },
    )

XML attributes are always strings, can we change that type hint to Dict[str, str]?

  1. The type of inherited field OtherTimeStampType.encapsulated_time_stamp is different from the base class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0