diff --git a/crates/ruff_db/src/diagnostic/mod.rs b/crates/ruff_db/src/diagnostic/mod.rs index 2f61c8a15d..c04964e26d 100644 --- a/crates/ruff_db/src/diagnostic/mod.rs +++ b/crates/ruff_db/src/diagnostic/mod.rs @@ -649,6 +649,20 @@ impl DiagnosticId { }) } + /// Returns a "concise" description of this diagnostic ID. + /// + /// Specifically, this avoids adding a `lint:` prefix (or other + /// possible category prefixes, although `lint` is the only one + /// as of 2025-05-09) to the diagnostic ID when this is a lint + /// identifier. This is useful in diagnostic rendering where we + /// want to elide this prefix. + fn as_concise_str(&self) -> &str { + match self.as_str() { + Ok(name) => name, + Err(DiagnosticAsStrError::Category { name, .. }) => name, + } + } + pub fn is_invalid_syntax(&self) -> bool { matches!(self, Self::InvalidSyntax) } diff --git a/crates/ruff_db/src/diagnostic/render.rs b/crates/ruff_db/src/diagnostic/render.rs index c02565c684..ede5a28c4a 100644 --- a/crates/ruff_db/src/diagnostic/render.rs +++ b/crates/ruff_db/src/diagnostic/render.rs @@ -79,7 +79,7 @@ impl std::fmt::Display for DisplayDiagnostic<'_> { f, "{severity}[{id}]", severity = fmt_styled(severity, severity_style), - id = fmt_styled(self.diag.id(), stylesheet.emphasis) + id = fmt_styled(self.diag.id().as_concise_str(), stylesheet.emphasis) )?; if let Some(span) = self.diag.primary_span() { @@ -152,7 +152,7 @@ impl<'a> Resolved<'a> { for sub in &diag.inner.subs { diagnostics.push(ResolvedDiagnostic::from_sub_diagnostic(resolver, sub)); } - let id = diag.inner.id.to_string(); + let id = diag.inner.id.as_concise_str().to_string(); Resolved { id, diagnostics } } @@ -198,14 +198,14 @@ impl<'a> ResolvedDiagnostic<'a> { }) .collect(); let message = if diag.inner.message.as_str().is_empty() { - diag.inner.id.to_string() + diag.inner.id.as_concise_str().to_string() } else { // TODO: See the comment on `Renderable::id` for // a plausible better idea than smushing the ID // into the diagnostic message. format!( "{id}: {message}", - id = diag.inner.id, + id = diag.inner.id.as_concise_str(), message = diag.inner.message.as_str(), ) }; @@ -799,7 +799,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:5:1 | 3 | canary @@ -823,7 +823,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - warning: lint:test-diagnostic: main diagnostic message + warning: test-diagnostic: main diagnostic message --> animals:5:1 | 3 | canary @@ -843,7 +843,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - info: lint:test-diagnostic: main diagnostic message + info: test-diagnostic: main diagnostic message --> animals:5:1 | 3 | canary @@ -870,7 +870,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:1:1 | 1 | aardvark @@ -889,7 +889,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:1:1 | 1 | aardvark @@ -910,7 +910,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> non-ascii:5:1 | 3 | ΔΔΔΔΔΔΔΔΔΔΔΔ @@ -929,7 +929,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> non-ascii:2:2 | 1 | ☃☃☃☃☃☃☃☃☃☃☃☃ @@ -953,7 +953,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:5:1 | 4 | dog @@ -970,7 +970,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:5:1 | 5 | elephant @@ -985,7 +985,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:1:1 | 1 | aardvark @@ -1002,7 +1002,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:11:1 | 9 | inchworm @@ -1019,7 +1019,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:5:1 | 1 | aardvark @@ -1052,7 +1052,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:1:1 | 1 | aardvark @@ -1096,7 +1096,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:1:1 | 1 | aardvark @@ -1121,7 +1121,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:1:1 | 1 | aardvark @@ -1149,7 +1149,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:1:1 | 1 | aardvark @@ -1177,7 +1177,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:1:1 | 1 | aardvark @@ -1202,7 +1202,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:1:1 | 1 | aardvark @@ -1233,7 +1233,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:1:1 | 1 | aardvark @@ -1271,7 +1271,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> spacey-animals:8:1 | 7 | dog @@ -1288,7 +1288,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> spacey-animals:12:1 | 11 | gorilla @@ -1306,7 +1306,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> spacey-animals:13:1 | 11 | gorilla @@ -1346,7 +1346,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> spacey-animals:3:1 | 3 | beetle @@ -1375,7 +1375,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:3:1 | 1 | aardvark @@ -1412,7 +1412,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:3:1 | 1 | aardvark @@ -1449,7 +1449,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:3:1 | 1 | aardvark @@ -1477,7 +1477,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:3:1 | 1 | aardvark @@ -1513,7 +1513,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:3:1 | 1 | aardvark @@ -1552,7 +1552,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:3:1 | 1 | aardvark @@ -1600,7 +1600,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:3:1 | 1 | aardvark @@ -1636,7 +1636,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:5:1 | 3 | canary @@ -1659,7 +1659,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:5:1 | 3 | canary @@ -1679,7 +1679,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:5:1 | 3 | canary @@ -1699,7 +1699,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:5:4 | 3 | canary @@ -1721,7 +1721,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:5:4 | 3 | canary @@ -1753,7 +1753,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:4:1 | 2 | beetle @@ -1782,7 +1782,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:4:1 | 2 | beetle @@ -1813,7 +1813,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:5:1 | 3 | canary @@ -1848,7 +1848,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:5:1 | 3 | canary @@ -1876,7 +1876,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:5:1 | 3 | canary @@ -1908,7 +1908,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:5:3 | 3 | canary @@ -1930,7 +1930,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:5:3 | 3 | canary @@ -1963,7 +1963,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:8:1 | 6 | finch @@ -2003,7 +2003,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:5:1 | 5 | elephant @@ -2047,7 +2047,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> fruits:1:1 | 1 | apple @@ -2082,7 +2082,7 @@ watermelon insta::assert_snapshot!( env.render(&diag), @r" - error: lint:test-diagnostic: main diagnostic message + error: test-diagnostic: main diagnostic message --> animals:11:1 | 11 | kangaroo diff --git a/crates/ty/tests/cli.rs b/crates/ty/tests/cli.rs index 1a1e2de740..7b84193af6 100644 --- a/crates/ty/tests/cli.rs +++ b/crates/ty/tests/cli.rs @@ -144,7 +144,7 @@ fn config_override_python_version() -> anyhow::Result<()> { success: false exit_code: 1 ----- stdout ----- - error: lint:unresolved-attribute: Type `` has no attribute `last_exc` + error: unresolved-attribute: Type `` has no attribute `last_exc` --> test.py:5:7 | 4 | # Access `sys.last_exc` that was only added in Python 3.12 @@ -278,7 +278,7 @@ fn cli_arguments_are_relative_to_the_current_directory() -> anyhow::Result<()> { success: false exit_code: 1 ----- stdout ----- - error: lint:unresolved-import: Cannot resolve imported module `utils` + error: unresolved-import: Cannot resolve imported module `utils` --> test.py:2:6 | 2 | from utils import add @@ -379,7 +379,7 @@ fn configuration_rule_severity() -> anyhow::Result<()> { success: false exit_code: 1 ----- stdout ----- - error: lint:division-by-zero: Cannot divide object of type `Literal[4]` by zero + error: division-by-zero: Cannot divide object of type `Literal[4]` by zero --> test.py:2:5 | 2 | y = 4 / 0 @@ -389,7 +389,7 @@ fn configuration_rule_severity() -> anyhow::Result<()> { | info: `lint:division-by-zero` is enabled by default - error: lint:unresolved-reference: Name `prin` used when not defined + error: unresolved-reference: Name `prin` used when not defined --> test.py:7:1 | 5 | x = a @@ -417,7 +417,7 @@ fn configuration_rule_severity() -> anyhow::Result<()> { success: true exit_code: 0 ----- stdout ----- - warning: lint:division-by-zero: Cannot divide object of type `Literal[4]` by zero + warning: division-by-zero: Cannot divide object of type `Literal[4]` by zero --> test.py:2:5 | 2 | y = 4 / 0 @@ -458,7 +458,7 @@ fn cli_rule_severity() -> anyhow::Result<()> { success: false exit_code: 1 ----- stdout ----- - error: lint:unresolved-import: Cannot resolve imported module `does_not_exit` + error: unresolved-import: Cannot resolve imported module `does_not_exit` --> test.py:2:8 | 2 | import does_not_exit @@ -468,7 +468,7 @@ fn cli_rule_severity() -> anyhow::Result<()> { | info: `lint:unresolved-import` is enabled by default - error: lint:division-by-zero: Cannot divide object of type `Literal[4]` by zero + error: division-by-zero: Cannot divide object of type `Literal[4]` by zero --> test.py:4:5 | 2 | import does_not_exit @@ -480,7 +480,7 @@ fn cli_rule_severity() -> anyhow::Result<()> { | info: `lint:division-by-zero` is enabled by default - error: lint:unresolved-reference: Name `prin` used when not defined + error: unresolved-reference: Name `prin` used when not defined --> test.py:9:1 | 7 | x = a @@ -508,7 +508,7 @@ fn cli_rule_severity() -> anyhow::Result<()> { success: true exit_code: 0 ----- stdout ----- - warning: lint:unresolved-import: Cannot resolve imported module `does_not_exit` + warning: unresolved-import: Cannot resolve imported module `does_not_exit` --> test.py:2:8 | 2 | import does_not_exit @@ -518,7 +518,7 @@ fn cli_rule_severity() -> anyhow::Result<()> { | info: `lint:unresolved-import` was selected on the command line - warning: lint:division-by-zero: Cannot divide object of type `Literal[4]` by zero + warning: division-by-zero: Cannot divide object of type `Literal[4]` by zero --> test.py:4:5 | 2 | import does_not_exit @@ -561,7 +561,7 @@ fn cli_rule_severity_precedence() -> anyhow::Result<()> { success: false exit_code: 1 ----- stdout ----- - error: lint:division-by-zero: Cannot divide object of type `Literal[4]` by zero + error: division-by-zero: Cannot divide object of type `Literal[4]` by zero --> test.py:2:5 | 2 | y = 4 / 0 @@ -571,7 +571,7 @@ fn cli_rule_severity_precedence() -> anyhow::Result<()> { | info: `lint:division-by-zero` is enabled by default - error: lint:unresolved-reference: Name `prin` used when not defined + error: unresolved-reference: Name `prin` used when not defined --> test.py:7:1 | 5 | x = a @@ -600,7 +600,7 @@ fn cli_rule_severity_precedence() -> anyhow::Result<()> { success: true exit_code: 0 ----- stdout ----- - warning: lint:division-by-zero: Cannot divide object of type `Literal[4]` by zero + warning: division-by-zero: Cannot divide object of type `Literal[4]` by zero --> test.py:2:5 | 2 | y = 4 / 0 @@ -680,7 +680,7 @@ fn exit_code_only_warnings() -> anyhow::Result<()> { success: true exit_code: 0 ----- stdout ----- - warning: lint:unresolved-reference: Name `x` used when not defined + warning: unresolved-reference: Name `x` used when not defined --> test.py:1:7 | 1 | print(x) # [unresolved-reference] @@ -764,7 +764,7 @@ fn exit_code_no_errors_but_error_on_warning_is_true() -> anyhow::Result<()> { success: false exit_code: 1 ----- stdout ----- - warning: lint:unresolved-reference: Name `x` used when not defined + warning: unresolved-reference: Name `x` used when not defined --> test.py:1:7 | 1 | print(x) # [unresolved-reference] @@ -797,7 +797,7 @@ fn exit_code_no_errors_but_error_on_warning_is_enabled_in_configuration() -> any success: false exit_code: 1 ----- stdout ----- - warning: lint:unresolved-reference: Name `x` used when not defined + warning: unresolved-reference: Name `x` used when not defined --> test.py:1:7 | 1 | print(x) # [unresolved-reference] @@ -827,7 +827,7 @@ fn exit_code_both_warnings_and_errors() -> anyhow::Result<()> { success: false exit_code: 1 ----- stdout ----- - warning: lint:unresolved-reference: Name `x` used when not defined + warning: unresolved-reference: Name `x` used when not defined --> test.py:2:7 | 2 | print(x) # [unresolved-reference] @@ -836,7 +836,7 @@ fn exit_code_both_warnings_and_errors() -> anyhow::Result<()> { | info: `lint:unresolved-reference` was selected on the command line - error: lint:non-subscriptable: Cannot subscript object of type `Literal[4]` with no `__getitem__` method + error: non-subscriptable: Cannot subscript object of type `Literal[4]` with no `__getitem__` method --> test.py:3:7 | 2 | print(x) # [unresolved-reference] @@ -867,7 +867,7 @@ fn exit_code_both_warnings_and_errors_and_error_on_warning_is_true() -> anyhow:: success: false exit_code: 1 ----- stdout ----- - warning: lint:unresolved-reference: Name `x` used when not defined + warning: unresolved-reference: Name `x` used when not defined --> test.py:2:7 | 2 | print(x) # [unresolved-reference] @@ -876,7 +876,7 @@ fn exit_code_both_warnings_and_errors_and_error_on_warning_is_true() -> anyhow:: | info: `lint:unresolved-reference` was selected on the command line - error: lint:non-subscriptable: Cannot subscript object of type `Literal[4]` with no `__getitem__` method + error: non-subscriptable: Cannot subscript object of type `Literal[4]` with no `__getitem__` method --> test.py:3:7 | 2 | print(x) # [unresolved-reference] @@ -907,7 +907,7 @@ fn exit_code_exit_zero_is_true() -> anyhow::Result<()> { success: true exit_code: 0 ----- stdout ----- - warning: lint:unresolved-reference: Name `x` used when not defined + warning: unresolved-reference: Name `x` used when not defined --> test.py:2:7 | 2 | print(x) # [unresolved-reference] @@ -916,7 +916,7 @@ fn exit_code_exit_zero_is_true() -> anyhow::Result<()> { | info: `lint:unresolved-reference` was selected on the command line - error: lint:non-subscriptable: Cannot subscript object of type `Literal[4]` with no `__getitem__` method + error: non-subscriptable: Cannot subscript object of type `Literal[4]` with no `__getitem__` method --> test.py:3:7 | 2 | print(x) # [unresolved-reference] @@ -969,7 +969,7 @@ fn user_configuration() -> anyhow::Result<()> { success: false exit_code: 1 ----- stdout ----- - warning: lint:division-by-zero: Cannot divide object of type `Literal[4]` by zero + warning: division-by-zero: Cannot divide object of type `Literal[4]` by zero --> main.py:2:5 | 2 | y = 4 / 0 @@ -979,7 +979,7 @@ fn user_configuration() -> anyhow::Result<()> { | info: `lint:division-by-zero` was selected in the configuration file - error: lint:unresolved-reference: Name `prin` used when not defined + error: unresolved-reference: Name `prin` used when not defined --> main.py:7:1 | 5 | x = a @@ -1013,7 +1013,7 @@ fn user_configuration() -> anyhow::Result<()> { success: true exit_code: 0 ----- stdout ----- - warning: lint:division-by-zero: Cannot divide object of type `Literal[4]` by zero + warning: division-by-zero: Cannot divide object of type `Literal[4]` by zero --> main.py:2:5 | 2 | y = 4 / 0 @@ -1023,7 +1023,7 @@ fn user_configuration() -> anyhow::Result<()> { | info: `lint:division-by-zero` was selected in the configuration file - warning: lint:unresolved-reference: Name `prin` used when not defined + warning: unresolved-reference: Name `prin` used when not defined --> main.py:7:1 | 5 | x = a @@ -1073,7 +1073,7 @@ fn check_specific_paths() -> anyhow::Result<()> { success: false exit_code: 1 ----- stdout ----- - error: lint:division-by-zero: Cannot divide object of type `Literal[4]` by zero + error: division-by-zero: Cannot divide object of type `Literal[4]` by zero --> project/main.py:2:5 | 2 | y = 4 / 0 # error: division-by-zero @@ -1081,7 +1081,7 @@ fn check_specific_paths() -> anyhow::Result<()> { | info: `lint:division-by-zero` is enabled by default - error: lint:unresolved-import: Cannot resolve imported module `main2` + error: unresolved-import: Cannot resolve imported module `main2` --> project/other.py:2:6 | 2 | from main2 import z # error: unresolved-import @@ -1091,7 +1091,7 @@ fn check_specific_paths() -> anyhow::Result<()> { | info: `lint:unresolved-import` is enabled by default - error: lint:unresolved-import: Cannot resolve imported module `does_not_exist` + error: unresolved-import: Cannot resolve imported module `does_not_exist` --> project/tests/test_main.py:2:8 | 2 | import does_not_exist # error: unresolved-import @@ -1113,7 +1113,7 @@ fn check_specific_paths() -> anyhow::Result<()> { success: false exit_code: 1 ----- stdout ----- - error: lint:unresolved-import: Cannot resolve imported module `main2` + error: unresolved-import: Cannot resolve imported module `main2` --> project/other.py:2:6 | 2 | from main2 import z # error: unresolved-import @@ -1123,7 +1123,7 @@ fn check_specific_paths() -> anyhow::Result<()> { | info: `lint:unresolved-import` is enabled by default - error: lint:unresolved-import: Cannot resolve imported module `does_not_exist` + error: unresolved-import: Cannot resolve imported module `does_not_exist` --> project/tests/test_main.py:2:8 | 2 | import does_not_exist # error: unresolved-import @@ -1185,8 +1185,8 @@ fn concise_diagnostics() -> anyhow::Result<()> { success: false exit_code: 1 ----- stdout ----- - warning[lint:unresolved-reference] test.py:2:7: Name `x` used when not defined - error[lint:non-subscriptable] test.py:3:7: Cannot subscript object of type `Literal[4]` with no `__getitem__` method + warning[unresolved-reference] test.py:2:7: Name `x` used when not defined + error[non-subscriptable] test.py:3:7: Cannot subscript object of type `Literal[4]` with no `__getitem__` method Found 2 diagnostics ----- stderr ----- @@ -1292,7 +1292,7 @@ fn defaults_to_a_new_python_version() -> anyhow::Result<()> { success: false exit_code: 1 ----- stdout ----- - error: lint:unresolved-attribute: Type `` has no attribute `grantpt` + error: unresolved-attribute: Type `` has no attribute `grantpt` --> main.py:4:1 | 2 | import os @@ -1347,7 +1347,7 @@ fn cli_config_args_toml_string_basic() -> anyhow::Result<()> { success: false exit_code: 1 ----- stdout ----- - warning: lint:unresolved-reference: Name `x` used when not defined + warning: unresolved-reference: Name `x` used when not defined --> test.py:1:7 | 1 | print(x) # [unresolved-reference] @@ -1358,14 +1358,14 @@ fn cli_config_args_toml_string_basic() -> anyhow::Result<()> { Found 1 diagnostic ----- stderr ----- - "); + "); // Short flag assert_cmd_snapshot!(case.command().arg("-c").arg("terminal.error-on-warning=true"), @r" success: false exit_code: 1 ----- stdout ----- - error: lint:unresolved-reference: Name `x` used when not defined + error: unresolved-reference: Name `x` used when not defined --> test.py:1:7 | 1 | print(x) # [unresolved-reference] @@ -1376,7 +1376,7 @@ fn cli_config_args_toml_string_basic() -> anyhow::Result<()> { Found 1 diagnostic ----- stderr ----- - "); + "); Ok(()) } @@ -1397,7 +1397,7 @@ fn cli_config_args_overrides_knot_toml() -> anyhow::Result<()> { success: true exit_code: 0 ----- stdout ----- - warning: lint:unresolved-reference: Name `x` used when not defined + warning: unresolved-reference: Name `x` used when not defined --> test.py:1:7 | 1 | print(x) # [unresolved-reference] @@ -1420,7 +1420,7 @@ fn cli_config_args_later_overrides_earlier() -> anyhow::Result<()> { success: true exit_code: 0 ----- stdout ----- - warning: lint:unresolved-reference: Name `x` used when not defined + warning: unresolved-reference: Name `x` used when not defined --> test.py:1:7 | 1 | print(x) # [unresolved-reference] diff --git a/crates/ty_ide/src/goto.rs b/crates/ty_ide/src/goto.rs index 33fb78a3df..e74237e7e0 100644 --- a/crates/ty_ide/src/goto.rs +++ b/crates/ty_ide/src/goto.rs @@ -273,7 +273,7 @@ mod tests { ); assert_snapshot!(test.goto_type_definition(), @r" - info: lint:goto-type-definition: Type definition + info: goto-type-definition: Type definition --> main.py:2:19 | 2 | class Test: ... @@ -305,7 +305,7 @@ mod tests { ); assert_snapshot!(test.goto_type_definition(), @r" - info: lint:goto-type-definition: Type definition + info: goto-type-definition: Type definition --> main.py:2:17 | 2 | def foo(a, b): ... @@ -343,7 +343,7 @@ mod tests { ); assert_snapshot!(test.goto_type_definition(), @r" - info: lint:goto-type-definition: Type definition + info: goto-type-definition: Type definition --> main.py:3:17 | 3 | def foo(a, b): ... @@ -360,7 +360,7 @@ mod tests { | ^ | - info: lint:goto-type-definition: Type definition + info: goto-type-definition: Type definition --> main.py:5:17 | 3 | def foo(a, b): ... @@ -394,7 +394,7 @@ mod tests { test.write_file("lib.py", "a = 10").unwrap(); assert_snapshot!(test.goto_type_definition(), @r" - info: lint:goto-type-definition: Type definition + info: goto-type-definition: Type definition --> lib.py:1:1 | 1 | a = 10 @@ -422,7 +422,7 @@ mod tests { ); assert_snapshot!(test.goto_type_definition(), @r#" - info: lint:goto-type-definition: Type definition + info: goto-type-definition: Type definition --> stdlib/builtins.pyi:438:7 | 436 | def __getitem__(self, key: int, /) -> str | int | None: ... @@ -451,7 +451,7 @@ mod tests { ); assert_snapshot!(test.goto_type_definition(), @r#" - info: lint:goto-type-definition: Type definition + info: goto-type-definition: Type definition --> stdlib/builtins.pyi:438:7 | 436 | def __getitem__(self, key: int, /) -> str | int | None: ... @@ -479,7 +479,7 @@ mod tests { ); assert_snapshot!(test.goto_type_definition(), @r" - info: lint:goto-type-definition: Type definition + info: goto-type-definition: Type definition --> main.py:2:24 | 2 | type Alias[T: int = bool] = list[T] @@ -533,7 +533,7 @@ mod tests { ); assert_snapshot!(test.goto_type_definition(), @r#" - info: lint:goto-type-definition: Type definition + info: goto-type-definition: Type definition --> stdlib/builtins.pyi:438:7 | 436 | def __getitem__(self, key: int, /) -> str | int | None: ... @@ -568,7 +568,7 @@ mod tests { // the keyword is typed as a string. It's only the passed argument that // is an int. Navigating to `str` would match pyright's behavior. assert_snapshot!(test.goto_type_definition(), @r" - info: lint:goto-type-definition: Type definition + info: goto-type-definition: Type definition --> stdlib/builtins.pyi:231:7 | 229 | _LiteralInteger = _PositiveInteger | _NegativeInteger | Literal[0] # noqa: Y026 # TODO: Use TypeAlias once mypy bugs are fixed @@ -602,7 +602,7 @@ f(**kwargs) ); assert_snapshot!(test.goto_type_definition(), @r#" - info: lint:goto-type-definition: Type definition + info: goto-type-definition: Type definition --> stdlib/builtins.pyi:1086:7 | 1084 | def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... @@ -633,7 +633,7 @@ f(**kwargs) ); assert_snapshot!(test.goto_type_definition(), @r" - info: lint:goto-type-definition: Type definition + info: goto-type-definition: Type definition --> stdlib/builtins.pyi:438:7 | 436 | def __getitem__(self, key: int, /) -> str | int | None: ... @@ -667,7 +667,7 @@ f(**kwargs) ); assert_snapshot!(test.goto_type_definition(), @r" - info: lint:goto-type-definition: Type definition + info: goto-type-definition: Type definition --> main.py:2:19 | 2 | class X: @@ -696,7 +696,7 @@ f(**kwargs) ); assert_snapshot!(test.goto_type_definition(), @r" - info: lint:goto-type-definition: Type definition + info: goto-type-definition: Type definition --> main.py:2:17 | 2 | def foo(a, b): ... @@ -726,7 +726,7 @@ f(**kwargs) ); assert_snapshot!(test.goto_type_definition(), @r" - info: lint:goto-type-definition: Type definition + info: goto-type-definition: Type definition --> stdlib/builtins.pyi:438:7 | 436 | def __getitem__(self, key: int, /) -> str | int | None: ... @@ -757,7 +757,7 @@ f(**kwargs) ); assert_snapshot!(test.goto_type_definition(), @r" - info: lint:goto-type-definition: Type definition + info: goto-type-definition: Type definition --> stdlib/types.pyi:671:11 | 669 | if sys.version_info >= (3, 10): @@ -774,7 +774,7 @@ f(**kwargs) | ^ | - info: lint:goto-type-definition: Type definition + info: goto-type-definition: Type definition --> stdlib/builtins.pyi:438:7 | 436 | def __getitem__(self, key: int, /) -> str | int | None: ... diff --git a/crates/ty_ide/src/hover.rs b/crates/ty_ide/src/hover.rs index 7ddd4212c4..2be8078f97 100644 --- a/crates/ty_ide/src/hover.rs +++ b/crates/ty_ide/src/hover.rs @@ -156,7 +156,7 @@ mod tests { Literal[10] ``` --------------------------------------------- - info: lint:hover: Hovered content is + info: hover: Hovered content is --> main.py:4:9 | 2 | a = 10 @@ -192,7 +192,7 @@ mod tests { int ``` --------------------------------------------- - info: lint:hover: Hovered content is + info: hover: Hovered content is --> main.py:10:9 | 9 | foo = Foo() @@ -222,7 +222,7 @@ mod tests { def foo(a, b) -> Unknown ``` --------------------------------------------- - info: lint:hover: Hovered content is + info: hover: Hovered content is --> main.py:4:13 | 2 | def foo(a, b): ... @@ -251,7 +251,7 @@ mod tests { bool ``` --------------------------------------------- - info: lint:hover: Hovered content is + info: hover: Hovered content is --> main.py:3:17 | 2 | def foo(a: int, b: int, c: int): @@ -282,7 +282,7 @@ mod tests { Literal[123] ``` --------------------------------------------- - info: lint:hover: Hovered content is + info: hover: Hovered content is --> main.py:4:18 | 2 | def test(a: int): ... @@ -320,7 +320,7 @@ mod tests { (def foo(a, b) -> Unknown) | (def bar(a, b) -> Unknown) ``` --------------------------------------------- - info: lint:hover: Hovered content is + info: hover: Hovered content is --> main.py:12:13 | 10 | a = bar @@ -352,7 +352,7 @@ mod tests { ``` --------------------------------------------- - info: lint:hover: Hovered content is + info: hover: Hovered content is --> main.py:4:13 | 2 | import lib @@ -381,7 +381,7 @@ mod tests { T ``` --------------------------------------------- - info: lint:hover: Hovered content is + info: hover: Hovered content is --> main.py:2:46 | 2 | type Alias[T: int = bool] = list[T] @@ -407,7 +407,7 @@ mod tests { @Todo ``` --------------------------------------------- - info: lint:hover: Hovered content is + info: hover: Hovered content is --> main.py:2:53 | 2 | type Alias[**P = [int, str]] = Callable[P, int] @@ -433,7 +433,7 @@ mod tests { @Todo ``` --------------------------------------------- - info: lint:hover: Hovered content is + info: hover: Hovered content is --> main.py:2:43 | 2 | type Alias[*Ts = ()] = tuple[*Ts] @@ -459,7 +459,7 @@ mod tests { Literal[1] ``` --------------------------------------------- - info: lint:hover: Hovered content is + info: hover: Hovered content is --> main.py:2:13 | 2 | value = 1 @@ -490,7 +490,7 @@ mod tests { Literal[1] ``` --------------------------------------------- - info: lint:hover: Hovered content is + info: hover: Hovered content is --> main.py:3:13 | 2 | value = 1 @@ -520,7 +520,7 @@ mod tests { Literal[2] ``` --------------------------------------------- - info: lint:hover: Hovered content is + info: hover: Hovered content is --> main.py:5:13 | 3 | attr: int = 1 @@ -553,7 +553,7 @@ mod tests { Unknown | Literal[1] ``` --------------------------------------------- - info: lint:hover: Hovered content is + info: hover: Hovered content is --> main.py:5:13 | 3 | attr = 1 @@ -582,7 +582,7 @@ mod tests { int ``` --------------------------------------------- - info: lint:hover: Hovered content is + info: hover: Hovered content is --> main.py:3:13 | 2 | class Foo: @@ -610,7 +610,7 @@ mod tests { Literal[1] ``` --------------------------------------------- - info: lint:hover: Hovered content is + info: hover: Hovered content is --> main.py:3:13 | 2 | class Foo: @@ -639,7 +639,7 @@ mod tests { int ``` --------------------------------------------- - info: lint:hover: Hovered content is + info: hover: Hovered content is --> main.py:4:17 | 2 | class Foo: @@ -669,7 +669,7 @@ mod tests { str ``` --------------------------------------------- - info: lint:hover: Hovered content is + info: hover: Hovered content is --> main.py:4:27 | 2 | def foo(a: str | None, b): diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_`__set__`_method_signature.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_`__set__`_method_signature.snap index b53dcdd199..b9d100775d 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_`__set__`_method_signature.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_`__set__`_method_signature.snap @@ -28,7 +28,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/attribute_as # Diagnostics ``` -error: lint:invalid-assignment: Invalid assignment to data descriptor attribute `attr` on type `C` with custom `__set__` method +error: invalid-assignment: Invalid assignment to data descriptor attribute `attr` on type `C` with custom `__set__` method --> src/mdtest_snippet.py:11:1 | 10 | # TODO: ideally, we would mention why this is an invalid assignment (wrong number of arguments for `__set__`) diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_argument_type.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_argument_type.snap index a20903b9d9..fdd3c84503 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_argument_type.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_argument_type.snap @@ -29,7 +29,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/attribute_as # Diagnostics ``` -error: lint:invalid-assignment: Invalid assignment to data descriptor attribute `attr` on type `C` with custom `__set__` method +error: invalid-assignment: Invalid assignment to data descriptor attribute `attr` on type `C` with custom `__set__` method --> src/mdtest_snippet.py:12:1 | 11 | # TODO: ideally, we would mention why this is an invalid assignment (wrong argument type for `value` parameter) diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Instance_attributes_with_class-level_defaults.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Instance_attributes_with_class-level_defaults.snap index 5c751f5eed..d694faad51 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Instance_attributes_with_class-level_defaults.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Instance_attributes_with_class-level_defaults.snap @@ -26,7 +26,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/attribute_as # Diagnostics ``` -error: lint:invalid-assignment: Object of type `Literal["wrong"]` is not assignable to attribute `attr` of type `int` +error: invalid-assignment: Object of type `Literal["wrong"]` is not assignable to attribute `attr` of type `int` --> src/mdtest_snippet.py:6:1 | 4 | instance = C() @@ -41,7 +41,7 @@ info: `lint:invalid-assignment` is enabled by default ``` ``` -error: lint:invalid-assignment: Object of type `Literal["wrong"]` is not assignable to attribute `attr` of type `int` +error: invalid-assignment: Object of type `Literal["wrong"]` is not assignable to attribute `attr` of type `int` --> src/mdtest_snippet.py:9:1 | 8 | C.attr = 1 # fine diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Possibly-unbound_attributes.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Possibly-unbound_attributes.snap index b89dec2de7..e0600e6c1d 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Possibly-unbound_attributes.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Possibly-unbound_attributes.snap @@ -26,7 +26,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/attribute_as # Diagnostics ``` -warning: lint:possibly-unbound-attribute: Attribute `attr` on type `` is possibly unbound +warning: possibly-unbound-attribute: Attribute `attr` on type `` is possibly unbound --> src/mdtest_snippet.py:6:5 | 4 | attr: int = 0 @@ -41,7 +41,7 @@ info: `lint:possibly-unbound-attribute` is enabled by default ``` ``` -warning: lint:possibly-unbound-attribute: Attribute `attr` on type `C` is possibly unbound +warning: possibly-unbound-attribute: Attribute `attr` on type `C` is possibly unbound --> src/mdtest_snippet.py:9:5 | 8 | instance = C() diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Pure_instance_attributes.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Pure_instance_attributes.snap index f298a50634..2fdbd0dbfe 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Pure_instance_attributes.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Pure_instance_attributes.snap @@ -26,7 +26,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/attribute_as # Diagnostics ``` -error: lint:invalid-assignment: Object of type `Literal["wrong"]` is not assignable to attribute `attr` of type `int` +error: invalid-assignment: Object of type `Literal["wrong"]` is not assignable to attribute `attr` of type `int` --> src/mdtest_snippet.py:7:1 | 5 | instance = C() @@ -41,7 +41,7 @@ info: `lint:invalid-assignment` is enabled by default ``` ``` -error: lint:invalid-attribute-access: Cannot assign to instance attribute `attr` from the class object `` +error: invalid-attribute-access: Cannot assign to instance attribute `attr` from the class object `` --> src/mdtest_snippet.py:9:1 | 7 | instance.attr = "wrong" # error: [invalid-assignment] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Setting_attributes_on_union_types.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Setting_attributes_on_union_types.snap index 12ce7acff5..c988a03105 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Setting_attributes_on_union_types.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Setting_attributes_on_union_types.snap @@ -37,7 +37,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/attribute_as # Diagnostics ``` -error: lint:invalid-assignment: Object of type `Literal[1]` is not assignable to attribute `attr` on type ` | ` +error: invalid-assignment: Object of type `Literal[1]` is not assignable to attribute `attr` on type ` | ` --> src/mdtest_snippet.py:11:5 | 10 | # TODO: The error message here could be improved to explain why the assignment fails. diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Unknown_attributes.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Unknown_attributes.snap index 2d718809bc..64dfb57754 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Unknown_attributes.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Unknown_attributes.snap @@ -23,7 +23,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/attribute_as # Diagnostics ``` -error: lint:unresolved-attribute: Unresolved attribute `non_existent` on type ``. +error: unresolved-attribute: Unresolved attribute `non_existent` on type ``. --> src/mdtest_snippet.py:3:1 | 1 | class C: ... @@ -38,7 +38,7 @@ info: `lint:unresolved-attribute` is enabled by default ``` ``` -error: lint:unresolved-attribute: Unresolved attribute `non_existent` on type `C`. +error: unresolved-attribute: Unresolved attribute `non_existent` on type `C`. --> src/mdtest_snippet.py:6:1 | 5 | instance = C() diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_`ClassVar`s.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_`ClassVar`s.snap index 26c791b068..7abad11b93 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_`ClassVar`s.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_`ClassVar`s.snap @@ -27,7 +27,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/attribute_as # Diagnostics ``` -error: lint:invalid-assignment: Object of type `Literal["wrong"]` is not assignable to attribute `attr` of type `int` +error: invalid-assignment: Object of type `Literal["wrong"]` is not assignable to attribute `attr` of type `int` --> src/mdtest_snippet.py:7:1 | 6 | C.attr = 1 # fine @@ -41,7 +41,7 @@ info: `lint:invalid-assignment` is enabled by default ``` ``` -error: lint:invalid-attribute-access: Cannot assign to ClassVar `attr` from an instance of type `C` +error: invalid-attribute-access: Cannot assign to ClassVar `attr` from an instance of type `C` --> src/mdtest_snippet.py:10:1 | 9 | instance = C() diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Multiple_objects_imported_from_an_unresolved_module.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Multiple_objects_imported_from_an_unresolved_module.snap index 55a9a4c308..32a0be2dd8 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Multiple_objects_imported_from_an_unresolved_module.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Multiple_objects_imported_from_an_unresolved_module.snap @@ -19,7 +19,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/import/basic.md # Diagnostics ``` -error: lint:unresolved-import: Cannot resolve imported module `does_not_exist` +error: unresolved-import: Cannot resolve imported module `does_not_exist` --> src/mdtest_snippet.py:2:6 | 1 | # error: [unresolved-import] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_module_import.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_module_import.snap index 02b4faa4f9..cc29c6d9f9 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_module_import.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_module_import.snap @@ -18,7 +18,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/import/basic.md # Diagnostics ``` -error: lint:unresolved-import: Cannot resolve imported module `zqzqzqzqzqzqzq` +error: unresolved-import: Cannot resolve imported module `zqzqzqzqzqzqzq` --> src/mdtest_snippet.py:1:8 | 1 | import zqzqzqzqzqzqzq # error: [unresolved-import] "Cannot resolve imported module `zqzqzqzqzqzqzq`" diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_submodule_imports.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_submodule_imports.snap index 6aa391407a..bdef1302e8 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_submodule_imports.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_submodule_imports.snap @@ -27,7 +27,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/import/basic.md # Diagnostics ``` -error: lint:unresolved-import: Cannot resolve imported module `a.foo` +error: unresolved-import: Cannot resolve imported module `a.foo` --> src/mdtest_snippet.py:2:8 | 1 | # Topmost component resolvable, submodule not resolvable: @@ -41,7 +41,7 @@ info: `lint:unresolved-import` is enabled by default ``` ``` -error: lint:unresolved-import: Cannot resolve imported module `b.foo` +error: unresolved-import: Cannot resolve imported module `b.foo` --> src/mdtest_snippet.py:5:8 | 4 | # Topmost component unresolvable: diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Bad_`__getitem__`_method.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Bad_`__getitem__`_method.snap index 65108494cc..a4d5c1325c 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Bad_`__getitem__`_method.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Bad_`__getitem__`_method.snap @@ -28,7 +28,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md # Diagnostics ``` -error: lint:not-iterable: Object of type `Iterable` is not iterable +error: not-iterable: Object of type `Iterable` is not iterable --> src/mdtest_snippet.py:10:10 | 9 | # error: [not-iterable] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Invalid_iterable.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Invalid_iterable.snap index 7edce31fcb..b60ad53e35 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Invalid_iterable.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Invalid_iterable.snap @@ -20,7 +20,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md # Diagnostics ``` -error: lint:not-iterable: Object of type `Literal[123]` is not iterable +error: not-iterable: Object of type `Literal[123]` is not iterable --> src/mdtest_snippet.py:2:10 | 1 | nonsense = 123 diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_New_over_old_style_iteration_protocol.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_New_over_old_style_iteration_protocol.snap index a3652652f4..ed96322d3e 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_New_over_old_style_iteration_protocol.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_New_over_old_style_iteration_protocol.snap @@ -24,7 +24,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md # Diagnostics ``` -error: lint:not-iterable: Object of type `NotIterable` is not iterable +error: not-iterable: Object of type `NotIterable` is not iterable --> src/mdtest_snippet.py:6:10 | 4 | __iter__: None = None diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_No_`__iter__`_method_and_`__getitem__`_is_not_callable.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_No_`__iter__`_method_and_`__getitem__`_is_not_callable.snap index 342b8c8bc5..90cc4e0f5f 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_No_`__iter__`_method_and_`__getitem__`_is_not_callable.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_No_`__iter__`_method_and_`__getitem__`_is_not_callable.snap @@ -25,7 +25,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md # Diagnostics ``` -error: lint:not-iterable: Object of type `Bad` is not iterable +error: not-iterable: Object of type `Bad` is not iterable --> src/mdtest_snippet.py:7:10 | 6 | # error: [not-iterable] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly-not-callable_`__getitem__`_method.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly-not-callable_`__getitem__`_method.snap index 49cf9efece..6eae5a2a36 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly-not-callable_`__getitem__`_method.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly-not-callable_`__getitem__`_method.snap @@ -46,7 +46,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md # Diagnostics ``` -error: lint:not-iterable: Object of type `Iterable1` may not be iterable +error: not-iterable: Object of type `Iterable1` may not be iterable --> src/mdtest_snippet.py:22:14 | 21 | # error: [not-iterable] @@ -76,7 +76,7 @@ info: revealed-type: Revealed type ``` ``` -error: lint:not-iterable: Object of type `Iterable2` may not be iterable +error: not-iterable: Object of type `Iterable2` may not be iterable --> src/mdtest_snippet.py:27:14 | 26 | # error: [not-iterable] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__getitem__`_methods.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__getitem__`_methods.snap index 957b6387ce..e63d5db66b 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__getitem__`_methods.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__getitem__`_methods.snap @@ -43,7 +43,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md # Diagnostics ``` -error: lint:not-iterable: Object of type `Iterable1` may not be iterable +error: not-iterable: Object of type `Iterable1` may not be iterable --> src/mdtest_snippet.py:20:14 | 19 | # error: [not-iterable] @@ -73,7 +73,7 @@ info: revealed-type: Revealed type ``` ``` -error: lint:not-iterable: Object of type `Iterable2` may not be iterable +error: not-iterable: Object of type `Iterable2` may not be iterable --> src/mdtest_snippet.py:25:14 | 24 | # error: [not-iterable] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__iter__`_methods.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__iter__`_methods.snap index adc774f250..5d328986a6 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__iter__`_methods.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__iter__`_methods.snap @@ -47,7 +47,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md # Diagnostics ``` -error: lint:not-iterable: Object of type `Iterable1` may not be iterable +error: not-iterable: Object of type `Iterable1` may not be iterable --> src/mdtest_snippet.py:17:14 | 16 | # error: [not-iterable] @@ -77,7 +77,7 @@ info: revealed-type: Revealed type ``` ``` -error: lint:not-iterable: Object of type `Iterable2` may not be iterable +error: not-iterable: Object of type `Iterable2` may not be iterable --> src/mdtest_snippet.py:28:14 | 27 | # error: [not-iterable] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__next__`_method.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__next__`_method.snap index dd4825a5ee..a0acdaaac5 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__next__`_method.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__next__`_method.snap @@ -51,7 +51,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md # Diagnostics ``` -error: lint:not-iterable: Object of type `Iterable1` may not be iterable +error: not-iterable: Object of type `Iterable1` may not be iterable --> src/mdtest_snippet.py:28:14 | 27 | # error: [not-iterable] @@ -80,7 +80,7 @@ info: revealed-type: Revealed type ``` ``` -error: lint:not-iterable: Object of type `Iterable2` may not be iterable +error: not-iterable: Object of type `Iterable2` may not be iterable --> src/mdtest_snippet.py:32:14 | 31 | # error: [not-iterable] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_bad_`__getitem__`_method.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_bad_`__getitem__`_method.snap index f8816426e6..964da72329 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_bad_`__getitem__`_method.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_bad_`__getitem__`_method.snap @@ -36,7 +36,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md # Diagnostics ``` -error: lint:not-iterable: Object of type `Iterable` may not be iterable +error: not-iterable: Object of type `Iterable` may not be iterable --> src/mdtest_snippet.py:18:14 | 17 | # error: [not-iterable] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_invalid_`__getitem__`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_invalid_`__getitem__`.snap index 392888fb7a..5eff683469 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_invalid_`__getitem__`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_invalid_`__getitem__`.snap @@ -54,7 +54,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md # Diagnostics ``` -error: lint:not-iterable: Object of type `Iterable1` may not be iterable +error: not-iterable: Object of type `Iterable1` may not be iterable --> src/mdtest_snippet.py:31:14 | 30 | # error: [not-iterable] @@ -83,7 +83,7 @@ info: revealed-type: Revealed type ``` ``` -error: lint:not-iterable: Object of type `Iterable2` may not be iterable +error: not-iterable: Object of type `Iterable2` may not be iterable --> src/mdtest_snippet.py:36:14 | 35 | # error: [not-iterable] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_unbound_`__getitem__`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_unbound_`__getitem__`.snap index 7675649b84..b6980e3539 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_unbound_`__getitem__`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_unbound_`__getitem__`.snap @@ -35,7 +35,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md # Diagnostics ``` -error: lint:not-iterable: Object of type `Iterable` may not be iterable +error: not-iterable: Object of type `Iterable` may not be iterable --> src/mdtest_snippet.py:17:14 | 16 | # error: [not-iterable] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_invalid_`__iter__`_method.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_invalid_`__iter__`_method.snap index 8bc698888d..2534a4a67d 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_invalid_`__iter__`_method.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_invalid_`__iter__`_method.snap @@ -36,7 +36,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md # Diagnostics ``` -error: lint:not-iterable: Object of type `Test | Test2` may not be iterable +error: not-iterable: Object of type `Test | Test2` may not be iterable --> src/mdtest_snippet.py:18:14 | 16 | # TODO: Improve error message to state which union variant isn't iterable (https://github.com/astral-sh/ruff/issues/13989) diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_no_`__iter__`_method.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_no_`__iter__`_method.snap index 2e2f459d4d..a8c8cd1e24 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_no_`__iter__`_method.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_no_`__iter__`_method.snap @@ -31,7 +31,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md # Diagnostics ``` -error: lint:not-iterable: Object of type `Test | Literal[42]` may not be iterable +error: not-iterable: Object of type `Test | Literal[42]` may not be iterable --> src/mdtest_snippet.py:13:14 | 11 | def _(flag: bool): diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_With_non-callable_iterator.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_With_non-callable_iterator.snap index 9a629a7607..3dacb77373 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_With_non-callable_iterator.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_With_non-callable_iterator.snap @@ -33,7 +33,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md # Diagnostics ``` -error: lint:not-iterable: Object of type `NotIterable` is not iterable +error: not-iterable: Object of type `NotIterable` is not iterable --> src/mdtest_snippet.py:11:14 | 10 | # error: [not-iterable] @@ -47,7 +47,7 @@ info: `lint:not-iterable` is enabled by default ``` ``` -info: lint:possibly-unresolved-reference: Name `x` used when possibly not defined +info: possibly-unresolved-reference: Name `x` used when possibly not defined --> src/mdtest_snippet.py:16:17 | 14 | # revealed: Unknown diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_does_not_return_an_iterator.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_does_not_return_an_iterator.snap index 866e2c1fd0..8830b45e77 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_does_not_return_an_iterator.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_does_not_return_an_iterator.snap @@ -26,7 +26,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md # Diagnostics ``` -error: lint:not-iterable: Object of type `Bad` is not iterable +error: not-iterable: Object of type `Bad` is not iterable --> src/mdtest_snippet.py:8:10 | 7 | # error: [not-iterable] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_method_with_a_bad_signature.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_method_with_a_bad_signature.snap index a1348bde27..9ccb8f053d 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_method_with_a_bad_signature.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_method_with_a_bad_signature.snap @@ -30,7 +30,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md # Diagnostics ``` -error: lint:not-iterable: Object of type `Iterable` is not iterable +error: not-iterable: Object of type `Iterable` is not iterable --> src/mdtest_snippet.py:12:10 | 11 | # error: [not-iterable] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_returns_an_iterator_with_an_invalid_`__next__`_method.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_returns_an_iterator_with_an_invalid_`__next__`_method.snap index 89e7d45161..363bb3b824 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_returns_an_iterator_with_an_invalid_`__next__`_method.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_returns_an_iterator_with_an_invalid_`__next__`_method.snap @@ -41,7 +41,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md # Diagnostics ``` -error: lint:not-iterable: Object of type `Iterable1` is not iterable +error: not-iterable: Object of type `Iterable1` is not iterable --> src/mdtest_snippet.py:19:10 | 18 | # error: [not-iterable] @@ -70,7 +70,7 @@ info: revealed-type: Revealed type ``` ``` -error: lint:not-iterable: Object of type `Iterable2` is not iterable +error: not-iterable: Object of type `Iterable2` is not iterable --> src/mdtest_snippet.py:23:10 | 22 | # error: [not-iterable] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_bound_typevar.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_bound_typevar.snap index 4a954abcc2..8a7dee8a82 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_bound_typevar.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_bound_typevar.snap @@ -68,7 +68,7 @@ info: revealed-type: Revealed type ``` ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:12:15 | 10 | reveal_type(f(True)) # revealed: Literal[True] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_constrained_typevar.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_constrained_typevar.snap index 625de69be8..b5d7be74f0 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_constrained_typevar.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_constrained_typevar.snap @@ -83,7 +83,7 @@ info: revealed-type: Revealed type ``` ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:13:15 | 11 | reveal_type(f(None)) # revealed: None diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_bound_typevar.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_bound_typevar.snap index d6aa5e4c3e..ab4ebc5baa 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_bound_typevar.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_bound_typevar.snap @@ -65,7 +65,7 @@ info: revealed-type: Revealed type ``` ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:9:15 | 7 | reveal_type(f(True)) # revealed: Literal[True] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_constrained_typevar.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_constrained_typevar.snap index ff37d59054..7e16af964c 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_constrained_typevar.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_constrained_typevar.snap @@ -80,7 +80,7 @@ info: revealed-type: Revealed type ``` ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:10:15 | 8 | reveal_type(f(None)) # revealed: None diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/instances.md_-_Binary_operations_on_instances_-_Operations_involving_types_with_invalid_`__bool__`_methods.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/instances.md_-_Binary_operations_on_instances_-_Operations_involving_types_with_invalid_`__bool__`_methods.snap index 19fa88e140..73bfe037a8 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/instances.md_-_Binary_operations_on_instances_-_Operations_involving_types_with_invalid_`__bool__`_methods.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/instances.md_-_Binary_operations_on_instances_-_Operations_involving_types_with_invalid_`__bool__`_methods.snap @@ -24,7 +24,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/binary/instances.md # Diagnostics ``` -error: lint:unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` +error: unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` --> src/mdtest_snippet.py:7:8 | 6 | # error: [unsupported-bool-conversion] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Basic.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Basic.snap index dd591bfeae..0eaf0def78 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Basic.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Basic.snap @@ -21,7 +21,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argu # Diagnostics ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:4:5 | 2 | return x * x diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Calls_to_methods.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Calls_to_methods.snap index 6afa697351..85d86c07e6 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Calls_to_methods.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Calls_to_methods.snap @@ -23,7 +23,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argu # Diagnostics ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:6:10 | 5 | c = C() diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_files.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_files.snap index d50a63a7c3..c700044596 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_files.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_files.snap @@ -27,7 +27,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argu # Diagnostics ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:3:13 | 1 | import package diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_source_order.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_source_order.snap index 664549b08c..ff6d44b10c 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_source_order.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_source_order.snap @@ -22,7 +22,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argu # Diagnostics ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:2:9 | 1 | def bar(): diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters.snap index feeb29395e..6d5d68b1a9 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters.snap @@ -21,7 +21,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argu # Diagnostics ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:4:8 | 2 | return x * y * z diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_across_multiple_lines.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_across_multiple_lines.snap index 64decc7001..65c52aa2ac 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_across_multiple_lines.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_across_multiple_lines.snap @@ -25,7 +25,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argu # Diagnostics ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:8:8 | 6 | return x * y * z diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_with_multiple_invalid_arguments.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_with_multiple_invalid_arguments.snap index 9bfbcdfa35..d1597ec1ae 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_with_multiple_invalid_arguments.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_with_multiple_invalid_arguments.snap @@ -24,7 +24,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argu # Diagnostics ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:7:5 | 5 | # error: [invalid-argument-type] @@ -44,7 +44,7 @@ info: `lint:invalid-argument-type` is enabled by default ``` ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:7:10 | 5 | # error: [invalid-argument-type] @@ -64,7 +64,7 @@ info: `lint:invalid-argument-type` is enabled by default ``` ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:7:15 | 5 | # error: [invalid-argument-type] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Test_calling_a_function_whose_type_is_vendored_from_`typeshed`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Test_calling_a_function_whose_type_is_vendored_from_`typeshed`.snap index 33866a446f..4b9b03afb8 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Test_calling_a_function_whose_type_is_vendored_from_`typeshed`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Test_calling_a_function_whose_type_is_vendored_from_`typeshed`.snap @@ -20,7 +20,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argu # Diagnostics ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:3:12 | 1 | import json diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Keyword_only_arguments.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Keyword_only_arguments.snap index 391d601299..38be05a405 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Keyword_only_arguments.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Keyword_only_arguments.snap @@ -21,7 +21,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argu # Diagnostics ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:4:11 | 2 | return x * y * z diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Mix_of_arguments.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Mix_of_arguments.snap index b640b327f1..0038ac8fe1 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Mix_of_arguments.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Mix_of_arguments.snap @@ -21,7 +21,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argu # Diagnostics ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:4:11 | 2 | return x * y * z diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_One_keyword_argument.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_One_keyword_argument.snap index e2eb000687..d86620e467 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_One_keyword_argument.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_One_keyword_argument.snap @@ -21,7 +21,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argu # Diagnostics ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:4:11 | 2 | return x * y * z diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Only_positional.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Only_positional.snap index 0882b9da34..2f6b19fcc4 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Only_positional.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Only_positional.snap @@ -21,7 +21,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argu # Diagnostics ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:4:8 | 2 | return x * y * z diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Synthetic_arguments.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Synthetic_arguments.snap index 7d171de423..aa33843967 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Synthetic_arguments.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Synthetic_arguments.snap @@ -23,7 +23,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argu # Diagnostics ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:6:3 | 5 | c = C() diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_arguments.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_arguments.snap index ac693e5fd8..e87dc36048 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_arguments.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_arguments.snap @@ -21,7 +21,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argu # Diagnostics ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:4:14 | 2 | return len(numbers) diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_keyword_arguments.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_keyword_arguments.snap index 0090d09ae3..756e25e913 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_keyword_arguments.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_keyword_arguments.snap @@ -21,7 +21,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argu # Diagnostics ``` -error: lint:invalid-argument-type: Argument to this function is incorrect +error: invalid-argument-type: Argument to this function is incorrect --> src/mdtest_snippet.py:4:20 | 2 | return len(numbers) diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/membership_test.md_-_Comparison___Membership_Test_-_Return_type_that_doesn't_implement_`__bool__`_correctly.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/membership_test.md_-_Comparison___Membership_Test_-_Return_type_that_doesn't_implement_`__bool__`_correctly.snap index d4fdcd30a8..bcc2237e38 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/membership_test.md_-_Comparison___Membership_Test_-_Return_type_that_doesn't_implement_`__bool__`_correctly.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/membership_test.md_-_Comparison___Membership_Test_-_Return_type_that_doesn't_implement_`__bool__`_correctly.snap @@ -28,7 +28,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/comparison/instances/mem # Diagnostics ``` -error: lint:unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` +error: unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` --> src/mdtest_snippet.py:9:1 | 8 | # error: [unsupported-bool-conversion] @@ -43,7 +43,7 @@ info: `lint:unsupported-bool-conversion` is enabled by default ``` ``` -error: lint:unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` +error: unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` --> src/mdtest_snippet.py:11:1 | 9 | 10 in WithContains() diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/mro.md_-_Method_Resolution_Order_tests_-_`__bases__`_lists_with_duplicate_bases.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/mro.md_-_Method_Resolution_Order_tests_-_`__bases__`_lists_with_duplicate_bases.snap index 3a9c1f0128..d6e3805b1b 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/mro.md_-_Method_Resolution_Order_tests_-_`__bases__`_lists_with_duplicate_bases.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/mro.md_-_Method_Resolution_Order_tests_-_`__bases__`_lists_with_duplicate_bases.snap @@ -100,7 +100,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/mro.md # Diagnostics ``` -error: lint:duplicate-base: Duplicate base class `str` +error: duplicate-base: Duplicate base class `str` --> src/mdtest_snippet.py:3:7 | 1 | from typing_extensions import reveal_type @@ -141,7 +141,7 @@ info: revealed-type: Revealed type ``` ``` -error: lint:duplicate-base: Duplicate base class `Spam` +error: duplicate-base: Duplicate base class `Spam` --> src/mdtest_snippet.py:16:7 | 14 | # error: [duplicate-base] "Duplicate base class `Spam`" @@ -179,7 +179,7 @@ info: `lint:duplicate-base` is enabled by default ``` ``` -error: lint:duplicate-base: Duplicate base class `Eggs` +error: duplicate-base: Duplicate base class `Eggs` --> src/mdtest_snippet.py:16:7 | 14 | # error: [duplicate-base] "Duplicate base class `Spam`" @@ -230,7 +230,7 @@ info: revealed-type: Revealed type ``` ``` -error: lint:duplicate-base: Duplicate base class `Mushrooms` +error: duplicate-base: Duplicate base class `Mushrooms` --> src/mdtest_snippet.py:30:7 | 29 | class Mushrooms: ... @@ -269,7 +269,7 @@ info: revealed-type: Revealed type ``` ``` -error: lint:duplicate-base: Duplicate base class `Eggs` +error: duplicate-base: Duplicate base class `Eggs` --> src/mdtest_snippet.py:37:7 | 36 | # error: [duplicate-base] "Duplicate base class `Eggs`" @@ -314,7 +314,7 @@ info: `lint:duplicate-base` is enabled by default ``` ``` -error: lint:duplicate-base: Duplicate base class `A` +error: duplicate-base: Duplicate base class `A` --> src/mdtest_snippet.py:69:7 | 68 | # error: [duplicate-base] @@ -345,7 +345,7 @@ info: `lint:duplicate-base` is enabled by default ``` ``` -info: lint:unused-ignore-comment +info: unused-ignore-comment --> src/mdtest_snippet.py:72:9 | 70 | A, @@ -358,7 +358,7 @@ info: lint:unused-ignore-comment ``` ``` -error: lint:duplicate-base: Duplicate base class `A` +error: duplicate-base: Duplicate base class `A` --> src/mdtest_snippet.py:76:7 | 75 | # error: [duplicate-base] @@ -388,7 +388,7 @@ info: `lint:duplicate-base` is enabled by default ``` ``` -info: lint:unused-ignore-comment +info: unused-ignore-comment --> src/mdtest_snippet.py:81:13 | 79 | ): diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/no_matching_overload.md_-_No_matching_overload_diagnostics_-_Calls_to_overloaded_functions.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/no_matching_overload.md_-_No_matching_overload_diagnostics_-_Calls_to_overloaded_functions.snap index 28145569b4..03a8f755d6 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/no_matching_overload.md_-_No_matching_overload_diagnostics_-_Calls_to_overloaded_functions.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/no_matching_overload.md_-_No_matching_overload_diagnostics_-_Calls_to_overloaded_functions.snap @@ -18,7 +18,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/no_matching_ # Diagnostics ``` -error: lint:no-matching-overload: No overload of class `type` matches arguments +error: no-matching-overload: No overload of class `type` matches arguments --> src/mdtest_snippet.py:1:1 | 1 | type("Foo", ()) # error: [no-matching-overload] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/not.md_-_Unary_not_-_Object_that_implements_`__bool__`_incorrectly.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/not.md_-_Unary_not_-_Object_that_implements_`__bool__`_incorrectly.snap index cce0aae738..d4035388ea 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/not.md_-_Unary_not_-_Object_that_implements_`__bool__`_incorrectly.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/not.md_-_Unary_not_-_Object_that_implements_`__bool__`_incorrectly.snap @@ -22,7 +22,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/unary/not.md # Diagnostics ``` -error: lint:unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` +error: unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` --> src/mdtest_snippet.py:5:1 | 4 | # error: [unsupported-bool-conversion] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_At_least_two_overloads.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_At_least_two_overloads.snap index 83d8e5a05b..b949e23f46 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_At_least_two_overloads.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_At_least_two_overloads.snap @@ -35,7 +35,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/overloads.md # Diagnostics ``` -error: lint:invalid-overload: Overloaded function `func` requires at least two overloads +error: invalid-overload: Overloaded function `func` requires at least two overloads --> src/mdtest_snippet.py:4:5 | 3 | @overload @@ -52,7 +52,7 @@ info: `lint:invalid-overload` is enabled by default ``` ``` -error: lint:invalid-overload: Overloaded function `func` requires at least two overloads +error: invalid-overload: Overloaded function `func` requires at least two overloads --> src/mdtest_snippet.pyi:5:5 | 3 | @overload diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@classmethod`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@classmethod`.snap index 645793de8a..95f38287e1 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@classmethod`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@classmethod`.snap @@ -72,7 +72,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/overloads.md # Diagnostics ``` -error: lint:invalid-overload: Overloaded function `try_from1` does not use the `@classmethod` decorator consistently +error: invalid-overload: Overloaded function `try_from1` does not use the `@classmethod` decorator consistently --> src/mdtest_snippet.py:13:9 | 11 | def try_from1(cls, x: int) -> CheckClassMethod: ... @@ -91,7 +91,7 @@ info: `lint:invalid-overload` is enabled by default ``` ``` -error: lint:invalid-overload: Overloaded function `try_from2` does not use the `@classmethod` decorator consistently +error: invalid-overload: Overloaded function `try_from2` does not use the `@classmethod` decorator consistently --> src/mdtest_snippet.py:28:9 | 26 | @classmethod @@ -114,7 +114,7 @@ info: `lint:invalid-overload` is enabled by default ``` ``` -error: lint:invalid-overload: Overloaded function `try_from3` does not use the `@classmethod` decorator consistently +error: invalid-overload: Overloaded function `try_from3` does not use the `@classmethod` decorator consistently --> src/mdtest_snippet.py:40:9 | 38 | def try_from3(cls, x: str) -> None: ... diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@final`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@final`.snap index 19a6d9d4b7..c439fdcc43 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@final`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@final`.snap @@ -65,7 +65,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/overloads.md # Diagnostics ``` -error: lint:invalid-overload: `@final` decorator should be applied only to the overload implementation +error: invalid-overload: `@final` decorator should be applied only to the overload implementation --> src/mdtest_snippet.py:18:9 | 16 | def method2(self, x: str) -> str: ... @@ -81,7 +81,7 @@ info: `lint:invalid-overload` is enabled by default ``` ``` -error: lint:invalid-overload: `@final` decorator should be applied only to the overload implementation +error: invalid-overload: `@final` decorator should be applied only to the overload implementation --> src/mdtest_snippet.py:27:9 | 25 | def method3(self, x: str) -> str: ... @@ -97,7 +97,7 @@ info: `lint:invalid-overload` is enabled by default ``` ``` -error: lint:invalid-overload: `@final` decorator should be applied only to the first overload +error: invalid-overload: `@final` decorator should be applied only to the first overload --> src/mdtest_snippet.pyi:11:9 | 10 | @overload diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@override`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@override`.snap index bdb11b71ca..df066eb8f7 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@override`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@override`.snap @@ -82,7 +82,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/overloads.md # Diagnostics ``` -error: lint:invalid-overload: `@override` decorator should be applied only to the overload implementation +error: invalid-overload: `@override` decorator should be applied only to the overload implementation --> src/mdtest_snippet.py:27:9 | 25 | def method(self, x: str) -> str: ... @@ -98,7 +98,7 @@ info: `lint:invalid-overload` is enabled by default ``` ``` -error: lint:invalid-overload: `@override` decorator should be applied only to the overload implementation +error: invalid-overload: `@override` decorator should be applied only to the overload implementation --> src/mdtest_snippet.py:37:9 | 35 | def method(self, x: str) -> str: ... @@ -114,7 +114,7 @@ info: `lint:invalid-overload` is enabled by default ``` ``` -error: lint:invalid-overload: `@override` decorator should be applied only to the first overload +error: invalid-overload: `@override` decorator should be applied only to the first overload --> src/mdtest_snippet.pyi:18:9 | 16 | class Sub2(Base): diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Overload_without_an_implementation_-_Regular_modules.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Overload_without_an_implementation_-_Regular_modules.snap index 4bfdcf3cea..e77bb06e06 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Overload_without_an_implementation_-_Regular_modules.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Overload_without_an_implementation_-_Regular_modules.snap @@ -31,7 +31,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/overloads.md # Diagnostics ``` -error: lint:invalid-overload: Overloaded non-stub function `func` must have an implementation +error: invalid-overload: Overloaded non-stub function `func` must have an implementation --> src/mdtest_snippet.py:7:5 | 5 | @overload @@ -46,7 +46,7 @@ info: `lint:invalid-overload` is enabled by default ``` ``` -error: lint:invalid-overload: Overloaded non-stub function `method` must have an implementation +error: invalid-overload: Overloaded non-stub function `method` must have an implementation --> src/mdtest_snippet.py:14:9 | 12 | @overload diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Calls_to_protocol_classes.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Calls_to_protocol_classes.snap index ea1b8bf2cf..54d7a4d90a 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Calls_to_protocol_classes.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Calls_to_protocol_classes.snap @@ -42,7 +42,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/protocols.md # Diagnostics ``` -error: lint:call-non-callable: Object of type `typing.Protocol` is not callable +error: call-non-callable: Object of type `typing.Protocol` is not callable --> src/mdtest_snippet.py:4:13 | 3 | # error: [call-non-callable] @@ -69,7 +69,7 @@ info: revealed-type: Revealed type ``` ``` -error: lint:call-non-callable: Cannot instantiate class `MyProtocol` +error: call-non-callable: Cannot instantiate class `MyProtocol` --> src/mdtest_snippet.py:10:13 | 9 | # error: [call-non-callable] "Cannot instantiate class `MyProtocol`" @@ -105,7 +105,7 @@ info: revealed-type: Revealed type ``` ``` -error: lint:call-non-callable: Cannot instantiate class `GenericProtocol` +error: call-non-callable: Cannot instantiate class `GenericProtocol` --> src/mdtest_snippet.py:16:13 | 15 | # error: [call-non-callable] "Cannot instantiate class `GenericProtocol`" diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Invalid_calls_to_`get_protocol_members()`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Invalid_calls_to_`get_protocol_members()`.snap index b15caa71aa..e16368b52e 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Invalid_calls_to_`get_protocol_members()`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Invalid_calls_to_`get_protocol_members()`.snap @@ -29,7 +29,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/protocols.md # Diagnostics ``` -error: lint:invalid-argument-type: Invalid argument to `get_protocol_members` +error: invalid-argument-type: Invalid argument to `get_protocol_members` --> src/mdtest_snippet.py:5:1 | 3 | class NotAProtocol: ... @@ -57,7 +57,7 @@ info: `lint:invalid-argument-type` is enabled by default ``` ``` -error: lint:invalid-argument-type: Invalid argument to `get_protocol_members` +error: invalid-argument-type: Invalid argument to `get_protocol_members` --> src/mdtest_snippet.py:9:1 | 7 | class AlsoNotAProtocol(NotAProtocol, object): ... diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Narrowing_of_protocols.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Narrowing_of_protocols.snap index 49cd714631..a94cc6a076 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Narrowing_of_protocols.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Narrowing_of_protocols.snap @@ -57,7 +57,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/protocols.md # Diagnostics ``` -error: lint:invalid-argument-type: Class `HasX` cannot be used as the second argument to `isinstance` +error: invalid-argument-type: Class `HasX` cannot be used as the second argument to `isinstance` --> src/mdtest_snippet.py:7:8 | 6 | def f(arg: object, arg2: type): @@ -110,7 +110,7 @@ info: revealed-type: Revealed type ``` ``` -error: lint:invalid-argument-type: Class `HasX` cannot be used as the second argument to `issubclass` +error: invalid-argument-type: Class `HasX` cannot be used as the second argument to `issubclass` --> src/mdtest_snippet.py:12:8 | 10 | reveal_type(arg) # revealed: ~HasX diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Generator_functions.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Generator_functions.snap index 9df644ff80..20c898f52a 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Generator_functions.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Generator_functions.snap @@ -54,7 +54,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/function/return_type.md # Diagnostics ``` -error: lint:invalid-return-type: Return type does not match returned value +error: invalid-return-type: Return type does not match returned value --> src/mdtest_snippet.py:19:12 | 17 | yield from i() @@ -71,7 +71,7 @@ info: `lint:invalid-return-type` is enabled by default ``` ``` -error: lint:invalid-return-type: Return type does not match returned value +error: invalid-return-type: Return type does not match returned value --> src/mdtest_snippet.py:36:18 | 34 | yield 42 diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_conditional_return_type.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_conditional_return_type.snap index ed3329dbee..50d62c9c7c 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_conditional_return_type.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_conditional_return_type.snap @@ -31,7 +31,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/function/return_type.md # Diagnostics ``` -error: lint:invalid-return-type: Return type does not match returned value +error: invalid-return-type: Return type does not match returned value --> src/mdtest_snippet.py:1:22 | 1 | def f(cond: bool) -> str: @@ -50,7 +50,7 @@ info: `lint:invalid-return-type` is enabled by default ``` ``` -error: lint:invalid-return-type: Return type does not match returned value +error: invalid-return-type: Return type does not match returned value --> src/mdtest_snippet.py:8:22 | 6 | return 1 @@ -69,7 +69,7 @@ info: `lint:invalid-return-type` is enabled by default ``` ``` -error: lint:invalid-return-type: Return type does not match returned value +error: invalid-return-type: Return type does not match returned value --> src/mdtest_snippet.py:14:16 | 12 | else: diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_implicit_return_type.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_implicit_return_type.snap index 5261bc4177..799092b5c4 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_implicit_return_type.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_implicit_return_type.snap @@ -40,7 +40,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/function/return_type.md # Diagnostics ``` -error: lint:invalid-return-type: Return type does not match returned value +error: invalid-return-type: Return type does not match returned value --> src/mdtest_snippet.py:1:12 | 1 | def f() -> None: @@ -57,7 +57,7 @@ info: `lint:invalid-return-type` is enabled by default ``` ``` -error: lint:invalid-return-type: Function can implicitly return `None`, which is not assignable to return type `int` +error: invalid-return-type: Function can implicitly return `None`, which is not assignable to return type `int` --> src/mdtest_snippet.py:7:22 | 6 | # error: [invalid-return-type] @@ -71,7 +71,7 @@ info: `lint:invalid-return-type` is enabled by default ``` ``` -error: lint:invalid-return-type: Function can implicitly return `None`, which is not assignable to return type `int` +error: invalid-return-type: Function can implicitly return `None`, which is not assignable to return type `int` --> src/mdtest_snippet.py:12:22 | 11 | # error: [invalid-return-type] @@ -85,7 +85,7 @@ info: `lint:invalid-return-type` is enabled by default ``` ``` -error: lint:invalid-return-type: Function can implicitly return `None`, which is not assignable to return type `int` +error: invalid-return-type: Function can implicitly return `None`, which is not assignable to return type `int` --> src/mdtest_snippet.py:17:22 | 16 | # error: [invalid-return-type] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type.snap index d97433cb54..9fda3e9907 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type.snap @@ -35,7 +35,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/function/return_type.md # Diagnostics ``` -error: lint:invalid-return-type: Function can implicitly return `None`, which is not assignable to return type `int` +error: invalid-return-type: Function can implicitly return `None`, which is not assignable to return type `int` --> src/mdtest_snippet.py:2:12 | 1 | # error: [invalid-return-type] @@ -48,7 +48,7 @@ info: `lint:invalid-return-type` is enabled by default ``` ``` -error: lint:invalid-return-type: Return type does not match returned value +error: invalid-return-type: Return type does not match returned value --> src/mdtest_snippet.py:5:12 | 3 | 1 @@ -66,7 +66,7 @@ info: `lint:invalid-return-type` is enabled by default ``` ``` -error: lint:invalid-return-type: Return type does not match returned value +error: invalid-return-type: Return type does not match returned value --> src/mdtest_snippet.py:9:12 | 7 | return 1 @@ -84,7 +84,7 @@ info: `lint:invalid-return-type` is enabled by default ``` ``` -error: lint:invalid-return-type: Function can implicitly return `None`, which is not assignable to return type `T` +error: invalid-return-type: Function can implicitly return `None`, which is not assignable to return type `T` --> src/mdtest_snippet.py:18:16 | 17 | # error: [invalid-return-type] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type_in_stub_file.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type_in_stub_file.snap index 28afc42785..d63d98fe40 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type_in_stub_file.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type_in_stub_file.snap @@ -30,7 +30,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/function/return_type.md # Diagnostics ``` -error: lint:invalid-return-type: Return type does not match returned value +error: invalid-return-type: Return type does not match returned value --> src/mdtest_snippet.pyi:1:12 | 1 | def f() -> int: @@ -46,7 +46,7 @@ info: `lint:invalid-return-type` is enabled by default ``` ``` -error: lint:invalid-return-type: Function can implicitly return `None`, which is not assignable to return type `int` +error: invalid-return-type: Function can implicitly return `None`, which is not assignable to return type `int` --> src/mdtest_snippet.pyi:6:14 | 5 | # error: [invalid-return-type] @@ -60,7 +60,7 @@ info: `lint:invalid-return-type` is enabled by default ``` ``` -error: lint:invalid-return-type: Function can implicitly return `None`, which is not assignable to return type `int` +error: invalid-return-type: Function can implicitly return `None`, which is not assignable to return type `int` --> src/mdtest_snippet.pyi:11:14 | 10 | # error: [invalid-return-type] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/rich_comparison.md_-_Comparison___Rich_Comparison_-_Chained_comparisons_with_objects_that_don't_implement_`__bool__`_correctly.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/rich_comparison.md_-_Comparison___Rich_Comparison_-_Chained_comparisons_with_objects_that_don't_implement_`__bool__`_correctly.snap index 9a125eddca..0e95d28d6d 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/rich_comparison.md_-_Comparison___Rich_Comparison_-_Chained_comparisons_with_objects_that_don't_implement_`__bool__`_correctly.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/rich_comparison.md_-_Comparison___Rich_Comparison_-_Chained_comparisons_with_objects_that_don't_implement_`__bool__`_correctly.snap @@ -33,7 +33,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/comparison/instances/ric # Diagnostics ``` -error: lint:unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` +error: unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` --> src/mdtest_snippet.py:12:1 | 11 | # error: [unsupported-bool-conversion] @@ -48,7 +48,7 @@ info: `lint:unsupported-bool-conversion` is enabled by default ``` ``` -error: lint:unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` +error: unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` --> src/mdtest_snippet.py:14:1 | 12 | 10 < Comparable() < 20 diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_class_shadowing.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_class_shadowing.snap index 290d55f7d4..6778fbe8c0 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_class_shadowing.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_class_shadowing.snap @@ -20,7 +20,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/shadowing.md # Diagnostics ``` -error: lint:invalid-assignment: Implicit shadowing of class `C` +error: invalid-assignment: Implicit shadowing of class `C` --> src/mdtest_snippet.py:3:1 | 1 | class C: ... diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_function_shadowing.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_function_shadowing.snap index e54313363d..6640dfc6b1 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_function_shadowing.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_function_shadowing.snap @@ -20,7 +20,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/shadowing.md # Diagnostics ``` -error: lint:invalid-assignment: Implicit shadowing of function `f` +error: invalid-assignment: Implicit shadowing of function `f` --> src/mdtest_snippet.py:3:1 | 1 | def f(): ... diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Chained_comparisons_with_elements_that_incorrectly_implement_`__bool__`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Chained_comparisons_with_elements_that_incorrectly_implement_`__bool__`.snap index 8224f85cae..e7f48ee7ab 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Chained_comparisons_with_elements_that_incorrectly_implement_`__bool__`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Chained_comparisons_with_elements_that_incorrectly_implement_`__bool__`.snap @@ -34,7 +34,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/comparison/tuples.md # Diagnostics ``` -error: lint:unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable | Literal[False]` +error: unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable | Literal[False]` --> src/mdtest_snippet.py:15:1 | 14 | # error: [unsupported-bool-conversion] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Equality_with_elements_that_incorrectly_implement_`__bool__`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Equality_with_elements_that_incorrectly_implement_`__bool__`.snap index 0e983586fd..89e7ad321c 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Equality_with_elements_that_incorrectly_implement_`__bool__`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Equality_with_elements_that_incorrectly_implement_`__bool__`.snap @@ -26,7 +26,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/comparison/tuples.md # Diagnostics ``` -error: lint:unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` +error: unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` --> src/mdtest_snippet.py:9:1 | 8 | # error: [unsupported-bool-conversion] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_few_values_to_unpack.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_few_values_to_unpack.snap index 874dd38362..60c391d10d 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_few_values_to_unpack.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_few_values_to_unpack.snap @@ -18,7 +18,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unpacking.md # Diagnostics ``` -error: lint:invalid-assignment: Not enough values to unpack +error: invalid-assignment: Not enough values to unpack --> src/mdtest_snippet.py:1:1 | 1 | a, b = (1,) # error: [invalid-assignment] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_many_values_to_unpack.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_many_values_to_unpack.snap index 9807ab3f97..52b7f514dc 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_many_values_to_unpack.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_many_values_to_unpack.snap @@ -18,7 +18,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unpacking.md # Diagnostics ``` -error: lint:invalid-assignment: Too many values to unpack +error: invalid-assignment: Too many values to unpack --> src/mdtest_snippet.py:1:1 | 1 | a, b = (1, 2, 3) # error: [invalid-assignment] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Right_hand_side_not_iterable.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Right_hand_side_not_iterable.snap index dd99ec9aaf..0a32434a26 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Right_hand_side_not_iterable.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Right_hand_side_not_iterable.snap @@ -18,7 +18,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unpacking.md # Diagnostics ``` -error: lint:not-iterable: Object of type `Literal[1]` is not iterable +error: not-iterable: Object of type `Literal[1]` is not iterable --> src/mdtest_snippet.py:1:8 | 1 | a, b = 1 # error: [not-iterable] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Too_few_values_to_unpack.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Too_few_values_to_unpack.snap index 449a6fe472..6b059c9cff 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Too_few_values_to_unpack.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Too_few_values_to_unpack.snap @@ -18,7 +18,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unpacking.md # Diagnostics ``` -error: lint:invalid-assignment: Not enough values to unpack +error: invalid-assignment: Not enough values to unpack --> src/mdtest_snippet.py:1:1 | 1 | [a, *b, c, d] = (1, 2) # error: [invalid-assignment] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_An_unresolvable_import_that_does_not_use_`from`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_An_unresolvable_import_that_does_not_use_`from`.snap index ea5db1d3b4..93da9eb4a4 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_An_unresolvable_import_that_does_not_use_`from`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_An_unresolvable_import_that_does_not_use_`from`.snap @@ -20,7 +20,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unresolved_i # Diagnostics ``` -error: lint:unresolved-import: Cannot resolve imported module `does_not_exist` +error: unresolved-import: Cannot resolve imported module `does_not_exist` --> src/mdtest_snippet.py:1:8 | 1 | import does_not_exist # error: [unresolved-import] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_a_resolvable_module_but_unresolvable_item.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_a_resolvable_module_but_unresolvable_item.snap index 9ef99ec2ef..95f7ecb125 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_a_resolvable_module_but_unresolvable_item.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_a_resolvable_module_but_unresolvable_item.snap @@ -25,7 +25,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unresolved_i # Diagnostics ``` -error: lint:unresolved-import: Module `a` has no member `does_not_exist` +error: unresolved-import: Module `a` has no member `does_not_exist` --> src/mdtest_snippet.py:1:28 | 1 | from a import does_exist1, does_not_exist, does_exist2 # error: [unresolved-import] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_current_module.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_current_module.snap index 3f254e2e36..bc879e8db5 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_current_module.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_current_module.snap @@ -20,7 +20,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unresolved_i # Diagnostics ``` -error: lint:unresolved-import: Cannot resolve imported module `.does_not_exist` +error: unresolved-import: Cannot resolve imported module `.does_not_exist` --> src/mdtest_snippet.py:1:7 | 1 | from .does_not_exist import add # error: [unresolved-import] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_nested_module.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_nested_module.snap index 86daf8882a..6df92135db 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_nested_module.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_nested_module.snap @@ -20,7 +20,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unresolved_i # Diagnostics ``` -error: lint:unresolved-import: Cannot resolve imported module `.does_not_exist.foo.bar` +error: unresolved-import: Cannot resolve imported module `.does_not_exist.foo.bar` --> src/mdtest_snippet.py:1:7 | 1 | from .does_not_exist.foo.bar import add # error: [unresolved-import] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unresolvable_module.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unresolvable_module.snap index 7f2aee8081..799b517444 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unresolvable_module.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unresolvable_module.snap @@ -20,7 +20,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unresolved_i # Diagnostics ``` -error: lint:unresolved-import: Cannot resolve imported module `does_not_exist` +error: unresolved-import: Cannot resolve imported module `does_not_exist` --> src/mdtest_snippet.py:1:6 | 1 | from does_not_exist import add # error: [unresolved-import] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_too_many_leading_dots.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_too_many_leading_dots.snap index 5fd8688777..fec8116bfc 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_too_many_leading_dots.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_too_many_leading_dots.snap @@ -32,7 +32,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unresolved_i # Diagnostics ``` -error: lint:unresolved-import: Cannot resolve imported module `....foo` +error: unresolved-import: Cannot resolve imported module `....foo` --> src/package/subpackage/subsubpackage/__init__.py:1:10 | 1 | from ....foo import add # error: [unresolved-import] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_attribute,_but_it's_not_callable.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_attribute,_but_it's_not_callable.snap index b3882d4cf2..f1b0361ae2 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_attribute,_but_it's_not_callable.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_attribute,_but_it's_not_callable.snap @@ -24,7 +24,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unsupported_ # Diagnostics ``` -error: lint:unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` +error: unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` --> src/mdtest_snippet.py:7:8 | 6 | # error: [unsupported-bool-conversion] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_an_incorrect_return_type.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_an_incorrect_return_type.snap index fe2b1a1687..b1cf77250d 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_an_incorrect_return_type.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_an_incorrect_return_type.snap @@ -25,7 +25,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unsupported_ # Diagnostics ``` -error: lint:unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` +error: unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` --> src/mdtest_snippet.py:8:8 | 7 | # error: [unsupported-bool-conversion] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_incorrect_parameters.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_incorrect_parameters.snap index 53dc4e9e82..1c00a6e893 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_incorrect_parameters.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_incorrect_parameters.snap @@ -25,7 +25,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unsupported_ # Diagnostics ``` -error: lint:unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` +error: unsupported-bool-conversion: Boolean conversion is unsupported for type `NotBoolable` --> src/mdtest_snippet.py:8:8 | 7 | # error: [unsupported-bool-conversion] diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Part_of_a_union_where_at_least_one_member_has_incorrect_`__bool__`_method.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Part_of_a_union_where_at_least_one_member_has_incorrect_`__bool__`_method.snap index 1be4494d3e..bcff80de7d 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Part_of_a_union_where_at_least_one_member_has_incorrect_`__bool__`_method.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Part_of_a_union_where_at_least_one_member_has_incorrect_`__bool__`_method.snap @@ -32,7 +32,7 @@ mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unsupported_ # Diagnostics ``` -error: lint:unsupported-bool-conversion: Boolean conversion is unsupported for union `NotBoolable1 | NotBoolable2 | NotBoolable3` because `NotBoolable1` doesn't implement `__bool__` correctly +error: unsupported-bool-conversion: Boolean conversion is unsupported for union `NotBoolable1 | NotBoolable2 | NotBoolable3` because `NotBoolable1` doesn't implement `__bool__` correctly --> src/mdtest_snippet.py:15:8 | 14 | # error: [unsupported-bool-conversion]