[red-knot] Check if callable type is fully static#16633
Conversation
|
fd4256d to
2888191
Compare
sharkdp
left a comment
There was a problem hiding this comment.
This looks good, thank you.
May I ask why you plan to wait with the property tests until after you implemented all type properties? It seems to me like they could be of help. If you start out by returning false everywhere, they might even pass most existing property tests everywhere since they wouldn't fulfill the preconditions?
Not at all. My main reason was to independently put up PRs for each method and continue with the others without blocking the ones that are good to go and enabling property tests could create CI failures on That said, I do use a default return value (mostly |
2888191 to
aad0513
Compare
Summary
Part of #15382
This PR adds the check for whether a callable type is fully static or not.
A callable type is fully static if all of the parameter types are fully static and the return type is fully static and if it does not use the gradual form (
...) for its parameters.Test Plan
Update
is_fully_static.mdwith callable types.It seems that currently this test is grouped into either fully static or not, I think it would be useful to split them up in groups like callable, etc. I intentionally avoided that in this PR but I'll put up a PR for an appropriate split.
Note: I've an explicit goal of updating the property tests with the new callable types once all relations are implemented.