diff --git a/python/lib/dependabot/python/file_parser.rb b/python/lib/dependabot/python/file_parser.rb index 07ea6a47b1..9d540be242 100644 --- a/python/lib/dependabot/python/file_parser.rb +++ b/python/lib/dependabot/python/file_parser.rb @@ -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 @@ -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 diff --git a/python/lib/dependabot/python/package_manager.rb b/python/lib/dependabot/python/package_manager.rb index 21ba731da9..effe79d873 100644 --- a/python/lib/dependabot/python/package_manager.rb +++ b/python/lib/dependabot/python/package_manager.rb @@ -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])