-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update activesupport.rbi #288
Conversation
sig do | ||
params( | ||
number: T.any(Integer, Float, String), | ||
number: T.any(Numeric, String), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These (and many other sigs) were typed as T.any(Integer, Float)
but any Numeric
(BigDecimal, Rational) would work.
sig { params(keys: T.untyped).returns(T.self_type) } | ||
def except(*keys); end | ||
|
||
sig { returns(T::Hash[String, V]) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
symbolize_keys
and stringify_keys
only operate on the keys so whatever the V
is should be unchanged. The other sigs were losing that type information by making them T.untyped
.
@@ -1422,3 +1713,996 @@ module Benchmark | |||
sig { params(block: T.proc.void).returns(Float) } | |||
def self.ms(&block); end | |||
end | |||
|
|||
class ActiveSupport::Cache::Store |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rest of this file was pulled out of the RBI file generated by tapioca.
Merge our (Gusto's) hand-maintained activesupport.rbi with the upstream.