griptape
griptape copied to clipboard
Serialization Woes
Issues like this pop up because we maintain a horrendous list of imports that needs to be updated any time a serializable field's type is exclusively imported in a TYPE_CHECKING block. Because they're only imported for the type checker, we get a name error when resolving the types unless we actually import it first.
I think the only solution is to move serialized field's type's out of TYPE_CHECKING blocks, but this will come with some tricky circular import issues.
https://docs.astral.sh/ruff/settings/#lint_flake8-type-checking_runtime-evaluated-base-classes set to:
runtime-evaluated-base-classes = ["griptape.mixins.serializable_mixin.SerializableMixin"]
Looks like we may need to refactor griptape.common similar to what we did for https://github.com/griptape-ai/griptape/pull/1164