Class: Dependabot::UpdateCheckers::Python::Pip
- Inherits:
-
Base
- Object
- Base
- Dependabot::UpdateCheckers::Python::Pip
show all
- Defined in:
- lib/dependabot/update_checkers/python/pip.rb,
lib/dependabot/update_checkers/python/pip/requirements_updater.rb,
lib/dependabot/update_checkers/python/pip/latest_version_finder.rb,
lib/dependabot/update_checkers/python/pip/poetry_version_resolver.rb,
lib/dependabot/update_checkers/python/pip/pipfile_version_resolver.rb,
lib/dependabot/update_checkers/python/pip/pip_compile_version_resolver.rb
Defined Under Namespace
Classes: LatestVersionFinder, PipCompileVersionResolver, PipfileVersionResolver, PoetryVersionResolver, RequirementsUpdater
Constant Summary
collapse
- MAIN_PYPI_INDEXES =
%w(
https://pypi.python.org/simple/
https://pypi.org/simple/
).freeze
Instance Attribute Summary
Attributes inherited from Base
#credentials, #dependency, #dependency_files, #ignored_versions
Instance Method Summary
collapse
Methods inherited from Base
#can_update?, #initialize, #requirement_class, #requirements_unlocked_or_can_be?, #up_to_date?, #updated_dependencies, #version_class
Instance Method Details
#latest_resolvable_version ⇒ Object
#latest_resolvable_version_with_no_unlock ⇒ Object
#latest_version ⇒ Object
26
27
28
|
# File 'lib/dependabot/update_checkers/python/pip.rb', line 26
def latest_version
@latest_version ||= fetch_latest_version
end
|
#requirements_update_strategy ⇒ Object
85
86
87
88
89
90
91
92
93
|
# File 'lib/dependabot/update_checkers/python/pip.rb', line 85
def requirements_update_strategy
if @requirements_update_strategy
return @requirements_update_strategy.to_sym
end
poetry_library? ? :widen_ranges : :bump_versions
end
|
#updated_requirements ⇒ Object
75
76
77
78
79
80
81
82
83
|
# File 'lib/dependabot/update_checkers/python/pip.rb', line 75
def updated_requirements
RequirementsUpdater.new(
requirements: dependency.requirements,
latest_version: latest_version&.to_s,
latest_resolvable_version: latest_resolvable_version&.to_s,
update_strategy: requirements_update_strategy,
has_lockfile: pipfile_lock || poetry_lock || pyproject_lock
).updated_requirements
end
|