You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently if you define a type as a record type and attempt to pass a variable having that type with a keyrest Steep will raise a InsufficientKeywordArguments error. For example:
classMyClass# @rbs!# type option_type = { foo: String, bar: String, baz: String }# @rbs @options: option_typeattr_reader:options#: option_type# @rbs () -> voiddefinitialize@options={foo: 'foo',bar: 'bar',baz: 'baz'}end# @rbs (foo: String, bar: String, baz: String) -> voiddeffoo(foo:,bar:,baz:)# ...end# @rbs () -> voiddefbarfoo(**options)# this will cause Steep to raise InsufficientKeywordArgumentsend# @rbs () -> voiddefbazfoo_options=options# @type var foo_options: option_typefoo(**foo_options)# this will STILL cause Steep to raise InsufficientKeywordArgumentsendend
It would be awesome if:
given an ivar or variable has a type and it is a record type
given the record type has all the keys and types necessary to satisfy the keyword arguments
steep does not raise InsufficientKeywordArguments
given a key mismatch be it missing entirely or marked as optional when it can't be
steep raises InsufficientKeywordArguments
given a value typing mismatch (i.e. there's a String where there should be an Integer)
steep raises an error indicating the value types don't satisfy the keyrest operator.
The text was updated successfully, but these errors were encountered:
Currently if you define a type as a record type and attempt to pass a variable having that type with a keyrest Steep will raise a
InsufficientKeywordArguments
error. For example:It would be awesome if:
InsufficientKeywordArguments
InsufficientKeywordArguments
The text was updated successfully, but these errors were encountered: