Use just str for _string_length_check

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
Sebastian Rittau 2024-05-18 11:22:57 +02:00 committed by GitHub
parent 73a3e4938c
commit b2316f46cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -61,7 +61,7 @@ except ImportError as ex:
core = DeferredError.new(ex)
def _string_length_check(text: str | bytes) -> None:
def _string_length_check(text: str) -> None:
if MAX_STRING_LENGTH is not None and len(text) > MAX_STRING_LENGTH:
msg = "too many characters in string"
raise ValueError(msg)