mirror of
https://github.com/astral-sh/ruff
synced 2026-01-21 21:40:51 -05:00
refactor: Document internal test_path function
This commit is contained in:
committed by
Charlie Marsh
parent
56ad160c05
commit
cfd0693ae5
@@ -15,6 +15,8 @@ use crate::{
|
||||
source_code::{Indexer, Locator, Stylist},
|
||||
};
|
||||
|
||||
/// A convenient wrapper around [`check_path`], that additionally
|
||||
/// asserts that autofixes converge after 10 iterations.
|
||||
pub fn test_path(path: &Path, settings: &Settings) -> Result<Vec<Diagnostic>> {
|
||||
let contents = fs::read_file(path)?;
|
||||
let tokens: Vec<LexResult> = rustpython_helpers::tokenize(&contents);
|
||||
|
||||
Reference in New Issue
Block a user