Skip to content

Commit 386b9d1

Browse files
committed
Add the remaining ones
1 parent 2afcb10 commit 386b9d1

File tree

5 files changed

+60
-23
lines changed

5 files changed

+60
-23
lines changed

Library/Homebrew/dev-cmd/bottle.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ def merge_json_files(json_files)
182182

183183
sig {
184184
params(old_keys: T::Array[Symbol], old_bottle_spec: BottleSpecification,
185-
new_bottle_hash: T::Hash[String, T.untyped]).returns([T::Array[String],
186-
T::Array[T::Hash[Symbol, String]]])
185+
new_bottle_hash: T::Hash[String, T.untyped])
186+
.returns([T::Array[String], T::Array[T::Hash[Symbol, T.any(String, Symbol)]]])
187187
}
188188
def merge_bottle_spec(old_keys, old_bottle_spec, new_bottle_hash)
189189
mismatches = []
@@ -862,7 +862,8 @@ def merge
862862

863863
sig {
864864
params(formula: Formula, formula_ast: Utils::AST::FormulaAST,
865-
bottle_hash: T::Hash[String, T.untyped]).returns(T.nilable(T::Array[T::Hash[Symbol, String]]))
865+
bottle_hash: T::Hash[String, T.untyped])
866+
.returns(T.nilable(T::Array[T::Hash[Symbol, T.any(String, Symbol)]]))
866867
}
867868
def old_checksums(formula, formula_ast, bottle_hash)
868869
bottle_node = T.cast(formula_ast.bottle_block, T.nilable(RuboCop::AST::BlockNode))

Library/Homebrew/extend/os/linux/cask/config.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module ClassMethods
1515
appdir: "~/.config/apps",
1616
}.freeze, T::Hash[Symbol, String])
1717

18-
sig { returns(T::Hash[Symbol, String]) }
18+
sig { returns(T::Hash[Symbol, T.any(LazyObject, String)]) }
1919
def defaults
2020
{
2121
languages: LazyObject.new { Linux.languages },

Library/Homebrew/formula_installer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1593,7 +1593,7 @@ def pour
15931593

15941594
keg = Keg.new(formula.prefix)
15951595
skip_linkage = formula.bottle_specification.skip_relocation?
1596-
keg.replace_placeholders_with_locations(tab.changed_files, skip_linkage:)
1596+
keg.replace_placeholders_with_locations(tab.changed_files&.map { Pathname(_1) }, skip_linkage:)
15971597

15981598
cellar = formula.bottle_specification.tag_to_cellar(Utils::Bottles.tag)
15991599
return if [:any, :any_skip_relocation].include?(cellar)

Library/Homebrew/standalone/sorbet.rb

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,72 @@ def sig(arg0 = nil, &blk); end
5050

5151
module T
5252
module Types
53+
class FixedArray < Base
54+
def valid?(obj)
55+
recursively_valid?(obj)
56+
end
57+
end
58+
59+
class FixedHash < Base
60+
def valid?(obj)
61+
recursively_valid?(obj)
62+
end
63+
end
64+
65+
class Intersection < Base
66+
def valid?(obj)
67+
recursively_valid?(obj)
68+
end
69+
end
70+
5371
class TypedArray < TypedEnumerable
5472
# overrides Base
5573
def valid?(obj)
5674
recursively_valid?(obj)
5775
end
5876
end
5977

78+
class TypedEnumerable < Base
79+
def valid?(obj)
80+
recursively_valid?(obj)
81+
end
82+
end
83+
84+
class TypedEnumeratorChain < TypedEnumerable
85+
def valid?(obj)
86+
recursively_valid?(obj)
87+
end
88+
end
89+
90+
class TypedEnumeratorLazy < TypedEnumerable
91+
def valid?(obj)
92+
recursively_valid?(obj)
93+
end
94+
end
95+
6096
class TypedHash < TypedEnumerable
6197
# overrides Base
6298
def valid?(obj)
6399
recursively_valid?(obj)
64100
end
65101
end
102+
103+
class TypedRange < TypedEnumerable
104+
def valid?(obj)
105+
recursively_valid?(obj)
106+
end
107+
end
108+
109+
class TypedSet < TypedEnumerable
110+
def valid?(obj)
111+
recursively_valid?(obj)
112+
end
113+
end
114+
115+
class Union < Base
116+
def valid?(obj)
117+
recursively_valid?(obj)
118+
end
119+
end
66120
end
67121
end

Library/Homebrew/test/spec_helper.rb

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,6 @@
2525
require_relative "../standalone"
2626
require_relative "../warnings"
2727

28-
module T
29-
module Types
30-
class TypedArray < TypedEnumerable
31-
# overrides Base
32-
def valid?(obj)
33-
recursively_valid?(obj)
34-
end
35-
end
36-
37-
class TypedHash < TypedEnumerable
38-
# overrides Base
39-
def valid?(obj)
40-
recursively_valid?(obj)
41-
end
42-
end
43-
end
44-
end
45-
4628
Warnings.ignore :parser_syntax do
4729
require "rubocop"
4830
end

0 commit comments

Comments
 (0)