Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update baselib and use Optional #37

Merged
merged 1 commit into from
Oct 7, 2024
Merged
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
28 changes: 12 additions & 16 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ packages = [

[tool.poetry.dependencies]
python = "^3.10"
asam-qc-baselib = {git = "https://github.com/asam-ev/qc-baselib-py.git", rev = "develop"}
asam-qc-baselib = "^1.0.0rc1"
lxml = "^5.2.2"

[tool.poetry.group.dev.dependencies]
Expand Down
12 changes: 6 additions & 6 deletions qc_otx/checks/models.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from dataclasses import dataclass
from lxml import etree
from typing import Union, List
from typing import Union, List, Optional

from qc_baselib import Configuration, Result


@dataclass
class QueueNode:
element: etree._ElementTree
xpath: Union[str, None]
xpath: Optional[str]


@dataclass
Expand All @@ -29,22 +29,22 @@ class CheckerData:
@dataclass
class SMTrigger:
id: str
name: Union[str, None]
name: Optional[str]
xml_element: etree._Element


@dataclass
class SMTransition:
id: str
name: Union[str, None]
target: Union[str, None]
name: Optional[str]
target: Optional[str]
xml_element: etree._Element


@dataclass
class SMState:
id: str
name: Union[str, None]
name: Optional[str]
is_initial: bool
is_completed: bool
transitions: List[SMTransition]
Expand Down
4 changes: 2 additions & 2 deletions qc_otx/checks/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from lxml import etree
from typing import Union, List, Dict
from typing import Optional, List, Dict
from qc_otx.checks import models
import re
import logging
Expand Down Expand Up @@ -63,7 +63,7 @@ def get_all_attributes(
return attributes


def get_standard_schema_version(root: etree._ElementTree) -> Union[str, None]:
def get_standard_schema_version(root: etree._ElementTree) -> Optional[str]:
root_attrib = root.getroot().attrib
return root_attrib["version"]

Expand Down