From 219afcd4590a0e4ed67a4dabb1bed62c1fd07d29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Babski?= Date: Thu, 23 May 2024 11:57:51 +0100 Subject: [PATCH] Method str.removeprefix changed to str slice to support python older than 3.9 --- sdl2promela/sdl/type_info.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdl2promela/sdl/type_info.py b/sdl2promela/sdl/type_info.py index 58a26efb..7ba77ee5 100644 --- a/sdl2promela/sdl/type_info.py +++ b/sdl2promela/sdl/type_info.py @@ -59,9 +59,9 @@ def build_type_info(all_types: Dict[str, Asn1Type]) -> TypeInfo: if asn1_type.AddedType == "True" and escaped_name not in handled_types: for existing_mapping in iter(possible_parents): if escaped_name.startswith(existing_mapping): - part_name = escaped_name.removeprefix( - existing_mapping - ) # part_name shall start with '_' + part_name = escaped_name[ + len(existing_mapping) : + ] # part_name shall start with '_' type_info.all_types[ escaped_name ] = f"{existing_mapping}_{part_name}"