chore: lint source code using Ruff

This commit is contained in:
jakob.scheid committed 2026-09-21 20:10:09 +02:00
1 parent aa4a139878
commit de3eac3bb1
35 files changed
+161 -130

No files matched your search

+10 -9
View File
@@ -13,17 +13,18 @@
# limitations under the License.
from __future__ import annotations
from enum import Enum
from typing import Union
import ast
from ...utils import assert_that_is_instance
import keyword
import types
from enum import Enum
from ...exceptions import (
InvalidPythonAnnotationError,
InvalidPythonIdentifierError,
PythonArgumentStructureError,
)
import keyword
import types
from ...utils import assert_that_is_instance
__all__ = [
'PythonArgumentKind',
@@ -49,17 +50,17 @@ class PythonFunctionArgument:
:param kind: The kind of the argument.
:type kind: ArgumentKind
:param default: The default value of the argument.
:type default: Union[str, None]
:type default: str | None
:param annotation: The type annotation of the argument.
:type annotation: Union[str, None]
:type annotation: str | None
"""
def __init__(
self,
name: str,
kind: PythonArgumentKind,
default: Union[str, None],
annotation: Union[str, None],
default: str | None,
annotation: str | None,
) -> None:
assert_that_is_instance(name, str)
assert_that_is_instance(kind, PythonArgumentKind)