sorbet-result 1.0.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.standard.yml +6 -0
- data/.tool-versions +1 -1
- data/CHANGELOG.md +21 -0
- data/Gemfile +3 -5
- data/Gemfile.lock +79 -64
- data/README.md +25 -2
- data/Rakefile +3 -5
- data/lib/minitest/result_assertions.rb +48 -0
- data/lib/sorbet-result.rb +1 -5
- data/lib/typed/result.rb +199 -7
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +1 -0
- data/sorbet/rbi/gems/erubi@1.13.0.rbi +150 -0
- data/sorbet/rbi/gems/{io-console@0.6.0.rbi → io-console@0.7.2.rbi} +1 -0
- data/sorbet/rbi/gems/{json@2.6.3.rbi → json@2.7.5.rbi} +168 -72
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
- data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +240 -0
- data/sorbet/rbi/gems/{minitest@5.18.1.rbi → minitest@5.25.1.rbi} +337 -282
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +1 -0
- data/sorbet/rbi/gems/{parallel@1.23.0.rbi → parallel@1.26.3.rbi} +38 -20
- data/sorbet/rbi/gems/{parser@3.2.2.3.rbi → parser@3.3.5.1.rbi} +663 -2397
- data/sorbet/rbi/gems/prism@1.2.0.rbi +39085 -0
- data/sorbet/rbi/gems/psych@5.1.2.rbi +1732 -0
- data/sorbet/rbi/gems/{racc@1.7.1.rbi → racc@1.8.1.rbi} +37 -36
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +1 -0
- data/sorbet/rbi/gems/{rake@13.0.6.rbi → rake@13.2.1.rbi} +79 -75
- data/sorbet/rbi/gems/rbi@0.2.1.rbi +4535 -0
- data/sorbet/rbi/gems/{regexp_parser@2.8.1.rbi → regexp_parser@2.9.2.rbi} +190 -167
- data/sorbet/rbi/gems/{reline@0.3.5.rbi → reline@0.5.10.rbi} +1 -0
- data/sorbet/rbi/gems/{rubocop-ast@1.29.0.rbi → rubocop-ast@1.33.1.rbi} +1220 -748
- data/sorbet/rbi/gems/rubocop-performance@1.22.1.rbi +9 -0
- data/sorbet/rbi/gems/rubocop-sorbet@0.7.8.rbi +9 -0
- data/sorbet/rbi/gems/{rubocop@1.52.1.rbi → rubocop@1.66.1.rbi} +6236 -3446
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1 -0
- data/sorbet/rbi/gems/spoom@1.5.0.rbi +4932 -0
- data/sorbet/rbi/gems/standard-custom@1.0.2.rbi +9 -0
- data/sorbet/rbi/gems/standard-performance@1.5.0.rbi +9 -0
- data/sorbet/rbi/gems/standard-sorbet@0.0.2.rbi +53 -0
- data/sorbet/rbi/gems/standard@1.41.1.rbi +926 -0
- data/sorbet/rbi/gems/stringio@3.1.1.rbi +9 -0
- data/sorbet/rbi/gems/{tapioca@0.11.6.rbi → tapioca@0.16.3.rbi} +937 -635
- data/sorbet/rbi/gems/{thor@1.2.2.rbi → thor@1.3.2.rbi} +832 -419
- data/sorbet/rbi/gems/{unicode-display_width@2.4.2.rbi → unicode-display_width@2.6.0.rbi} +1 -0
- data/sorbet/rbi/gems/{yard-sorbet@0.8.1.rbi → yard-sorbet@0.9.0.rbi} +36 -29
- data/sorbet/rbi/gems/{yard@0.9.34.rbi → yard@0.9.37.rbi} +431 -271
- data/sorbet/tapioca/config.yml +3 -12
- data/sorbet/tapioca/require.rb +0 -1
- metadata +37 -47
- data/.rubocop.yml +0 -33
- data/lib/typed/failure.rb +0 -81
- data/lib/typed/success.rb +0 -80
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +0 -1083
- data/sorbet/rbi/gems/irb@1.7.0.rbi +0 -342
- data/sorbet/rbi/gems/rbi@0.0.16.rbi +0 -3008
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +0 -4717
- data/sorbet/rbi/gems/rubocop-minitest@0.31.0.rbi +0 -2528
- data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +0 -328
- data/sorbet/rbi/gems/rubocop-sorbet@0.7.0.rbi +0 -1043
- data/sorbet/rbi/gems/spoom@1.2.1.rbi +0 -2503
- data/sorbet/rbi/gems/unparser@0.6.8.rbi +0 -4525
- data/sorbet/rbi/gems/zeitwerk@2.6.8.rbi +0 -986
@@ -4,6 +4,7 @@
|
|
4
4
|
# This is an autogenerated file for types exported from the `unicode-display_width` gem.
|
5
5
|
# Please instead update this file by running `bin/tapioca gem unicode-display_width`.
|
6
6
|
|
7
|
+
|
7
8
|
# source://unicode-display_width//lib/unicode/display_width/constants.rb#3
|
8
9
|
module Unicode; end
|
9
10
|
|
@@ -4,6 +4,7 @@
|
|
4
4
|
# This is an autogenerated file for types exported from the `yard-sorbet` gem.
|
5
5
|
# Please instead update this file by running `bin/tapioca gem yard-sorbet`.
|
6
6
|
|
7
|
+
|
7
8
|
class YARD::Handlers::Ruby::ClassHandler < ::YARD::Handlers::Ruby::Base
|
8
9
|
include ::YARDSorbet::Handlers::StructClassHandler
|
9
10
|
end
|
@@ -35,7 +36,7 @@ end
|
|
35
36
|
# source://yard-sorbet//lib/yard-sorbet/handlers.rb#7
|
36
37
|
module YARDSorbet::Handlers; end
|
37
38
|
|
38
|
-
#
|
39
|
+
# Applies an `@abstract` tag to `abstract!`/`interface!` modules (if not alerady present).
|
39
40
|
#
|
40
41
|
# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#7
|
41
42
|
class YARDSorbet::Handlers::AbstractDSLHandler < ::YARD::Handlers::Ruby::Base
|
@@ -94,7 +95,7 @@ end
|
|
94
95
|
#
|
95
96
|
# source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#9
|
96
97
|
class YARDSorbet::Handlers::MixesInClassMethodsHandler < ::YARD::Handlers::Ruby::Base
|
97
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#
|
98
|
+
# source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#21
|
98
99
|
sig { void }
|
99
100
|
def process; end
|
100
101
|
|
@@ -120,7 +121,7 @@ class YARDSorbet::Handlers::SigHandler < ::YARD::Handlers::Ruby::Base
|
|
120
121
|
|
121
122
|
# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#73
|
122
123
|
sig { params(method_objects: T::Array[::YARD::CodeObjects::MethodObject]).void }
|
123
|
-
def
|
124
|
+
def document_attrs(method_objects); end
|
124
125
|
|
125
126
|
# An attr* sig can be merged into a previous attr* docstring if it is the only parameter passed to the attr*
|
126
127
|
# declaration. This is to avoid needing to rewrite the source code to separate merged and unmerged attr*
|
@@ -130,7 +131,7 @@ class YARDSorbet::Handlers::SigHandler < ::YARD::Handlers::Ruby::Base
|
|
130
131
|
sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Boolean) }
|
131
132
|
def merged_into_attr?(attr_node); end
|
132
133
|
|
133
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#
|
134
|
+
# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#76
|
134
135
|
sig do
|
135
136
|
params(
|
136
137
|
attach_to: T.any(::YARD::CodeObjects::MethodObject, ::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode),
|
@@ -140,15 +141,15 @@ class YARDSorbet::Handlers::SigHandler < ::YARD::Handlers::Ruby::Base
|
|
140
141
|
end
|
141
142
|
def parse_node(attach_to, docstring, include_params: T.unsafe(nil)); end
|
142
143
|
|
143
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#
|
144
|
+
# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#97
|
144
145
|
sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void }
|
145
146
|
def parse_params(node, docstring); end
|
146
147
|
|
147
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#
|
148
|
+
# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#107
|
148
149
|
sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void }
|
149
150
|
def parse_return(node, docstring); end
|
150
151
|
|
151
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#
|
152
|
+
# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#85
|
152
153
|
sig { params(docstring: ::YARD::Docstring, include_params: T::Boolean).void }
|
153
154
|
def parse_sig(docstring, include_params: T.unsafe(nil)); end
|
154
155
|
|
@@ -222,27 +223,27 @@ class YARDSorbet::Handlers::StructPropHandler < ::YARD::Handlers::Ruby::Base
|
|
222
223
|
sig { returns(T::Boolean) }
|
223
224
|
def immutable?; end
|
224
225
|
|
225
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#
|
226
|
+
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#42
|
226
227
|
sig { params(kwd: ::String).returns(T.nilable(::String)) }
|
227
228
|
def kw_arg(kwd); end
|
228
229
|
|
229
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#
|
230
|
+
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#45
|
230
231
|
sig { params(name: ::String).returns(::YARDSorbet::TStructProp) }
|
231
232
|
def make_prop(name); end
|
232
233
|
|
233
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#
|
234
|
+
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#56
|
234
235
|
sig { returns(T::Array[::YARD::Parser::Ruby::AstNode]) }
|
235
236
|
def params; end
|
236
237
|
|
237
238
|
# Register the field explicitly as an attribute.
|
238
239
|
#
|
239
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#
|
240
|
+
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#60
|
240
241
|
sig { params(object: ::YARD::CodeObjects::MethodObject, name: ::String).void }
|
241
242
|
def register_attrs(object, name); end
|
242
243
|
|
243
244
|
# Store the prop for use in the constructor definition
|
244
245
|
#
|
245
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#
|
246
|
+
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#68
|
246
247
|
sig { params(prop: ::YARDSorbet::TStructProp).void }
|
247
248
|
def update_state(prop); end
|
248
249
|
end
|
@@ -266,13 +267,19 @@ module YARDSorbet::NodeUtils
|
|
266
267
|
end
|
267
268
|
def bfs_traverse(node, &_blk); end
|
268
269
|
|
269
|
-
# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#
|
270
|
+
# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#31
|
270
271
|
sig { params(node: ::YARD::Parser::Ruby::AstNode).void }
|
271
272
|
def delete_node(node); end
|
272
273
|
|
274
|
+
# Enqueue the eligible children of a node in the BFS queue
|
275
|
+
#
|
276
|
+
# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#35
|
277
|
+
sig { params(queue: ::Thread::Queue, node: ::YARD::Parser::Ruby::AstNode).void }
|
278
|
+
def enqueue_children(queue, node); end
|
279
|
+
|
273
280
|
# Gets the node that a sorbet `sig` can be attached do, bypassing visisbility modifiers and the like
|
274
281
|
#
|
275
|
-
# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#
|
282
|
+
# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#48
|
276
283
|
sig do
|
277
284
|
params(
|
278
285
|
node: ::YARD::Parser::Ruby::AstNode
|
@@ -284,17 +291,17 @@ module YARDSorbet::NodeUtils
|
|
284
291
|
#
|
285
292
|
# @raise [IndexError] if the node does not have an adjacent sibling (ascending)
|
286
293
|
#
|
287
|
-
# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#
|
294
|
+
# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#53
|
288
295
|
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::YARD::Parser::Ruby::AstNode) }
|
289
296
|
def sibling_node(node); end
|
290
297
|
|
291
|
-
# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#
|
298
|
+
# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#60
|
292
299
|
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Boolean) }
|
293
300
|
def sigable_node?(node); end
|
294
301
|
|
295
302
|
# @see https://github.com/lsegal/yard/blob/main/lib/yard/handlers/ruby/attribute_handler.rb YARD::Handlers::Ruby::AttributeHandler.validated_attribute_names
|
296
303
|
#
|
297
|
-
# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#
|
304
|
+
# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#71
|
298
305
|
sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) }
|
299
306
|
def validated_attribute_names(attr_node); end
|
300
307
|
end
|
@@ -328,43 +335,43 @@ module YARDSorbet::SigToYARD
|
|
328
335
|
|
329
336
|
private
|
330
337
|
|
331
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#
|
338
|
+
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#58
|
332
339
|
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::String) }
|
333
340
|
def build_generic_type(node); end
|
334
341
|
|
335
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#
|
342
|
+
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#67
|
336
343
|
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
|
337
344
|
def convert_aref(node); end
|
338
345
|
|
339
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#
|
346
|
+
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#79
|
340
347
|
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
|
341
348
|
def convert_array(node); end
|
342
349
|
|
343
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#
|
350
|
+
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#87
|
344
351
|
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
|
345
352
|
def convert_collection(node); end
|
346
353
|
|
347
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#
|
354
|
+
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#94
|
348
355
|
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
|
349
356
|
def convert_hash(node); end
|
350
357
|
|
351
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#
|
358
|
+
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#102
|
352
359
|
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
|
353
360
|
def convert_list(node); end
|
354
361
|
|
355
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#
|
362
|
+
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#28
|
356
363
|
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
|
357
364
|
def convert_node(node); end
|
358
365
|
|
359
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#
|
366
|
+
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#40
|
360
367
|
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
|
361
368
|
def convert_node_type(node); end
|
362
369
|
|
363
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#
|
370
|
+
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#107
|
364
371
|
sig { params(node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) }
|
365
372
|
def convert_t_method(node); end
|
366
373
|
|
367
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#
|
374
|
+
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#118
|
368
375
|
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
|
369
376
|
def convert_unknown(node); end
|
370
377
|
end
|
@@ -381,7 +388,7 @@ class YARDSorbet::TStructProp < ::T::Struct
|
|
381
388
|
const :types, T::Array[::String]
|
382
389
|
|
383
390
|
class << self
|
384
|
-
# source://sorbet-runtime/0.5.
|
391
|
+
# source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13
|
385
392
|
def inherited(s); end
|
386
393
|
end
|
387
394
|
end
|
@@ -403,7 +410,7 @@ module YARDSorbet::TagUtils
|
|
403
410
|
|
404
411
|
# Create or update a `YARD` tag with type information
|
405
412
|
#
|
406
|
-
# source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#
|
413
|
+
# source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#28
|
407
414
|
sig do
|
408
415
|
params(
|
409
416
|
docstring: ::YARD::Docstring,
|