dev-cmd/test: Bump to Sorbet typed: strict

This commit is contained in:
Issy Long 2024-06-30 19:30:35 +01:00
parent 3bf6a01516
commit 0837f7c23c
No known key found for this signature in database

View File

@ -1,4 +1,4 @@
# typed: true # typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "abstract_command" require "abstract_command"
@ -110,8 +110,9 @@ module Homebrew
private private
sig { params(formula: Formula).returns(T::Boolean) }
def retry_test?(formula) def retry_test?(formula)
@test_failed ||= Set.new @test_failed ||= T.let(Set.new, T.nilable(T::Set[T.untyped]))
if args.retry? && @test_failed.add?(formula) if args.retry? && @test_failed.add?(formula)
oh1 "Testing #{formula.full_name} (again)" oh1 "Testing #{formula.full_name} (again)"
formula.clear_cache formula.clear_cache