mirror of
https://github.com/astral-sh/ruff
synced 2026-01-21 05:20:49 -05:00
[ty] cargo insta test --force-update-snapshots (#22313)
Snapshot tests recently started reporting this warning: > Snapshot test passes but the existing value is in a legacy format. > Please run cargo insta test --force-update-snapshots to update to a > newer format. This PR is the result of that forced update. One file (crates/ruff_db/src/diagnostic/render/full.rs) seems to get corrupted, because it contains strings with unprintable characters that trigger some bug in cargo-insta. I've manually reverted that file, and also manually reverted the `input_file:` lines, which we like.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/parser/tests.rs
|
||||
expression: error
|
||||
snapshot_kind: text
|
||||
---
|
||||
ParseError {
|
||||
error: UnexpectedExpressionToken,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/parser/tests.rs
|
||||
expression: error
|
||||
snapshot_kind: text
|
||||
---
|
||||
ParseError {
|
||||
error: UnexpectedExpressionToken,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/parser/tests.rs
|
||||
expression: error
|
||||
snapshot_kind: text
|
||||
---
|
||||
ParseError {
|
||||
error: UnexpectedExpressionToken,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_source(source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_source(source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: "lex_source_with_offset(source, TextSize::new(7))"
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: "lex_source_with_offset(source, TextSize::new(11))"
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: comment_until_eol(MAC_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: comment_until_eol(UNIX_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: comment_until_eol(WINDOWS_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_source(source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: double_dedent_with_eol(MAC_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: double_dedent_with_tabs_eol(MAC_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: double_dedent_with_tabs_eol(UNIX_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: double_dedent_with_tabs_eol(WINDOWS_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: double_dedent_with_eol(UNIX_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: double_dedent_with_eol(WINDOWS_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: "lex_invalid(source, Mode::Module)"
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_source(source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_jupyter_source(source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_source(source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_source(source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_source(source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: indentation_with_eol(MAC_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: indentation_with_eol(UNIX_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: indentation_with_eol(WINDOWS_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: "lex_invalid(source, Mode::Module)"
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: "lex_invalid(source, Mode::Module)"
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_jupyter_source(source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_jupyter_source(source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_jupyter_source(source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: ipython_escape_command_line_continuation_eol(MAC_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: ipython_escape_command_line_continuation_eol(UNIX_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: ipython_escape_command_line_continuation_eol(WINDOWS_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: ipython_escape_command_line_continuation_with_eol_and_eof(MAC_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: ipython_escape_command_line_continuation_with_eol_and_eof(UNIX_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: ipython_escape_command_line_continuation_with_eol_and_eof(WINDOWS_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_jupyter_source(source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_source(&source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_source(&source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_source(&source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_source(&source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_source(source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_jupyter_source(source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: newline_in_brackets_eol(MAC_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: newline_in_brackets_eol(UNIX_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: newline_in_brackets_eol(WINDOWS_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_source(source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_source(source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_source(source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: lex_source(source)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: string_continuation_with_eol(MAC_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: string_continuation_with_eol(UNIX_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: string_continuation_with_eol(WINDOWS_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: "lex_invalid(source, Mode::Module)"
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: triple_quoted_eol(MAC_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: triple_quoted_eol(UNIX_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/lexer.rs
|
||||
expression: triple_quoted_eol(WINDOWS_EOL)
|
||||
snapshot_kind: text
|
||||
---
|
||||
## Tokens
|
||||
```
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/string.rs
|
||||
expression: error
|
||||
snapshot_kind: text
|
||||
---
|
||||
ParseError {
|
||||
error: Lexical(
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/string.rs
|
||||
expression: error
|
||||
snapshot_kind: text
|
||||
---
|
||||
ParseError {
|
||||
error: Lexical(
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/string.rs
|
||||
expression: error
|
||||
snapshot_kind: text
|
||||
---
|
||||
ParseError {
|
||||
error: Lexical(
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/string.rs
|
||||
expression: error
|
||||
snapshot_kind: text
|
||||
---
|
||||
ParseError {
|
||||
error: Lexical(
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/src/string.rs
|
||||
expression: error
|
||||
snapshot_kind: text
|
||||
---
|
||||
ParseError {
|
||||
error: Lexical(
|
||||
|
||||
Reference in New Issue
Block a user