Class: Dependabot::Python::FileParser::PoetryFilesParser

Inherits:
Object
  • Object
show all
Defined in:
lib/dependabot/python/file_parser/poetry_files_parser.rb

Constant Summary collapse

POETRY_DEPENDENCY_TYPES =
%w(dependencies dev-dependencies).freeze

Instance Method Summary collapse

Constructor Details

#initialize(dependency_files:) ⇒ PoetryFilesParser

Returns a new instance of PoetryFilesParser.


18
19
20
# File 'lib/dependabot/python/file_parser/poetry_files_parser.rb', line 18

def initialize(dependency_files:)
  @dependency_files = dependency_files
end

Instance Method Details

#dependency_setObject


22
23
24
25
26
27
28
29
# File 'lib/dependabot/python/file_parser/poetry_files_parser.rb', line 22

def dependency_set
  dependency_set = Dependabot::FileParsers::Base::DependencySet.new

  dependency_set += pyproject_dependencies
  dependency_set += lockfile_dependencies if lockfile

  dependency_set
end