pydifact icon indicating copy to clipboard operation
pydifact copied to clipboard

Better typing of `Element`

Open lord-haffi opened this issue 9 months ago • 4 comments

This is a follow-up issue on #80 and #81. When reintroducing the py.typed file (#82), I get some type errors related to the following problem.

There are many fields typed using the Element = str | list[str] type. This creates some annoying problems as many fields like segment.tag or message.receiver are now str | list[str] while in realitiy it should always be str, shouldn't it?

lord-haffi avatar May 04 '25 10:05 lord-haffi