Skip to content

Commit 1fd067d

Browse files
committed
Include base pyproject when initializing cache settings
1 parent 55f8f3b commit 1fd067d

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

crates/ruff_workspace/src/resolver.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use anyhow::Result;
1111
use anyhow::{anyhow, bail};
1212
use globset::{Candidate, GlobSet};
1313
use ignore::{WalkBuilder, WalkState};
14-
use itertools::{Either, Itertools};
14+
use itertools::Itertools;
1515
use log::debug;
1616
use path_absolutize::path_dedot;
1717
use rustc_hash::{FxHashMap, FxHashSet};
@@ -204,12 +204,7 @@ impl<'a> Resolver<'a> {
204204

205205
/// Return an iterator over the resolved [`Settings`] in this [`Resolver`].
206206
pub fn settings(&self) -> impl Iterator<Item = &Settings> {
207-
match self.pyproject_config.strategy {
208-
PyprojectDiscoveryStrategy::Fixed => {
209-
Either::Left(std::iter::once(&self.pyproject_config.settings))
210-
}
211-
PyprojectDiscoveryStrategy::Hierarchical => Either::Right(self.settings.values()),
212-
}
207+
std::iter::once(&self.pyproject_config.settings).chain(self.settings.values())
213208
}
214209
}
215210

0 commit comments

Comments
 (0)