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

Apply combination logic to merge CLI and persistent configuration #3618

Merged
merged 1 commit into from
May 20, 2024

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented May 15, 2024

Summary

If you have (e.g.) extra-index-url in your configuration file and provide --extra-index-url on the command-line, we now merge the options rather than ignoring those in the configuration file. As such, merging the CLI and the persistent configuration is now semantically identical to how we merge (project persistent configuration) with (user persistent configuration).

Closes #3541.

@charliermarsh charliermarsh requested a review from zanieb May 15, 2024 18:59
@charliermarsh charliermarsh added the configuration Settings and such label May 15, 2024
@charliermarsh charliermarsh marked this pull request as ready for review May 15, 2024 18:59
@@ -961,93 +961,123 @@ impl PipSharedSettings {

Self {
index_locations: IndexLocations::new(
Copy link
Member Author

Choose a reason for hiding this comment

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

The changes here are exclusively replacing .or with .combine.

Copy link
Member

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me!

@charliermarsh charliermarsh enabled auto-merge (squash) May 20, 2024 13:32
@charliermarsh charliermarsh merged commit c32fb86 into main May 20, 2024
44 checks passed
@charliermarsh charliermarsh deleted the charlie/combine-cli branch May 20, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Settings and such
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extra index url when it is specified over command line and uv.toml
3 participants