File tree Expand file tree Collapse file tree 3 files changed +29
-28
lines changed
Expand file tree Collapse file tree 3 files changed +29
-28
lines changed Original file line number Diff line number Diff line change 1- from __future__ import annotations
1+ import warnings
22
3- from abc import ABC , abstractmethod
4- from typing import Any
3+ warnings .warn (
4+ "Please use `flask_inputfilter.models` for importing BaseCondition "
5+ "as `flask_inputfilter.conditions` is deprecated and will be removed in "
6+ "future versions." ,
7+ DeprecationWarning ,
8+ stacklevel = 2 ,
9+ )
510
6-
7- class BaseCondition (ABC ):
8- """
9- Base class for defining conditions.
10-
11- Each condition should implement the `check` method.
12- """
13-
14- @abstractmethod
15- def check (self , data : dict [str , Any ]) -> bool :
16- pass
11+ from flask_inputfilter .models import BaseCondition
Original file line number Diff line number Diff line change 1+ import warnings
2+
3+ warnings .warn (
4+ "Please use `flask_inputfilter.models` for importing BaseFilter "
5+ "as `flask_inputfilter.filters` is deprecated and will be removed in "
6+ "future versions." ,
7+ DeprecationWarning ,
8+ stacklevel = 2 ,
9+ )
10+
11+ from flask_inputfilter .models import BaseFilter
Original file line number Diff line number Diff line change 1- from __future__ import annotations
1+ import warnings
22
3- from abc import ABC , abstractmethod
4- from typing import Any
3+ warnings .warn (
4+ "Please use `flask_inputfilter.models` for importing BaseValidator "
5+ "as `flask_inputfilter.validators` is deprecated and will be removed in "
6+ "future versions." ,
7+ DeprecationWarning ,
8+ stacklevel = 2 ,
9+ )
510
6-
7- class BaseValidator (ABC ):
8- """
9- BaseValidator-Class.
10-
11- Every validator should inherit from it.
12- """
13-
14- @abstractmethod
15- def validate (self , value : Any ) -> None :
16- pass
11+ from flask_inputfilter .models import BaseValidator
You can’t perform that action at this time.
0 commit comments