Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support extend-select in pyproject.toml #327

Merged
merged 1 commit into from
Oct 4, 2022

Conversation

andersk
Copy link
Contributor

@andersk andersk commented Oct 4, 2022

(I didn’t add extend-ignore since it’s the same as ignore—should we remove the --extend-ignore command line option?)

@@ -170,6 +170,7 @@ impl Settings {
pyproject,
project_root,
};
settings.select(config.extend_select);
settings.ignore(&config.ignore);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like the semantics here are off (but that they were off before with settings.ignore(&config.ignore) -- not any fault of your change). We should probably avoid calling settings.ignore(&config.ignore), since if the user provides a --ignore on the command-line, we'd want to respect that instead (not in addition). Same for extend_select.

But this can be changed separately, what you have here is an improvement in overall behavior.

@charliermarsh
Copy link
Member

I think it's conceptually nice to have both --ignore and --extend-ignore. At least on the command-line, it's useful because you could define an ignore in the pyproject.toml, then use --extend-ignore on the command-line to augment it.

@charliermarsh charliermarsh merged commit f80d5e7 into astral-sh:main Oct 4, 2022
@andersk andersk deleted the extend-select branch October 4, 2022 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants