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.



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

def initialize(dependency_files:)
  @dependency_files = dependency_files
end

Instance Method Details

#dependency_setObject



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

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

  dependency_set += pyproject_dependencies
  dependency_set += lockfile_dependencies if lockfile

  dependency_set
end