1
0
mirror of https://github.com/FreeOpcUa/opcua-asyncio synced 2025-10-29 17:07:18 +08:00

fix one last test

This commit is contained in:
Olivier 2025-09-21 21:44:27 +02:00
parent 17c8fa51e9
commit 1a4b4e43cd
2 changed files with 5 additions and 1 deletions

View File

@ -6,6 +6,7 @@ for custom structures
import uuid
import logging
import typing
# The next two imports are for generated code
from datetime import datetime, timezone
@ -221,6 +222,7 @@ class StructGenerator:
'''
THIS FILE IS AUTOGENERATED, DO NOT EDIT!!!
'''
from __future__ import annotations
from datetime import datetime, timezone
import uuid
@ -316,6 +318,8 @@ def _generate_python_class(model, env=None):
env["dataclass"] = dataclass
if "field" not in env:
env["field"] = field
if "Optional" not in env:
env["Optional"] = typing.Optional
# generate classes one by one and add them to dict
for element in model:
code = element.get_code()

View File

@ -104,7 +104,7 @@ ignore = [
# https://github.com/astral-sh/ruff/issues/5035
"UP006", # Use `list` instead of `List` for type annotation
"UP007", # Use `X | Y` for type annotations
"UP035", # list instead of List again??
"UP035", # list instead of List again??
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "F403"]