fix: removed default max length for serialize function (#6674)

* Removed default max length of serialize function

* [autofix.ci] apply automated fixes

* Fix default value

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
This commit is contained in:
Lucas Oliveira 2025-02-17 18:51:01 -03:00 committed by GitHub
commit 4d793371cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -221,8 +221,8 @@ def _serialize_dispatcher(obj: Any, max_length: int | None, max_items: int | Non
def serialize(
obj: Any,
max_length: int | None = MAX_TEXT_LENGTH,
max_items: int | None = MAX_ITEMS_LENGTH,
max_length: int | None = None,
max_items: int | None = None,
*,
to_str: bool = False,
) -> Any:
@ -275,7 +275,9 @@ def serialize(
def serialize_or_str(
obj: Any, max_length: int | None = MAX_TEXT_LENGTH, max_items: int | None = MAX_ITEMS_LENGTH
obj: Any,
max_length: int | None = MAX_TEXT_LENGTH,
max_items: int | None = MAX_ITEMS_LENGTH,
) -> Any:
"""Calls serialize() and if it fails, returns a string representation of the object.