Class: Dependabot::Python::FileUpdater::PipCompileFileUpdater
- Inherits:
-
Object
- Object
- Dependabot::Python::FileUpdater::PipCompileFileUpdater
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/python/file_updater/pip_compile_file_updater.rb
Overview
rubocop:disable Metrics/ClassLength
Constant Summary collapse
- UNSAFE_PACKAGES =
%w(setuptools distribute pip).freeze
- INCOMPATIBLE_VERSIONS_REGEX =
Regexp.new( "(?:not supported between instances of 'InstallationCandidate'" \ "|There are incompatible versions in the resolved dependencies).*\\z", Regexp::MULTILINE )
- WARNINGS =
/\s*# WARNING:.*\Z/m- UNSAFE_NOTE =
/\s*# The following packages are considered to be unsafe.*\Z/m- RESOLVER_REGEX =
/(?<=--resolver=)(\w+)/- UNSAFE_PACKAGE_OPTION_REGEX =
/--unsafe-package(?:=|\s+)(?<name>[^\s\\]+)/- NATIVE_COMPILATION_ERROR =
"pip._internal.exceptions.InstallationSubprocessError: Getting requirements to build wheel exited with 1"
Instance Attribute Summary collapse
-
#credentials ⇒ Object
readonly
Returns the value of attribute credentials.
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
#dependency_files ⇒ Object
readonly
Returns the value of attribute dependency_files.
Instance Method Summary collapse
-
#initialize(dependencies:, dependency_files:, credentials:, index_urls: nil) ⇒ PipCompileFileUpdater
constructor
A new instance of PipCompileFileUpdater.
- #updated_dependency_files ⇒ Object
Constructor Details
#initialize(dependencies:, dependency_files:, credentials:, index_urls: nil) ⇒ PipCompileFileUpdater
Returns a new instance of PipCompileFileUpdater.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/dependabot/python/file_updater/pip_compile_file_updater.rb', line 58 def initialize(dependencies:, dependency_files:, credentials:, index_urls: nil) @dependencies = dependencies @dependency_files = dependency_files @index_urls = index_urls @build_isolation = T.let(true, T::Boolean) @sanitized_setup_file_content = T.let({}, T::Hash[String, String]) @requirement_map = T.let(nil, T.nilable(T::Hash[String, T::Array[String]])) @python_requirement_parser = T.let(nil, T.nilable(FileParser::PythonRequirementParser)) @language_version_manager = T.let(nil, T.nilable(LanguageVersionManager)) @setup_files = T.let(nil, T.nilable(T::Array[Dependabot::DependencyFile])) @setup_cfg_files = T.let(nil, T.nilable(T::Array[Dependabot::DependencyFile])) @pip_compile_files = T.let(nil, T.nilable(T::Array[Dependabot::DependencyFile])) @compiled_files = T.let(nil, T.nilable(T::Array[Dependabot::DependencyFile])) @credentials = credentials end |
Instance Attribute Details
#credentials ⇒ Object (readonly)
Returns the value of attribute credentials.
48 49 50 |
# File 'lib/dependabot/python/file_updater/pip_compile_file_updater.rb', line 48 def credentials @credentials end |
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
42 43 44 |
# File 'lib/dependabot/python/file_updater/pip_compile_file_updater.rb', line 42 def dependencies @dependencies end |
#dependency_files ⇒ Object (readonly)
Returns the value of attribute dependency_files.
45 46 47 |
# File 'lib/dependabot/python/file_updater/pip_compile_file_updater.rb', line 45 def dependency_files @dependency_files end |
Instance Method Details
#updated_dependency_files ⇒ Object
75 76 77 78 79 80 |
# File 'lib/dependabot/python/file_updater/pip_compile_file_updater.rb', line 75 def updated_dependency_files @updated_dependency_files = T.let( fetch_updated_dependency_files, T.nilable(T::Array[Dependabot::DependencyFile]) ) end |