Update Black tests (#5438)

This commit is contained in:
Micha Reiser 2023-06-30 08:32:50 +02:00 committed by GitHub
parent f7969cf23c
commit ae25638b0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
166 changed files with 11066 additions and 237 deletions

View file

@ -4,7 +4,7 @@
//! checking entire repositories.
#![allow(clippy::print_stdout)]
use anyhow::Context;
use anyhow::{bail, Context};
use clap::Parser;
use log::debug;
use ruff::resolver::python_files_in_path;
@ -107,7 +107,10 @@ pub(crate) fn check_repo(args: &Args) -> anyhow::Result<bool> {
])
.unwrap();
let (paths, _resolver) = python_files_in_path(&cli.files, &pyproject_config, &overrides)?;
assert!(!paths.is_empty(), "no python files in {:?}", cli.files);
if paths.is_empty() {
bail!("no python files in {:?}", cli.files)
}
let mut formatted_counter = 0;
let errors = paths