Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialization Woes #1587

Open
collindutter opened this issue Jan 17, 2025 · 1 comment
Open

Serialization Woes #1587

collindutter opened this issue Jan 17, 2025 · 1 comment
Assignees
Milestone

Comments

@collindutter
Copy link
Member

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.

@collindutter
Copy link
Member Author

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 #1164

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant