1
1
# AUTO GENERATED FILE - DO NOT EDIT
2
2
3
3
import typing # noqa: F401
4
- import numbers # noqa: F401
5
4
from typing_extensions import TypedDict , NotRequired , Literal # noqa: F401
6
- from dash .development .base_component import Component
7
- try :
8
- from dash .development .base_component import ComponentType # noqa: F401
9
- except ImportError :
10
- ComponentType = typing .TypeVar ("ComponentType" , bound = Component )
5
+ from dash .development .base_component import Component , _explicitize_args
6
+
7
+ ComponentType = typing .Union [
8
+ str ,
9
+ int ,
10
+ float ,
11
+ Component ,
12
+ None ,
13
+ typing .Sequence [typing .Union [str , int , float , Component , None ]],
14
+ ]
15
+
16
+ NumberType = typing .Union [
17
+ typing .SupportsFloat , typing .SupportsInt , typing .SupportsComplex
18
+ ]
11
19
12
20
13
21
class Table (Component ):
@@ -109,7 +117,7 @@ class Table(Component):
109
117
"OptionalObjectWithExactAndNestedDescription" ,
110
118
{
111
119
"color" : NotRequired [str ],
112
- "fontSize" : NotRequired [typing . Union [ typing . SupportsFloat , typing . SupportsInt , typing . SupportsComplex ] ],
120
+ "fontSize" : NotRequired [NumberType ],
113
121
"figure" : NotRequired ["OptionalObjectWithExactAndNestedDescriptionFigure" ]
114
122
}
115
123
)
@@ -126,30 +134,29 @@ class Table(Component):
126
134
"OptionalObjectWithShapeAndNestedDescription" ,
127
135
{
128
136
"color" : NotRequired [str ],
129
- "fontSize" : NotRequired [typing . Union [ typing . SupportsFloat , typing . SupportsInt , typing . SupportsComplex ] ],
137
+ "fontSize" : NotRequired [NumberType ],
130
138
"figure" : NotRequired ["OptionalObjectWithShapeAndNestedDescriptionFigure" ]
131
139
}
132
140
)
133
141
134
- _explicitize_dash_init = True
135
142
136
143
def __init__ (
137
144
self ,
138
- children : typing .Optional [typing . Union [ str , int , float , ComponentType , typing . Sequence [ typing . Union [ str , int , float , ComponentType ]]] ] = None ,
145
+ children : typing .Optional [ComponentType ] = None ,
139
146
optionalArray : typing .Optional [typing .Sequence ] = None ,
140
147
optionalBool : typing .Optional [bool ] = None ,
141
148
optionalFunc : typing .Optional [typing .Any ] = None ,
142
- optionalNumber : typing .Optional [typing . Union [ typing . SupportsFloat , typing . SupportsInt , typing . SupportsComplex ] ] = None ,
149
+ optionalNumber : typing .Optional [NumberType ] = None ,
143
150
optionalObject : typing .Optional [dict ] = None ,
144
151
optionalString : typing .Optional [str ] = None ,
145
152
optionalSymbol : typing .Optional [typing .Any ] = None ,
146
- optionalNode : typing .Optional [typing . Union [ str , int , float , ComponentType , typing . Sequence [ typing . Union [ str , int , float , ComponentType ]]] ] = None ,
147
- optionalElement : typing .Optional [ComponentType ] = None ,
153
+ optionalNode : typing .Optional [ComponentType ] = None ,
154
+ optionalElement : typing .Optional [Component ] = None ,
148
155
optionalMessage : typing .Optional [typing .Any ] = None ,
149
156
optionalEnum : typing .Optional [Literal ["News" , "Photos" ]] = None ,
150
- optionalUnion : typing .Optional [typing .Union [str , typing . Union [ typing . SupportsFloat , typing . SupportsInt , typing . SupportsComplex ] , typing .Any ]] = None ,
151
- optionalArrayOf : typing .Optional [typing .Sequence [typing . Union [ typing . SupportsFloat , typing . SupportsInt , typing . SupportsComplex ] ]] = None ,
152
- optionalObjectOf : typing .Optional [typing .Dict [typing .Union [str , float , int ], typing . Union [ typing . SupportsFloat , typing . SupportsInt , typing . SupportsComplex ] ]] = None ,
157
+ optionalUnion : typing .Optional [typing .Union [str , NumberType , typing .Any ]] = None ,
158
+ optionalArrayOf : typing .Optional [typing .Sequence [NumberType ]] = None ,
159
+ optionalObjectOf : typing .Optional [typing .Dict [typing .Union [str , float , int ], NumberType ]] = None ,
153
160
optionalObjectWithExactAndNestedDescription : typing .Optional ["OptionalObjectWithExactAndNestedDescription" ] = None ,
154
161
optionalObjectWithShapeAndNestedDescription : typing .Optional ["OptionalObjectWithShapeAndNestedDescription" ] = None ,
155
162
optionalAny : typing .Optional [typing .Any ] = None ,
@@ -168,3 +175,5 @@ def __init__(
168
175
args = {k : _locals [k ] for k in _explicit_args if k != 'children' }
169
176
170
177
super (Table , self ).__init__ (children = children , ** args )
178
+
179
+ setattr (Table , "__init__" , _explicitize_args (Table .__init__ ))
0 commit comments