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

fix #8414 follow poetry source constraint #8422

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions python/lib/dependabot/python/update_checker/index_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ def pyproject_index_urls
# If source is PyPI, skip it, and let it pick the default URI
next if source["name"].casecmp?("PyPI")

if source["default"]
if @dependency.all_sources.include?(source["name"])
# If dependency has specified this source, use it
return { main: source["url"], extra: [] }
elsif source["default"]
urls[:main] = source["url"]
elsif source["priority"] != "explicit"
# if source is not explicit, add it to extra
urls[:extra] << source["url"]
elsif @dependency.all_sources.include?(source["name"])
# if source is explicit, and dependency has specified it as a source, add it to extra
urls[:extra] << source["url"]
end
end
urls[:extra] = urls[:extra].uniq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@

it "gets the right index URLs" do
expect(index_urls).to match_array(
["https://pypi.org/simple/", "https://some.internal.registry.com/pypi/"]
["https://some.internal.registry.com/pypi/"]
)
end
end
Expand Down