Skip to content

Commit

Permalink
Method str.removeprefix changed to str slice to support python older …
Browse files Browse the repository at this point in the history
…than 3.9
  • Loading branch information
rphh committed May 23, 2024
1 parent d22fec4 commit 219afcd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sdl2promela/sdl/type_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 219afcd

Please sign in to comment.