From 2202b0fa26be098e43ec65a5f0ca00962b2da1ac Mon Sep 17 00:00:00 2001 From: KG Date: Tue, 4 Jun 2024 00:55:41 -0500 Subject: [PATCH] Warn ahead of time --- tivars/types/tokenized.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tivars/types/tokenized.py b/tivars/types/tokenized.py index 8e8bd6e..ee193c3 100644 --- a/tivars/types/tokenized.py +++ b/tivars/types/tokenized.py @@ -315,12 +315,12 @@ def load_bytes(self, data: bytes | BytesIO): @Loader[str] def load_string(self, string: str, *, model: TIModel = None, lang: str = None): - super().load_string(string, model=model, lang=lang) - if not self.is_tokenized: warn("ASM programs may not have tokenized data.", UserWarning) + super().load_string(string, model=model, lang=lang) + def string(self) -> str: string = super().string()