mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 10:48:32 +00:00
red_knot_python_semantic: move TODO comment
It fits with reporting lint diagnostics much better than reporting general diagnostics.
This commit is contained in:
parent
bd58135b0d
commit
410aa4b8fd
1 changed files with 11 additions and 11 deletions
|
@ -261,6 +261,17 @@ impl LintReporter<'_, '_> {
|
|||
/// relevant suppression.
|
||||
impl Drop for LintReporter<'_, '_> {
|
||||
fn drop(&mut self) {
|
||||
// The comment below was copied from the original
|
||||
// implementation of diagnostic reporting. The code
|
||||
// has been refactored, but this still kind of looked
|
||||
// relevant, so I've preserved the note. ---AG
|
||||
//
|
||||
// TODO: Don't emit the diagnostic if:
|
||||
// * The enclosing node contains any syntax errors
|
||||
// * The rule is disabled for this file. We probably want to introduce a new query that
|
||||
// returns a rule selector for a given file that respects the package's settings,
|
||||
// any global pragma comments in the file, and any per-file-ignores.
|
||||
|
||||
// OK because the only way `self.diag` is `None`
|
||||
// is via this impl, which can only run at most
|
||||
// once.
|
||||
|
@ -406,17 +417,6 @@ impl DiagnosticReporter<'_, '_> {
|
|||
/// This will add the diagnostic to the typing context if appropriate.
|
||||
impl Drop for DiagnosticReporter<'_, '_> {
|
||||
fn drop(&mut self) {
|
||||
// The comment below was copied from the original
|
||||
// implementation of diagnostic reporting. The code
|
||||
// has been refactored, but this still kind of looked
|
||||
// relevant, so I've preserved the note. ---AG
|
||||
//
|
||||
// TODO: Don't emit the diagnostic if:
|
||||
// * The enclosing node contains any syntax errors
|
||||
// * The rule is disabled for this file. We probably want to introduce a new query that
|
||||
// returns a rule selector for a given file that respects the package's settings,
|
||||
// any global pragma comments in the file, and any per-file-ignores.
|
||||
|
||||
// OK because the only way `self.diag` is `None`
|
||||
// is via this impl, which can only run at most
|
||||
// once.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue