Skip to content

Commit e9b90e4

Browse files
committed
Add warning for grouping flash files
1 parent 6806475 commit e9b90e4

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ privacy = ["PRIVATE:**.__class_getitem__", "PRIVATE:**.__get__", "PRIVATE:**.__i
5555
"PRIVATE:tivars.models.model.*",
5656
"PUBLIC:tivars.models.model.TIFeature", "PUBLIC:tivars.models.model.TIModel",
5757

58-
"PRIVATE:tivars.cli.parser.*",
58+
"HIDDEN:tivars.cli.parser.*",
5959

6060
"PRIVATE:tivars.__version__",
6161
]

tivars/types/group.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ def group(entries: Sequence[TIEntry], *, name: str = "GROUP") -> 'TIGroup':
5353
UserWarning)
5454

5555
for index, entry in enumerate(entries):
56+
if not isinstance(entry, TIEntry):
57+
raise TypeError(f"groups cannot hold '{entry.__class__}' types")
58+
5659
name = entry.raw.name.rstrip(b'\x00')
5760
vat = bytearray([entry.type_id, 0, entry.version, 0, 0, entry.archived])
5861

0 commit comments

Comments
 (0)