Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Bo Anderson <[email protected]>
  • Loading branch information
p-linnane and Bo98 committed Aug 19, 2024
1 parent d992a4f commit 39e1d15
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Library/Homebrew/hardware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def family
:dunno
end

sig { returns(T.nilable(Integer)) }
sig { returns(Integer) }
def cores
return @cores if @cores

Expand Down Expand Up @@ -178,12 +178,12 @@ def virtualized?
false
end

sig { returns(T::Array[String]) }
sig { returns(T::Array[Symbol]) }
def features
[]
end

sig { params(name: T::Array[String]).returns(T::Boolean) }
sig { params(name: Symbol).returns(T::Boolean) }
def feature?(name)
features.include?(name)
end
Expand All @@ -203,7 +203,7 @@ def in_rosetta2?
end

class << self
sig { returns(T.nilable(T.any(Integer, String))) }
sig { returns(String) }
def cores_as_words
case Hardware::CPU.cores
when 1 then "single"
Expand Down

0 comments on commit 39e1d15

Please sign in to comment.