From be8103dbbc93255be315c4eb306513cf9e48831c Mon Sep 17 00:00:00 2001 From: Jonathan Wallace Date: Tue, 27 May 2025 16:38:04 -0700 Subject: [PATCH 1/3] Add metadata object type --- can/io/blf.py | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/can/io/blf.py b/can/io/blf.py index e64a2247d..88da1f60e 100644 --- a/can/io/blf.py +++ b/can/io/blf.py @@ -77,9 +77,13 @@ class BLFParseError(Exception): # group name length, marker name length, description length GLOBAL_MARKER_STRUCT = struct.Struct(" Date: Wed, 28 May 2025 09:43:50 -0700 Subject: [PATCH 2/3] Change metadata to app_text --- can/io/blf.py | 46 ++++++++++++++++++++-------------------------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/can/io/blf.py b/can/io/blf.py index 88da1f60e..87f6b2724 100644 --- a/can/io/blf.py +++ b/can/io/blf.py @@ -77,13 +77,13 @@ class BLFParseError(Exception): # group name length, marker name length, description length GLOBAL_MARKER_STRUCT = struct.Struct(" Date: Wed, 28 May 2025 09:59:40 -0700 Subject: [PATCH 3/3] Fix type annotation --- can/io/blf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/can/io/blf.py b/can/io/blf.py index 87f6b2724..9bf01745e 100644 --- a/can/io/blf.py +++ b/can/io/blf.py @@ -146,7 +146,7 @@ class BLFReader(BinaryIOMessageReader): Iterator of CAN messages from a Binary Logging File. Only CAN messages and error frames are supported. Other object types are - silently ignored. APP_TEXT objects are parsed into `self.apt_text` when + silently ignored. APP_TEXT objects are parsed into `self.app_text` when they are encountered while iterating. self.app_text is a list of tuples containing the parsed app_text objects. The @@ -185,7 +185,7 @@ def __init__( # APP_TEXT objects are appended when type 65 is encountered # while iterating - self.app_text: list[tuple] = [] + self.app_text: List[Tuple] = [] self._tail = b"" self._pos = 0