Skip to content

Commit e6b0885

Browse files
committed
Casefold extension check
1 parent de61d5b commit e6b0885

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tivars/var.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ def open(cls, filename: str) -> Self:
902902
"""
903903

904904
if cls._type_id is not None and \
905-
not any(filename.endswith(extension) for extension in cls.extensions.values()):
905+
not any(filename.lower().endswith(extension) for extension in cls.extensions.values()):
906906
warn(f"File extension .{filename.split('.')[-1]} not recognized for var type {cls}; "
907907
f"attempting to read anyway.",
908908
UserWarning)

0 commit comments

Comments
 (0)