Class: Dependabot::Python::FileUpdater::PipfileFileUpdater

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/python/file_updater/pipfile_file_updater.rb

Constant Summary collapse

DEPENDENCY_TYPES =
T.let(%w(packages dev-packages).freeze, T::Array[String])

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dependencies:, dependency_files:, credentials:, repo_contents_path:) ⇒ PipfileFileUpdater

Returns a new instance of PipfileFileUpdater.



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/dependabot/python/file_updater/pipfile_file_updater.rb', line 48

def initialize(dependencies:, dependency_files:, credentials:, repo_contents_path:)
  @dependencies = dependencies
  @dependency_files = dependency_files
  @credentials = credentials
  @repo_contents_path = repo_contents_path
  @updated_pipfile_content = T.let(nil, T.nilable(String))
  @updated_lockfile_content = T.let(nil, T.nilable(String))
  @updated_generated_files = T.let(nil, T.nilable(T::Hash[Symbol, String]))
  @pipfile = T.let(nil, T.nilable(Dependabot::DependencyFile))
  @lockfile = T.let(nil, T.nilable(Dependabot::DependencyFile))
  @setup_files = T.let(nil, T.nilable(T::Array[Dependabot::DependencyFile]))
  @setup_cfg_files = T.let(nil, T.nilable(T::Array[Dependabot::DependencyFile]))
  @requirements_files = T.let(nil, T.nilable(T::Array[Dependabot::DependencyFile]))
  @updated_dependency_files = T.let(nil, T.nilable(T::Array[Dependabot::DependencyFile]))
  @updated_pipfile_content = T.let(nil, T.nilable(String))
  @parsed_lockfile = T.let(nil, T.nilable(T::Hash[String, T::Hash[String, Object]]))
  @pipenv_runner = T.let(nil, T.nilable(PipenvRunner))
  @language_version_manager = T.let(nil, T.nilable(LanguageVersionManager))
  @sanitized_setup_file_content = T.let({}, T.untyped)
  @python_requirement_parser = T.let(nil, T.nilable(FileParser::PythonRequirementParser))
end

Instance Attribute Details

#credentialsObject (readonly)

Returns the value of attribute credentials.



34
35
36
# File 'lib/dependabot/python/file_updater/pipfile_file_updater.rb', line 34

def credentials
  @credentials
end

#dependenciesObject (readonly)

Returns the value of attribute dependencies.



28
29
30
# File 'lib/dependabot/python/file_updater/pipfile_file_updater.rb', line 28

def dependencies
  @dependencies
end

#dependency_filesObject (readonly)

Returns the value of attribute dependency_files.



31
32
33
# File 'lib/dependabot/python/file_updater/pipfile_file_updater.rb', line 31

def dependency_files
  @dependency_files
end

#repo_contents_pathObject (readonly)

Returns the value of attribute repo_contents_path.



37
38
39
# File 'lib/dependabot/python/file_updater/pipfile_file_updater.rb', line 37

def repo_contents_path
  @repo_contents_path
end

Instance Method Details

#updated_dependency_filesObject



73
74
75
# File 'lib/dependabot/python/file_updater/pipfile_file_updater.rb', line 73

def updated_dependency_files
  @updated_dependency_files ||= fetch_updated_dependency_files
end