Skip to content

Commit

Permalink
Fixes pip-compile file matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
sachin-sandhu committed Dec 23, 2024
1 parent 6e4d9d8 commit 1fdcded
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/lib/dependabot/python/file_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ def package_manager
def detected_package_manager
setup_python_environment if Dependabot::Experiments.enabled?(:enable_file_parser_python_local)

return PipCompilePackageManager.new(T.must(detect_pipcompile_version)) if detect_pipcompile_version

return PipenvPackageManager.new(T.must(detect_pipenv_version)) if detect_pipenv_version

return PoetryPackageManager.new(T.must(detect_poetry_version)) if detect_poetry_version

return PipCompilePackageManager.new(T.must(detect_pipcompile_version)) if detect_pipcompile_version

PipPackageManager.new(detect_pip_version)
end

Expand Down Expand Up @@ -337,7 +337,7 @@ def check_requirements(requirements)
end

def pipcompile_in_file
requirement_files.any? { |f| f.end_with?(".in") }
requirement_files.any? { |f| f.name.end_with?(PipCompilePackageManager::MANIFEST_FILENAME) }
end

def pipenv_files
Expand Down
1 change: 1 addition & 0 deletions python/lib/dependabot/python/package_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class PipCompilePackageManager < Dependabot::Ecosystem::VersionManager
extend T::Sig

NAME = "pip-compile"
MANIFEST_FILENAME = ".in"

SUPPORTED_VERSIONS = T.let([].freeze, T::Array[Dependabot::Version])

Expand Down

0 comments on commit 1fdcded

Please sign in to comment.