class Dependabot::Uv::FileUpdater::PyprojectPreparer

def update_python_requirement(python_version)

def update_python_requirement(python_version)
  return @pyproject_content unless python_version
  in_project_table = T.let(false, T::Boolean)
  updated_lines = @lines.map do |line|
    in_project_table = true if line.match?(/^\[project\]/)
    if in_project_table && line.match?(/^requires-python\s*=/)
      "requires-python = \">=#{python_version}\""
    else
      line
    end
  end
  @pyproject_content = updated_lines.join("\n")
end