mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-02 09:52:18 +00:00
Fix cache invalidation for nested pyproject.toml files (#12727)
This commit is contained in:
parent
f34b9a77f0
commit
a631d600ac
1 changed files with 8 additions and 1 deletions
|
@ -156,9 +156,16 @@ impl<'a> Resolver<'a> {
|
|||
.insert(format!("{path}/{{*filepath}}"), self.settings.len() - 1)
|
||||
{
|
||||
Ok(()) => {}
|
||||
Err(InsertError::Conflict { .. }) => {}
|
||||
Err(InsertError::Conflict { .. }) => {
|
||||
return;
|
||||
}
|
||||
Err(_) => unreachable!("file paths are escaped before being inserted in the router"),
|
||||
}
|
||||
|
||||
// Insert a mapping that matches the directory itself (without a trailing slash).
|
||||
// Inserting should always succeed because conflicts are resolved above and the above insertion guarantees
|
||||
// that the path is correctly escaped.
|
||||
self.router.insert(path, self.settings.len() - 1).unwrap();
|
||||
}
|
||||
|
||||
/// Return the appropriate [`Settings`] for a given [`Path`].
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue