pyrefly
pyrefly copied to clipboard
[feature] don't allow Required & NotRequired to appear at the same time as a qualifier for TypedDict fields
Describe the Bug
Something like this should not be allowed:
class TD(TypedDict):
x: Required[NotRequired[int]]
y: NotRequired[Required[int]]
The check should probably go here: https://github.com/facebook/pyrefly/blob/c6a5b667065373cdad63e3fbadaba1baa0675998/pyrefly/lib/alt/solve.rs#L469
Once this is done, please add a test to: https://github.com/facebook/pyrefly/blob/main/pyrefly/lib/test/typed_dict.rs
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response