[pyflakes] Add secondary annotation showing previous definition (F811) by ntBre · Pull Request #19900 · astral-sh/ruff (original) (raw)
added 4 commits
ntBre marked this pull request as ready for review
ntBre changed the title
Add sub-diagnostic to F811 [pyflakes] Add sub-diagnostic (F811)
ntBre changed the title
[ [pyflakes] Add sub-diagnostic (F811)pyflakes] Add secondary annotation showing previous definition (F811)
ntBre added a commit that referenced this pull request
Summary
This is a quick implementation of the idea in
#19900 (comment). Especially
as we start using new diagnostic features, it seems like a good idea to keep an
eye on the concise output format as well as the full. This PR just appends a
second rendering of the diagnostics in our rule snapshots in the concise
format. The concise message is typically reused in the other output formats too,
so this gives us a bit of coverage for all the output formats.
I noticed that some of our concise messages are still quite long. That might be another good class of diagnostic to use new features for. Some explanatory pieces might fit better as sub-diagnostics.
Test Plan
Existing snapshots. Again, I clicked through these individually, but very, very quickly
ntBre mentioned this pull request
ntBre added a commit that referenced this pull request
Summary
This is a quick implementation of the idea in
#19900 (comment). Especially
as we start using new diagnostic features, it seems like a good idea to keep an
eye on the concise output format as well as the full. This PR just appends a
second rendering of the diagnostics in our rule snapshots in the concise
format. The concise message is typically reused in the other output formats too,
so this gives us a bit of coverage for all the output formats.
I noticed that some of our concise messages are still quite long. That might be another good class of diagnostic to use new features for. Some explanatory pieces might fit better as sub-diagnostics.
Test Plan
Existing snapshots. Again, I clicked through these individually, but very, very quickly
ntBre deleted the brent/redefined-while-unused branch
dcreager added a commit that referenced this pull request
- main:
[ty] Add diagnostics for invalid
awaitexpressions (#19711) [ty] Synthesize read-only properties for all declared members onNamedTupleclasses (#19899) [ty] Remove use ofClassBase::try_from_typefromsuper()machinery (#19902) [ty] Speedup project file discovery (#19913) [pyflakes] Add secondary annotation showing previous definition (F811) (#19900) Bump 0.12.9 (#19917) [ty] supportkw_only=Truefordataclass()andfield()(#19677)
ntBre mentioned this pull request
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})