Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix the benchmark assertion
Browse files Browse the repository at this point in the history
AlexWaygood committed Aug 16, 2024
1 parent d9004ab commit c548278
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions crates/red_knot_workspace/src/lint.rs
Original file line number Diff line number Diff line change
@@ -124,6 +124,10 @@ fn format_diagnostic(context: &SemanticLintContext, message: &str, start: TextSi
}

fn lint_unresolved_imports(context: &SemanticLintContext, import: AnyImportRef) {
// TODO: this treats any symbol with `Type::Unknown` as an unresolved import,
// which isn't really correct: if it exists but has `Type::Unknown` in the
// module we're importing it from, we shouldn't really emit a diagnostic here,
// but currently do.
match import {
AnyImportRef::Import(import) => {
for alias in &import.names {
4 changes: 2 additions & 2 deletions crates/ruff_benchmark/benches/red_knot.rs
Original file line number Diff line number Diff line change
@@ -89,7 +89,7 @@ fn benchmark_incremental(criterion: &mut Criterion) {
let Case { db, parser, .. } = case;
let result = db.check_file(*parser).unwrap();

assert_eq!(result.len(), 29);
assert_eq!(result.len(), 34);
},
BatchSize::SmallInput,
);
@@ -104,7 +104,7 @@ fn benchmark_cold(criterion: &mut Criterion) {
let Case { db, parser, .. } = case;
let result = db.check_file(*parser).unwrap();

assert_eq!(result.len(), 29);
assert_eq!(result.len(), 34);
},
BatchSize::SmallInput,
);

0 comments on commit c548278

Please sign in to comment.