Skip to content

Commit 231f528

Browse files
committed
Allow |L in list names
1 parent 1c037dd commit 231f528

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tivars/types/list.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,12 @@ def set(cls, value: _T, **kwargs) -> bytes:
6060
if "IDList" in varname:
6161
return b'\x5D\x40'
6262

63-
elif varname in ("L1", "L2", "L3", "L4", "L5", "L6"):
64-
return super().set(varname[:2])
65-
6663
else:
67-
return super().set(varname[-5:])
64+
if len(varname) > (7 if varname.startswith("|L") else 5):
65+
warn(f"The list name '{varname}' is too long.",
66+
UserWarning)
67+
68+
return super().set(varname)
6869

6970

7071
class TIList(TIEntry):

0 commit comments

Comments
 (0)