Skip to content

Commit

Permalink
fix: Generate type hints for compound fields with token elements
Browse files Browse the repository at this point in the history
  • Loading branch information
tefra committed Mar 24, 2024
1 parent eb36c8b commit 118f45d
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion output/instances/saxonData/Open/open027.v3.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from output.models.saxon_data.open.open028_xsd.open028 import Doc
from output.models.saxon_data.open.open027_xsd.open027 import Doc
from xsdata.formats.dataclass.models.generics import AnyElement


Expand Down
2 changes: 1 addition & 1 deletion output/instances/saxonData/VC/vc001.v1.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from output.models.saxon_data.vc.vc008_xsd.vc008 import Temp
from output.models.saxon_data.vc.vc024_xsd.vc024 import Temp


obj = Temp(
Expand Down
2 changes: 1 addition & 1 deletion output/instances/saxonData/XmlVersions/xv100.i.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from output.models.saxon_data.xml_versions.xv100_i_xsd.xv100_i import Doc
from output.models.saxon_data.xml_versions.xv100_c_xsd.xv100_c import Doc


obj = Doc(
Expand Down
2 changes: 1 addition & 1 deletion output/instances/saxonData/Zone/zone101.v02.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from output.models.saxon_data.zone.zone102_xsd.zone102 import Doc
from output.models.saxon_data.zone.zone101_xsd.zone101 import Doc
from xsdata.models.datatype import XmlDateTime


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

@dataclass
class B:
c1_or_c2: Optional[Union[int, bool, object]] = field(
c1_or_c2: Optional[Union[Union[int, bool], object]] = field(
default=None,
metadata={
"type": "Elements",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

@dataclass
class B:
c1_or_c2: Optional[Union[int, str, object]] = field(
c1_or_c2: Optional[Union[Union[int, str], object]] = field(
default=None,
metadata={
"type": "Elements",
Expand Down
2 changes: 1 addition & 1 deletion output/models/saxon_data/id/id004_xsd/id004.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Node:
class Meta:
name = "node"

node_or_id: List[Union["Node", str]] = field(
node_or_id: List[Union["Node", List[str]]] = field(
default_factory=list,
metadata={
"type": "Elements",
Expand Down

0 comments on commit 118f45d

Please sign in to comment.