<commit_before>require "keg"
require "language/python"
require "formula"
require "version"

module Homebrew
  module Diagnostic
    def self.missing_deps(ff)
      missing = {}
      ff.each do |f|
        missing_deps = f.recursive_dependencies do |dependent, dep|
          if dep.optional? || dep.recommended?
            tab = Tab.for_formula(dependent)
            Dependency.prune unless tab.with?(dep)
          elsif dep.build?
            Dependency.prune
          end
        end

        missing_deps.map!(&:to_formula)
        missing_deps.reject! { |d| d.installed_prefixes.any? }

        unless missing_deps.empty?
          yield f.full_name, missing_deps if block_given?
          missing[f.full_name] = missing_deps
        end
      end
      missing
    end<commit_msg>diagnostic: Add require "tempfile" for Linuxbrew<commit_after>require "keg"
require "language/python"
require "formula"
require "tempfile"
require "version"

module Homebrew
  module Diagnostic
    def self.missing_deps(ff)
      missing = {}
      ff.each do |f|
        missing_deps = f.recursive_dependencies do |dependent, dep|
          if dep.optional? || dep.recommended?
            tab = Tab.for_formula(dependent)
            Dependency.prune unless tab.with?(dep)
          elsif dep.build?
            Dependency.prune
          end
        end

        missing_deps.map!(&:to_formula)
        missing_deps.reject! { |d| d.installed_prefixes.any? }

        unless missing_deps.empty?
          yield f.full_name, missing_deps if block_given?
          missing[f.full_name] = missing_deps
        end
      end
      missing
    end
{'fraction_non_alphanumeric': 0.08629130966952264, 'fraction_numerical': 0.0, 'mean_word_length': 2.231225296442688, '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': '1052698', 'n_tokens_mistral': 520, 'n_tokens_neox': 489, 'n_words': 112}