-
Notifications
You must be signed in to change notification settings - Fork 235
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
incompatible type error on CoreSchema by mypy #542
Comments
I suggest to use This possibly causes another problem if a user try to modify the schema, |
I'm okay with that. @ytoku our general stance is going to be that if you want to use |
Mapping[str, Any] seems like the right thing anyway as we generally treat core schemas as immutable |
@ytoku would you like to create a PR? |
I tried pyright but I found some compatibility problems. It is difficult to migrate to pyright quickly... I'll create a PR. Thanks. |
PR #528 added a workaround for mypy's performance problem.
But the workaround code causes the incompatible-type error when we assign a concrete schema to a
CoreSchema
variable or argument.This is particularly problematic in defining a custom type.
code
result
environment
The text was updated successfully, but these errors were encountered: