@@ -31,7 +31,7 @@ Example implementation
3131
3232.. code-block :: python
3333
34- from typing import Any, Dict
34+ from typing import Any
3535
3636 from flask_inputfilter.Condition import BaseCondition
3737
@@ -45,7 +45,7 @@ Example implementation
4545 self .first_field = first_field
4646 self .second_field = second_field
4747
48- def check (self , data : Dict [str , Any]) -> bool :
48+ def check (self , data : dict [str , Any]) -> bool :
4949 return data.get(self .first_field) == data.get(self .second_field)
5050
5151
@@ -69,7 +69,7 @@ Example implementation
6969.. code-block :: python
7070
7171 from datetime import date, datetime
72- from typing import Any, Union
72+ from typing import Any
7373
7474 from flask_inputfilter.Filter import BaseFilter
7575
@@ -80,7 +80,7 @@ Example implementation
8080 Supports ISO 8601 formatted strings.
8181 """
8282
83- def apply (self , value : Any) -> Union[ datetime, Any] :
83+ def apply (self , value : Any) -> datetime| Any:
8484 if isinstance (value, datetime):
8585 return value
8686
@@ -94,8 +94,7 @@ Example implementation
9494 except ValueError :
9595 return value
9696
97- else :
98- return value
97+ return value
9998
10099
101100 Validator
@@ -116,7 +115,7 @@ Example implementation
116115
117116.. code-block :: python
118117
119- from typing import Any, List, Optional
118+ from typing import Any, Optional
120119
121120 from flask_inputfilter.Exception import ValidationError
122121 from flask_inputfilter.Validator import BaseValidator
@@ -129,7 +128,7 @@ Example implementation
129128
130129 def __init__ (
131130 self ,
132- haystack : List [Any],
131+ haystack : list [Any],
133132 strict : bool = False ,
134133 error_message : Optional[str ] = None ,
135134 ) -> None :
0 commit comments