excel-orm 0.1.4__tar.gz → 0.1.5__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: excel-orm
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: A lightweight Excel ORM for generating templates and parsing typed row models.
5
5
  Project-URL: Homepage, https://github.com/acdelrusso/excel-orm
6
6
  Project-URL: Repository, https://github.com/acdelrusso/excel-orm
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "excel-orm"
3
- version = "0.1.4"
3
+ version = "0.1.5"
4
4
  description = "A lightweight Excel ORM for generating templates and parsing typed row models."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"
@@ -1,8 +1,9 @@
1
1
  from __future__ import annotations
2
2
 
3
- from typing import Any
3
+ from typing import TYPE_CHECKING, Any
4
4
 
5
- from excel_orm import Column
5
+ if TYPE_CHECKING:
6
+ from excel_orm import Column
6
7
 
7
8
 
8
9
  class RowBase:
@@ -41,9 +41,9 @@ class Column[T]:
41
41
  @overload
42
42
  def __get__(self, obj: None, objtype: type[Owner] | None = None) -> Column[T]: ...
43
43
  @overload
44
- def __get__(self, obj: Owner, objtype: type[Owner] | None = None) -> T | None: ...
44
+ def __get__(self, obj: Owner, objtype: type[Owner] | None = None) -> T: ...
45
45
 
46
- def __get__(self, obj: Owner | None, objtype: type[Owner] | None = None) -> T | Column | None:
46
+ def __get__(self, obj: Owner | None, objtype: type[Owner] | None = None) -> T | Column:
47
47
  if obj is None:
48
48
  return self
49
49
  if self.name is None:
@@ -71,7 +71,7 @@ def text_column(
71
71
  default: str | None = None,
72
72
  strip: bool = True,
73
73
  not_null: bool = False,
74
- ):
74
+ ) -> Column[str]:
75
75
  def parse(raw: Any) -> str:
76
76
  if raw is None:
77
77
  return ""
@@ -96,7 +96,7 @@ def int_column(
96
96
  *,
97
97
  default: int | None = None,
98
98
  not_null: bool = False,
99
- ):
99
+ ) -> Column[int]:
100
100
  def parse(raw: Any) -> int:
101
101
  if raw is None or raw == "":
102
102
  return 0
@@ -112,7 +112,7 @@ def int_column(
112
112
  )
113
113
 
114
114
 
115
- def bool_column(header: str | None = None, *, default: bool | None = None):
115
+ def bool_column(header: str | None = None, *, default: bool | None = None) -> Column[bool]:
116
116
  def parse(raw: Any) -> bool:
117
117
  if raw is None or raw == "":
118
118
  return False
@@ -134,7 +134,7 @@ def bool_column(header: str | None = None, *, default: bool | None = None):
134
134
  )
135
135
 
136
136
 
137
- def date_column(header: str | None = None, *, default: date | None = None):
137
+ def date_column(header: str | None = None, *, default: date | None = None) -> Column[date]:
138
138
  _DATE_FORMATS: tuple[str, ...] = (
139
139
  "%d-%b-%Y", # 01-JUN-2025 (your requirement)
140
140
  "%d-%b-%y", # 01-JUN-25
@@ -187,7 +187,7 @@ wheels = [
187
187
 
188
188
  [[package]]
189
189
  name = "excel-orm"
190
- version = "0.1.4"
190
+ version = "0.1.5"
191
191
  source = { editable = "." }
192
192
  dependencies = [
193
193
  { name = "openpyxl" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes