Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion a2lparser/a2lparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import glob
from pathlib import Path
from loguru import logger
from typing import Union
from a2lparser.a2l.a2l_yacc import A2LYacc
from a2lparser.a2l.a2l_validator import A2LValidator
from a2lparser.a2lparser_exception import A2LParserException
Expand Down Expand Up @@ -203,7 +204,7 @@ def _load_file(self, filename: str, current_dir: str = None) -> str:
content = self._include_pattern.sub(included_content, content)
return content

def _find_includes(self, content: str) -> str | list | None:
def _find_includes(self, content: str) -> Union[str, list, None]:
"""
Looks for /include {file.a2l} tags inside given content and returns the full filename.

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"]

[project]
name = "a2lparser"
requires-python = ">=3.11"
requires-python = ">=3.8"
authors = [
{ name = "mrom1", email = "mrom@linuxmail.org" }
]
Expand Down