Skip to content

Commit 966563c

Browse files
authored
Add tests for hard and soft links (#12590)
1 parent 27edade commit 966563c

File tree

6 files changed

+603
-107
lines changed

6 files changed

+603
-107
lines changed

clippy.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ doc-valid-idents = [
1010
"SCREAMING_SNAKE_CASE",
1111
"SQLAlchemy",
1212
"StackOverflow",
13+
"PyCharm",
1314
]
1415

1516
ignore-interior-mutability = [
1617
# Interned is read-only. The wrapped `Rc` never gets updated.
1718
"ruff_formatter::format_element::Interned",
18-
19-
# The expression is read-only.
19+
# The expression is read-only.
2020
"ruff_python_ast::hashable::HashableExpr",
2121
]

crates/red_knot/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ notify = { workspace = true }
2727
rayon = { workspace = true }
2828
rustc-hash = { workspace = true }
2929
salsa = { workspace = true }
30-
filetime = { workspace = true }
3130
tracing = { workspace = true }
3231
tracing-subscriber = { workspace = true }
3332
tracing-tree = { workspace = true }
3433

3534
[dev-dependencies]
35+
filetime = { workspace = true }
3636
tempfile = { workspace = true }
3737

3838

crates/red_knot/src/db.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
use std::panic::{AssertUnwindSafe, RefUnwindSafe};
2-
use std::sync::Arc;
3-
4-
use salsa::Cancelled;
52

63
use red_knot_module_resolver::{vendored_typeshed_stubs, Db as ResolverDb};
74
use red_knot_python_semantic::Db as SemanticDb;
@@ -10,6 +7,7 @@ use ruff_db::program::{Program, ProgramSettings};
107
use ruff_db::system::System;
118
use ruff_db::vendored::VendoredFileSystem;
129
use ruff_db::{Db as SourceDb, Upcast};
10+
use salsa::Cancelled;
1311

1412
use crate::lint::Diagnostics;
1513
use crate::workspace::{check_file, Workspace, WorkspaceMetadata};
@@ -24,7 +22,7 @@ pub struct RootDatabase {
2422
workspace: Option<Workspace>,
2523
storage: salsa::Storage<RootDatabase>,
2624
files: Files,
27-
system: Arc<dyn System + Send + Sync + RefUnwindSafe>,
25+
system: Box<dyn System + Send + Sync + RefUnwindSafe>,
2826
}
2927

3028
impl RootDatabase {
@@ -36,7 +34,7 @@ impl RootDatabase {
3634
workspace: None,
3735
storage: salsa::Storage::default(),
3836
files: Files::default(),
39-
system: Arc::new(system),
37+
system: Box::new(system),
4038
};
4139

4240
let workspace = Workspace::from_metadata(&db, workspace);

0 commit comments

Comments
 (0)