Fix typing and minor issues
This commit is contained in:
parent
2db2253578
commit
72ab627a34
54 changed files with 635 additions and 589 deletions
|
|
@ -1,10 +1,10 @@
|
|||
import inspect
|
||||
from typing import Any, Callable, TypeVar
|
||||
from typing import Callable, TypeVar
|
||||
|
||||
from ..helper.get_function_metadata_store import get_function_metadata_store
|
||||
from .parameter import parameter
|
||||
|
||||
F = TypeVar("F", bound=Callable[..., Any])
|
||||
F = TypeVar("F", bound=Callable)
|
||||
|
||||
|
||||
def automatically_decorate_parameters(func: F) -> F:
|
||||
|
|
|
|||
|
|
@ -8,14 +8,13 @@ from ..helper import get_arguments, get_function_metadata_store
|
|||
from ..helper.assert_function_is_not_finalised import assert_function_is_not_finalised
|
||||
from ..tracing.tracing_context import TracingContext
|
||||
|
||||
T = TypeVar("T")
|
||||
F = TypeVar("F", bound=Callable[..., Any])
|
||||
F = TypeVar("F", bound=Callable)
|
||||
|
||||
|
||||
def parameter(
|
||||
parameter_name: str,
|
||||
*,
|
||||
validator: Callable[[T], bool] = lambda _: True,
|
||||
validator: Callable[[Any], bool] = lambda _: True,
|
||||
disable_logging: bool = False,
|
||||
) -> Callable[[F], F]:
|
||||
def decorator(func: F) -> F:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue