I'm making sure about the plan of the feature of unpacking in class.
I'm using pydantic-xml, and doing a lot of duplicated namespace handling. So implement a dict like this is very useful but not supported by pyrefly:
from pydantic_xml import BaseXmlModel, attr
META: dict[str, Any] = {
"nsmap": {"": "http://xxxxxxx"},
"ns": "",
"search_mode": SearchMode.UNORDERED,
}
class UniqueID(BaseXmlModel, **META, tag="UniqueID"):
id: Annotated[str, attr(name="ID")]
id_context: Annotated[str | None, attr(name="ID_Context")] = None
The code: Sandbox
Originally posted by @TommrraraSnow in #1756