ominfra 0.0.0.dev203__py3-none-any.whl → 0.0.0.dev205__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -137,17 +137,38 @@ class ModelGen:
137
137
 
138
138
  #
139
139
 
140
+ PRIMITIVE_SHAPE_TYPES: ta.ClassVar[ta.Mapping[str, str]] = {
141
+ 'boolean': 'bool',
142
+
143
+ 'integer': 'int',
144
+ 'long': 'int',
145
+
146
+ 'double': 'float',
147
+
148
+ 'blob': 'bytes',
149
+
150
+ 'timestamp': '_base.Timestamp',
151
+ }
152
+
153
+ #
154
+
140
155
  BASE_TYPE_ANNS: ta.ClassVar[ta.Mapping[str, str]] = {
141
156
  'Boolean': 'bool',
157
+
142
158
  'Integer': 'int',
159
+
143
160
  'String': 'str',
161
+
144
162
  'DateTime': '_base.DateTime',
145
163
  'MillisecondDateTime': '_base.MillisecondDateTime',
164
+
146
165
  'TagList': '_base.TagList',
147
166
  }
148
167
 
149
168
  BASE_SHAPE_NAMES: ta.ClassVar[ta.AbstractSet[str]] = set(BASE_TYPE_ANNS)
150
169
 
170
+ #
171
+
151
172
  def get_type_ann(
152
173
  self,
153
174
  name: str,
@@ -230,7 +251,7 @@ class ModelGen:
230
251
  def sanitize_class_name(self, n: str) -> str:
231
252
  if hasattr(builtins, n):
232
253
  n += '_'
233
- return n
254
+ return n[0].upper() + n[1:]
234
255
 
235
256
  #
236
257
 
@@ -255,14 +276,6 @@ class ModelGen:
255
276
 
256
277
  #
257
278
 
258
- PRIMITIVE_SHAPE_TYPES: ta.ClassVar[ta.Mapping[str, str]] = {
259
- 'integer': 'int',
260
- 'long': 'int',
261
- 'blob': 'bytes',
262
- 'boolean': 'bool',
263
- 'timestamp': '_base.Timestamp',
264
- }
265
-
266
279
  @dc.dataclass(frozen=True)
267
280
  class ShapeSrc:
268
281
  src: str