class Dependabot::Uv::UpdateChecker::PipCompileVersionResolver

def order_filenames_for_compilation(filenames)

update them in the right order
If the files we need to update require one another then we need to
def order_filenames_for_compilation(filenames)
  ordered_filenames = T.let([], T::Array[String])
  while (remaining_filenames = filenames - ordered_filenames).any?
    ordered_filenames +=
      remaining_filenames
      .reject do |fn|
        unupdated_reqs = requirement_map[fn] - ordered_filenames
        unupdated_reqs.intersect?(filenames)
      end
  end
  ordered_filenames
end