Update crates/ruff_linter/src/checkers/ast/mod.rs

Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
Denys Zhak 2025-12-11 11:45:22 +02:00 committed by GitHub
parent ef3c373f85
commit 703a1e3375
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -437,7 +437,11 @@ impl<'a> Checker<'a> {
}
}
/// Returns the [`Tokens`] for the parsed source file
/// Returns the [`Tokens`] for the parsed source file.
///
///
/// Unlike [`Self::tokens`], this method always returns
/// the tokens for the current file, even when within a parsed type annotation.
pub(crate) fn source_tokens(&self) -> &'a Tokens {
self.parsed.tokens()
}