ecodev-core 0.0.48__py3-none-any.whl → 0.0.49__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
@@ -130,15 +130,15 @@ def _value_to_db(value: COL_TYPES, col_type: ColType) -> str | None:
130
130
 
131
131
  def db_to_value(db_value: str | None, col_type: type | EnumType) -> COL_TYPES:
132
132
  """
133
- Convert back a str version value stored to a real value (types hancled listed in ColType)
133
+ Convert back a str version value stored to a real value (types handled listed in ColType)
134
134
  NB: assumption that if the type is not known, this is an enum type.
135
135
  """
136
136
  if db_value is None:
137
137
  return None
138
- if issubclass(int, col_type) or issubclass(str, col_type) or issubclass(float, col_type):
138
+ if col_type in [int, str, float]:
139
139
  return col_type(db_value)
140
- if issubclass(bool, col_type):
140
+ if col_type == bool:
141
141
  return db_value == 'True'
142
- if issubclass(datetime, col_type):
142
+ if col_type == datetime:
143
143
  return datetime.strptime(db_value, '%Y-%m-%d %H:%M:%S.%f')
144
- return col_type[db_value] # type: ignore[index]
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.48
3
+ Version: 0.0.49
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=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,,
28
+ ecodev_core/version.py,sha256=eyIf8KkW_t-hMuYFIoy0cUlNaMewLe6i45m2HKZKh0Q,4403
29
+ ecodev_core-0.0.49.dist-info/LICENSE.md,sha256=8dqVJEbwXjPWjjRKjdLMym5k9Gi8hwtrHh84sti6KIs,1068
30
+ ecodev_core-0.0.49.dist-info/METADATA,sha256=e9xDBogoX5SU9v4tCFbcW_Y0zgHAft8YIisV3u_wX5Y,3509
31
+ ecodev_core-0.0.49.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
32
+ ecodev_core-0.0.49.dist-info/RECORD,,