You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I'm happy you like the library so far! I did not have any time to work on anything lately due to personal reasons, but I am planning to get started again some time soon (fingers crossed).
Regarding your issue, it's something we used to just supress as mentioned in here in our production codebases. I currently don't know of any possible workaround, as I think we would need to implement it some other way for type checkers to not complain.
If you have any suggestions for another implementation, feel free to share your thoughts. Breaking changes wouldn't be a problem, since I plan on reworking some core mechanics for the next release anyways, once i find the time for it.
Call expression not allowed in type expression
I really like this library due to its Pydantic-friendly features. I hope more people get to use this repository.
However, when I use "WithOptions" while defining a model, I encounter some issues:
The type checker gives me a warning, and it's not ideal to see that. After some searching, I found a related issue on this page:
microsoft/pylance-release#5457
(According to above issues post, it seems to be caused by Pylance update)
So, I tried the following code:
While warning has disappeared, "WithOptions" doesn't guarantee uniqueness.
Your environment
Steps to reproduce
Call expression not allowed in type expression
Expected Behavior
No error
Actual Behavior
Call expression not allowed in type expression
The text was updated successfully, but these errors were encountered: