mirror of https://github.com/astral-sh/ruff
refactor: Document internal test_path function
This commit is contained in:
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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue