Use future annotations

This commit is contained in:
Eric Masseran
2025-08-29 18:36:54 +02:00
parent 356923e40d
commit 6e5f201f6c

View File

@@ -36,6 +36,8 @@ py__doc__() Returns the docstring for a value.
====================================== ======================================== ====================================== ========================================
""" """
from __future__ import annotations
from typing import List, Optional, Tuple from typing import List, Optional, Tuple
from jedi import debug from jedi import debug
@@ -156,7 +158,7 @@ def init_param_value(arg_nodes) -> Optional[bool]:
return None return None
def get_dataclass_param_names(cls) -> List["DataclassParamName"]: def get_dataclass_param_names(cls) -> List[DataclassParamName]:
""" """
``cls`` is a :class:`ClassMixin`. The type is only documented as mypy would ``cls`` is a :class:`ClassMixin`. The type is only documented as mypy would
complain that some fields are missing. complain that some fields are missing.
@@ -300,7 +302,7 @@ class ClassMixin:
return False, None return False, None
def _get_dataclass_transform_signatures(self) -> List["DataclassSignature"]: def _get_dataclass_transform_signatures(self) -> List[DataclassSignature]:
""" """
Returns: A non-empty list if the class has dataclass semantics else an Returns: A non-empty list if the class has dataclass semantics else an
empty list. empty list.