Skip to content

Commit 28c310e

Browse files
committed
Use the updated token type
1 parent 8934463 commit 28c310e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/ruff_dev/src/print_tokens.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub(crate) struct Args {
1212
/// Python file for which to generate the AST.
1313
#[arg(required = true)]
1414
file: PathBuf,
15-
/// Run in Jupyter mode i.e., allow line magics (%), shell commands (!), and help (?).
15+
/// Run in Jupyter mode i.e., allow line magics (`%`, `!`, `?`, `/`, `,`, `;`).
1616
#[arg(long)]
1717
jupyter: bool,
1818
}

crates/ruff_python_ast/src/token_kind.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,10 +340,10 @@ impl TokenKind {
340340
Tok::Float { .. } => TokenKind::Float,
341341
Tok::Complex { .. } => TokenKind::Complex,
342342
Tok::String { .. } => TokenKind::String,
343+
Tok::MagicCommand { .. } => TokenKind::MagicCommand,
343344
Tok::Comment(_) => TokenKind::Comment,
344345
Tok::Newline => TokenKind::Newline,
345346
Tok::NonLogicalNewline => TokenKind::NonLogicalNewline,
346-
Tok::MagicCommand(_) => TokenKind::MagicCommand,
347347
Tok::Indent => TokenKind::Indent,
348348
Tok::Dedent => TokenKind::Dedent,
349349
Tok::EndOfFile => TokenKind::EndOfFile,

0 commit comments

Comments
 (0)