Skip to content

Commit

Permalink
validator typing tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
t1user committed Jul 3, 2024
1 parent 19c9065 commit c1220a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions ib_tools/execution_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from ib_tools.config import CONFIG
from ib_tools.validators import Validator, order_field_validator

# from ib_tools.manager import CONTROLLER

if TYPE_CHECKING:
from ib_tools.controller import Controller

Expand Down
6 changes: 4 additions & 2 deletions ib_tools/validators.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import dataclasses
from typing import Any, Callable
from typing import Any, Callable, TypeVar

import ib_insync as ibi

T = TypeVar("T")


class Validator:

def __init__(self, *validators: Callable[[Any], None]):
def __init__(self, *validators: Callable[[T], T]):
self.validators = validators

def __set_name__(self, owner, name) -> None:
Expand Down

0 comments on commit c1220a4

Please sign in to comment.