Repository navigation
test: document container inference bugs with Any bounds - #5046
asukaminato0721 wants to merge 1 commit into
Conversation
|
This pull request has been imported. If you are a Meta employee, you can view this in D122390321. (Because this pull request was imported automatically, there will not be any future comments.) |
This comment has been minimized.
This comment has been minimized.
rchen152
left a comment
There was a problem hiding this comment.
It looks like some of the tests you updated are failing; could you take a look?
Oh, I see - sorry for not reading properly! The way to write deliberately failing tests is to make the test pass on |
388c601 to
01ce78f
Compare
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
Summary
Any-bounded type variables erase concrete container element types and over-narrow repeated appends. The tests retain the intended type assertions and explicitly expect the current incorrect diagnostics.
The
testcase!regressions usebug =markers and comments documenting the correct behavior. These are passing tests of known bugs, following the repository test guidance.The complete implementation and regression tests remain in PR #4877. Related issue: #3265.
Validation
Based on upstream
mainatef6de648bce0dc6dcca0a21a9fbb7490f23ecce8.cargo test -p pyrefly --lib -- test_iter_container_literal test_any_bounded_typevar_container_hints test_any_bounded_typevar_empty_list_repeated_append— passed.python3 test.py --no-test --no-tensor-shapes --no-conformance --no-jsonschema --no-extension— passed.