Skip to content

Commit

Permalink
Fix the type hint for Field.converter
Browse files Browse the repository at this point in the history
`Field.converter` is called in `Field.validateValue()` on the result of
`Field.extractValue()`, which will return either a string,
JSON-serializable objects, or None, but not bytes.
  • Loading branch information
rouge8 committed Dec 20, 2023
1 parent 8ba31f8 commit ddb2898
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/klein/_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class Field:
@ivar converter: The converter.
"""

converter: Callable[[AnyStr], Any]
converter: Callable[[str], Any]
formInputType: str
pythonArgumentName: Optional[str] = None
formFieldName: Optional[str] = None
Expand Down

0 comments on commit ddb2898

Please sign in to comment.