<commit_before># encoding: UTF-8

require 'exceptions'
require 'formula'
require 'keg'
require 'tab'
require 'bottles'
require 'caveats'

class FormulaInstaller
  attr_reader :f
  attr_accessor :tab, :options, :ignore_deps
  attr_accessor :show_summary_heading, :show_header

  def initialize ff
    @f = ff
    @show_header = false
    @ignore_deps = ARGV.ignore_deps? || ARGV.interactive?
    @options = Options.new

    @@attempted ||= Set.new

    lock
    check_install_sanity
  end

  def pour_bottle?
    (tab.used_options.empty? rescue true) && options.empty? && install_bottle?(f, true)
  end

  def check_install_sanity
    raise FormulaInstallationAlreadyAttemptedError, f if @@attempted.include? f

    if f.installed?
      msg = "#{f}-#{f.installed_version} already installed"<commit_msg>Temporarily omit bottle source warning.<commit_after># encoding: UTF-8

require 'exceptions'
require 'formula'
require 'keg'
require 'tab'
require 'bottles'
require 'caveats'

class FormulaInstaller
  attr_reader :f
  attr_accessor :tab, :options, :ignore_deps
  attr_accessor :show_summary_heading, :show_header

  def initialize ff
    @f = ff
    @show_header = false
    @ignore_deps = ARGV.ignore_deps? || ARGV.interactive?
    @options = Options.new

    @@attempted ||= Set.new

    lock
    check_install_sanity
  end

  def pour_bottle?
    (tab.used_options.empty? rescue true) && options.empty? && install_bottle?(f)
  end

  def check_install_sanity
    raise FormulaInstallationAlreadyAttemptedError, f if @@attempted.include? f

    if f.installed?
      msg = "#{f}-#{f.installed_version} already installed"
{'fraction_non_alphanumeric': 0.10098522167487685, 'fraction_numerical': 0.0012315270935960591, 'mean_word_length': 4.126182965299685, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7643096', 'n_tokens_mistral': 582, 'n_tokens_neox': 544, 'n_words': 134}