-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Respect --output-format with --watch
#21097
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
Conversation
Summary -- Fixes #19550, fixes #19552 (eventually) This PR copies our non-watch diagnostic rendering code into `Printer::write_continuously` in preview mode, allowing it to use whatever output format is passed in. Test Plan -- Existing tests, but I don't think we have any `watch` tests, so some manual testing as well:
--output-format in ruff watch--output-format in --watch
--output-format in --watch--output-format with --watch
|
Don't we generally mark the issue as closed even if the solution is in |
In general yes, but this felt a little different since it's basically a preview warning. |
|
Actually the warning itself probably should be updated to mention preview now, but the warning isn't being shown anyway because of #19552 🙃 |
MichaReiser
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
* origin/main: Respect `--output-format` with `--watch` (#21097) [`pyflakes`] Revert to stable behavior if imports for module lie in alternate branches for `F401` (#20878) Fix finding keyword range for clause header after statement ending with semicolon (#21067) [ty] Fix bug where ty would think all types had an `__mro__` attribute (#20995) Restore `indent.py` (#21094) [`flake8-django`] Apply `DJ001` to annotated fields (#20907) Clearer error message when `line-length` goes beyond threshold (#21072) Update upload and download artifacts github actions (#21083) Update dependency mdformat-mkdocs to v4.4.2 (#21088) Update cargo-bins/cargo-binstall action to v1.15.9 (#21086) Update Rust crate clap to v4.5.50 (#21090) Update Rust crate get-size2 to v0.7.1 (#21091) Update Rust crate bstr to v1.12.1 (#21089) Add missing docstring sections to the numpy list (#20931) [`pydoclint`] Fix false positive on explicit exception re-raising (`DOC501`, `DOC502`) (#21011) [ty] Use constructor parameter types as type context (#21054)
…l-constraint-sets
* dcreager/refactor-constraint-mdtests: (60 commits)
add static_asserts
move all reveal diagnostics to separate line
add more gradual tests
better comment
restructure a bit
better names/comments
simplify before implication
two typevars!
mdformat
rename mdtest
move is_subtype_of_given into ConstraintSet
move where we grab these
add ConstraintSet.{always,never}
move range_constraint into ConstraintSet class
[ty] Rename `inner` query for better debugging experience (#21106)
[ty] Add new "constraint implication" typing relation (#21010)
[semantic error tests]: refactor semantic error tests to separate files (#20926)
Respect `--output-format` with `--watch` (#21097)
[`pyflakes`] Revert to stable behavior if imports for module lie in alternate branches for `F401` (#20878)
Fix finding keyword range for clause header after statement ending with semicolon (#21067)
...
Summary
Fixes #19550
This PR copies our non-watch diagnostic rendering code into
Printer::write_continuouslyin preview mode, allowing it to use whatever output format is passed in.I initially marked this as also fixing #19552, but I guess that's not true currently but will be true once this is stabilized and we can remove the warning.
Test Plan
Existing tests, but I don't think we have any
watchtests, so some manual testing as well. The default with justruff check --watchis stillconcise, adding just--previewstill gives thefulloutput, and then specifying any other output format works, with JSON as one example: