18 lines
350 B
Python
18 lines
350 B
Python
from typing import Generic, TypeVar
|
|
|
|
T_Field = TypeVar("T_Field")
|
|
|
|
|
|
class BaseConstraint(Generic[T_Field]):
|
|
"""BaseConstraint class
|
|
Base class for Field's constraints
|
|
"""
|
|
|
|
_bound_type: type
|
|
|
|
def __init__(self): ...
|
|
|
|
def check(self, value: T_Field) -> bool:
|
|
"""Check if a Constraint is completed"""
|
|
return True
|