generated from jCloud/repository-template
chore: lint source code using Ruff
This commit is contained in:
35 files changed
+161
-130
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user