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

is_type_mutable returns true for Literal types #343

Open
gsakkis opened this issue Mar 20, 2023 · 0 comments · May be fixed by #345
Open

is_type_mutable returns true for Literal types #343

gsakkis opened this issue Mar 20, 2023 · 0 comments · May be fixed by #345
Labels
bug Something isn't working

Comments

@gsakkis
Copy link

gsakkis commented Mar 20, 2023

Bug

odmantic.model.is_type_mutable gives wrong result for Literal types.

Current Behavior

In [1]: from odmantic.model import is_type_mutable
In [2]: from typing import Literal

In [3]: is_type_mutable(Literal["x", "y"])
Out[3]: True

Expected behavior

Strings are immutable so the above should return False.

Environment

  • ODMantic version: 0.9.2
  • Pydantic version: 1.10.5
@gsakkis gsakkis added the bug Something isn't working label Mar 20, 2023
@gsakkis gsakkis linked a pull request Mar 27, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant