def vao_ext_id_to_ifopt_stop_id(vao_ext_id: str) -> Optional[str]:
"""Converts a VAO EXT ID like "476164600" to the IFOPT stop ID like "at:47:61646".
In case the vao_ext_id cannot be converted, None is returned."""
- if match := re.match(r'(47)(\d{5})00', vao_ext_id):
+ if match := re.match(r'(4[1-9])(\d{5})00$', vao_ext_id):
g1, g2 = match.groups()
+ g2 = int(g2)
return f"at:{g1}:{g2}"
return None