ecodev-core 0.0.47__py3-none-any.whl → 0.0.48__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.

Potentially problematic release.


This version of ecodev-core might be problematic. Click here for more details.

ecodev_core/version.py CHANGED
@@ -135,10 +135,10 @@ def db_to_value(db_value: str | None, col_type: type | EnumType) -> COL_TYPES:
135
135
  """
136
136
  if db_value is None:
137
137
  return None
138
- if col_type in [int, str, float]:
138
+ if issubclass(int, col_type) or issubclass(str, col_type) or issubclass(float, col_type):
139
139
  return col_type(db_value)
140
- if col_type == bool:
141
- return True if db_value == 'True' else False
142
- if col_type == datetime:
140
+ if issubclass(bool, col_type):
141
+ return db_value == 'True'
142
+ if issubclass(datetime, col_type):
143
143
  return datetime.strptime(db_value, '%Y-%m-%d %H:%M:%S.%f')
144
144
  return col_type[db_value] # type: ignore[index]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ecodev-core
3
- Version: 0.0.47
3
+ Version: 0.0.48
4
4
  Summary: Low level sqlmodel/fastapi/pydantic building blocks
5
5
  License: MIT
6
6
  Author: Thomas Epelbaum
@@ -25,8 +25,8 @@ ecodev_core/read_write.py,sha256=YIGRERvFHU7vy-JIaCWAza4CPMysLRUHKJxN-ZgFmu0,120
25
25
  ecodev_core/safe_utils.py,sha256=Q8N15El1tSxZJJsy1i_1CCycuBN1_98QQoHmYJRcLIY,6904
26
26
  ecodev_core/settings.py,sha256=ARAPkXxggVUsYqSQIAgCK8C2DKSMPia1CekULn428bA,1562
27
27
  ecodev_core/sqlmodel_utils.py,sha256=t57H3QPtKRy4ujic1clMK_2L4p0yjGJLZbDjHPZ8M94,453
28
- ecodev_core/version.py,sha256=5lQ5Nzi38ziFzHICoRoGyLzidgFcUCnLdxlpK6s8Y0U,4423
29
- ecodev_core-0.0.47.dist-info/LICENSE.md,sha256=8dqVJEbwXjPWjjRKjdLMym5k9Gi8hwtrHh84sti6KIs,1068
30
- ecodev_core-0.0.47.dist-info/METADATA,sha256=gOrrSLWi0Erw6ogpoMZk383IurextcU1hbic6wFdcho,3509
31
- ecodev_core-0.0.47.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
32
- ecodev_core-0.0.47.dist-info/RECORD,,
28
+ ecodev_core/version.py,sha256=XvhEsbp380DF90CbGiVdepmJD2WZAIiF7fhEId0O3zQ,4480
29
+ ecodev_core-0.0.48.dist-info/LICENSE.md,sha256=8dqVJEbwXjPWjjRKjdLMym5k9Gi8hwtrHh84sti6KIs,1068
30
+ ecodev_core-0.0.48.dist-info/METADATA,sha256=w3-pJmtOrVNOs04Qn7TJaKUHqiYvSNhwlwz-JAhOgaw,3509
31
+ ecodev_core-0.0.48.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
32
+ ecodev_core-0.0.48.dist-info/RECORD,,