Skip to content

Commit

Permalink
Include global --config when determining namespace packages (#9603)
Browse files Browse the repository at this point in the history
## Summary

When determining whether _any_ settings have namespace packages, we need
to consider the global settings (as would be provided via `--config`).
This was a subtle fallout of a refactor.

Closes #9579.

## Test Plan

Tested locally by compiling Ruff and running against this
[namespace-test](https://github.com/gokay05/namespace-test) repo.
  • Loading branch information
charliermarsh authored Jan 22, 2024
1 parent 8379841 commit a1f3cda
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/ruff_workspace/src/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ impl<'a> Resolver<'a> {
// Determine whether any of the settings require namespace packages. If not, we can save
// a lookup for every file.
let has_namespace_packages = self
.settings
.values()
.settings()
.any(|settings| !settings.linter.namespace_packages.is_empty());

// Search for the package root for each file.
Expand Down

0 comments on commit a1f3cda

Please sign in to comment.