Skip to content

Commit 34689e2

Browse files
author
Johan Lübcke
committed
Removed use of tri.named_struct
1 parent 796f5c0 commit 34689e2

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

lib/iommi/table.py

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@
8181
sort_after,
8282
with_meta,
8383
)
84-
from tri_named_struct import (
85-
NamedStruct,
86-
NamedStructField,
87-
)
8884
from tri_struct import (
8985
merged,
9086
Struct,
@@ -818,20 +814,20 @@ def __repr__(self):
818814
return "<%s column=%s row=%s>" % (self.__class__.__name__, self.bound_column.declared_column, self.bound_row.row) # pragma: no cover
819815

820816

821-
class TemplateConfig(NamedStruct):
822-
template = NamedStructField()
817+
class TemplateConfig(Struct, RefinableObject):
818+
template: str = Refinable()
823819

824820

825-
class HeaderConfig(NamedStruct):
826-
attrs = NamedStructField()
827-
template = NamedStructField()
828-
extra = NamedStructField()
821+
class HeaderConfig(Struct, RefinableObject):
822+
attrs: Dict[str, Any] = Refinable()
823+
template: str = Refinable()
824+
extra: Dict[str, Any] = Refinable()
829825

830826

831-
class RowConfig(NamedStruct):
832-
attrs = NamedStructField()
833-
template = NamedStructField()
834-
extra = NamedStructField()
827+
class RowConfig(Struct, RefinableObject):
828+
attrs: Dict[str, Any] = Refinable()
829+
template: str = Refinable()
830+
extra: Dict[str, Any] = Refinable()
835831

836832

837833
class Header(object):

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
tri.declarative>=4.0.1,<5.0.0
22
tri.struct>=3.0.0,<4.0.0
3-
tri.named_struct>=1.0.0,<2.0.0
43
pyparsing

0 commit comments

Comments
 (0)