Add new syntax to let the mypy test file syntax anticipate --pretty output
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
The thing that makes #19510 complex is the differences in test output. One possible approach to this is to update the test output to be what it will be if --pretty is enabled. This is complicated by the fact that our current syntax for inline errors in the test data does not actually support what --pretty outputs. Adding that feature could possibly be useful.
(Additionally, https://github.com/python/mypy/issues/19940 should probably be fixed, and https://github.com/python/mypy/pull/19546 merged, before this issue is addressed, if one wants the process to be maximally smooth.)
Huh, it hadn't even occurred to me — there's no syntax for multi-line inline comments, is there? Nor for ignoring subsequent lines of a pretty comment in a test...
Originally posted by @wyattscarpenter in https://github.com/python/mypy/issues/19510#issuecomment-3140992574
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing inline-error test syntax and the discussions in #19510, #19940, and PR #19546 to understand the expected constraints. Define and implement syntax for multi-line pretty output, including ignoring subsequent lines, then verify that the relevant mypy test cases can express and validate --pretty output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100