mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 22:01:18 +00:00
[ty] Anchor all exclude patterns (#18685)
Co-authored-by: Andrew Gallant <andrew@astral.sh>
This commit is contained in:
parent
8184dae287
commit
37fdece72f
10 changed files with 134 additions and 194 deletions
|
@ -5,9 +5,7 @@ use clap::{ArgAction, ArgMatches, Error, Parser};
|
|||
use ruff_db::system::SystemPathBuf;
|
||||
use ty_project::combine::Combine;
|
||||
use ty_project::metadata::options::{EnvironmentOptions, Options, SrcOptions, TerminalOptions};
|
||||
use ty_project::metadata::value::{
|
||||
RangedValue, RelativeExcludePattern, RelativePathBuf, ValueSource,
|
||||
};
|
||||
use ty_project::metadata::value::{RangedValue, RelativeGlobPattern, RelativePathBuf, ValueSource};
|
||||
use ty_python_semantic::lint;
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
|
@ -205,12 +203,7 @@ impl CheckCommand {
|
|||
src: Some(SrcOptions {
|
||||
respect_ignore_files,
|
||||
exclude: self.exclude.map(|excludes| {
|
||||
RangedValue::cli(
|
||||
excludes
|
||||
.iter()
|
||||
.map(|exclude| RelativeExcludePattern::cli(exclude))
|
||||
.collect(),
|
||||
)
|
||||
RangedValue::cli(excludes.iter().map(RelativeGlobPattern::cli).collect())
|
||||
}),
|
||||
..SrcOptions::default()
|
||||
}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue