mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-07 21:25:08 +00:00
Avoid imports from criterion
This commit is contained in:
parent
7541dbd7bf
commit
95c66b184b
5 changed files with 14 additions and 6 deletions
|
@ -1,4 +1,6 @@
|
|||
use ruff_benchmark::criterion::{
|
||||
use ruff_benchmark::criterion;
|
||||
|
||||
use criterion::{
|
||||
criterion_group, criterion_main, measurement::WallTime, BenchmarkId, Criterion, Throughput,
|
||||
};
|
||||
use ruff_benchmark::{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
use ruff_benchmark::criterion::{
|
||||
use ruff_benchmark::criterion;
|
||||
|
||||
use criterion::{
|
||||
criterion_group, criterion_main, BenchmarkGroup, BenchmarkId, Criterion, Throughput,
|
||||
};
|
||||
use ruff_benchmark::{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
use ruff_benchmark::criterion::{
|
||||
use ruff_benchmark::criterion;
|
||||
|
||||
use criterion::{
|
||||
criterion_group, criterion_main, measurement::WallTime, BenchmarkId, Criterion, Throughput,
|
||||
};
|
||||
use ruff_benchmark::{
|
||||
|
|
|
@ -1,21 +1,23 @@
|
|||
#![allow(clippy::disallowed_names)]
|
||||
use ruff_benchmark::criterion;
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::ops::Range;
|
||||
|
||||
use criterion::{criterion_group, criterion_main, BatchSize, Criterion};
|
||||
use rayon::ThreadPoolBuilder;
|
||||
use rustc_hash::FxHashSet;
|
||||
|
||||
use red_knot_project::metadata::options::{EnvironmentOptions, Options};
|
||||
use red_knot_project::metadata::value::RangedValue;
|
||||
use red_knot_project::watch::{ChangeEvent, ChangedKind};
|
||||
use red_knot_project::{Db, ProjectDatabase, ProjectMetadata};
|
||||
use ruff_benchmark::criterion::{criterion_group, criterion_main, BatchSize, Criterion};
|
||||
use ruff_benchmark::TestFile;
|
||||
use ruff_db::diagnostic::{DiagnosticId, OldDiagnosticTrait, Severity};
|
||||
use ruff_db::files::{system_path_to_file, File};
|
||||
use ruff_db::source::source_text;
|
||||
use ruff_db::system::{MemoryFileSystem, SystemPath, SystemPathBuf, TestSystem};
|
||||
use ruff_python_ast::PythonVersion;
|
||||
use rustc_hash::FxHashSet;
|
||||
|
||||
struct Case {
|
||||
db: ProjectDatabase,
|
||||
|
|
|
@ -235,8 +235,8 @@ impl SubDiagnostic {
|
|||
///
|
||||
/// If a sub-diagnostic has not been marked as printed before being
|
||||
/// dropped, then its `Drop` implementation will panic in debug mode.
|
||||
#[cfg(debug_assertions)]
|
||||
pub(crate) fn printed(&mut self) {
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
self.inner.printed = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue