Replace row/column based Location with byte-offsets. (#3931)

This commit is contained in:
Micha Reiser 2023-04-26 20:11:02 +02:00 committed by GitHub
parent ee91598835
commit cab65b25da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
418 changed files with 6203 additions and 7040 deletions

View file

@ -113,6 +113,8 @@ fn check(args: CheckArgs, log_level: LogLevel) -> Result<ExitStatus> {
return Ok(ExitStatus::Success);
}
let top_level_settings = pyproject_strategy.top_level_settings();
// Extract options that are included in `Settings`, but only apply at the top
// level.
let CliSettings {
@ -122,7 +124,7 @@ fn check(args: CheckArgs, log_level: LogLevel) -> Result<ExitStatus> {
show_fixes,
update_check,
..
} = pyproject_strategy.top_level_settings().cli.clone();
} = top_level_settings.cli.clone();
// Autofix rules are as follows:
// - If `--fix` or `--fix-only` is set, always apply fixes to the filesystem (or
@ -153,6 +155,10 @@ fn check(args: CheckArgs, log_level: LogLevel) -> Result<ExitStatus> {
printer_flags |= PrinterFlags::SHOW_FIXES;
}
if top_level_settings.lib.show_source {
printer_flags |= PrinterFlags::SHOW_SOURCE;
}
#[cfg(debug_assertions)]
if cache {
// `--no-cache` doesn't respect code changes, and so is often confusing during