e621stream 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +35 -0
  4. data/lib/e621stream/client/options.rb +20 -0
  5. data/lib/e621stream/client.rb +211 -0
  6. data/lib/e621stream/close_codes.rb +23 -0
  7. data/lib/e621stream/event.rb +24 -0
  8. data/lib/e621stream/events.rb +29 -0
  9. data/lib/e621stream/stream_error.rb +18 -0
  10. data/lib/e621stream/version.rb +5 -0
  11. data/lib/e621stream.rb +18 -0
  12. data/sorbet/config +6 -0
  13. data/sorbet/rbi/annotations/.gitattributes +1 -0
  14. data/sorbet/rbi/annotations/minitest.rbi +120 -0
  15. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  16. data/sorbet/rbi/gems/.gitattributes +1 -0
  17. data/sorbet/rbi/gems/ast@2.4.3.rbi +550 -0
  18. data/sorbet/rbi/gems/async-http@0.105.0.rbi +1649 -0
  19. data/sorbet/rbi/gems/async-pool@0.12.0.rbi +219 -0
  20. data/sorbet/rbi/gems/async-websocket@0.30.2.rbi +271 -0
  21. data/sorbet/rbi/gems/async@2.46.0.rbi +2193 -0
  22. data/sorbet/rbi/gems/benchmark@0.5.0.rbi +495 -0
  23. data/sorbet/rbi/gems/console@1.38.0.rbi +1552 -0
  24. data/sorbet/rbi/gems/erb@6.0.7.rbi +1581 -0
  25. data/sorbet/rbi/gems/erubi@1.13.1.rbi +153 -0
  26. data/sorbet/rbi/gems/fiber-annotation@0.2.0.rbi +62 -0
  27. data/sorbet/rbi/gems/fiber-local@1.1.0.rbi +36 -0
  28. data/sorbet/rbi/gems/fiber-storage@1.0.1.rbi +43 -0
  29. data/sorbet/rbi/gems/io-console@0.9.5.rbi +9 -0
  30. data/sorbet/rbi/gems/io-endpoint@0.19.0.rbi +1079 -0
  31. data/sorbet/rbi/gems/io-event@1.22.3.rbi +971 -0
  32. data/sorbet/rbi/gems/io-stream@0.14.0.rbi +805 -0
  33. data/sorbet/rbi/gems/json@3.1.0.rbi +1929 -0
  34. data/sorbet/rbi/gems/language_server-protocol@3.17.0.6.rbi +9 -0
  35. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +189 -0
  36. data/sorbet/rbi/gems/logger@1.7.0.rbi +896 -0
  37. data/sorbet/rbi/gems/minitest@5.27.0.rbi +1499 -0
  38. data/sorbet/rbi/gems/netrc@0.11.0.rbi +147 -0
  39. data/sorbet/rbi/gems/openssl@4.0.2.rbi +4366 -0
  40. data/sorbet/rbi/gems/parallel@2.3.0.rbi +332 -0
  41. data/sorbet/rbi/gems/parser@3.3.13.0.rbi +5146 -0
  42. data/sorbet/rbi/gems/pp@0.6.4.rbi +373 -0
  43. data/sorbet/rbi/gems/prettyprint@0.2.1.rbi +476 -0
  44. data/sorbet/rbi/gems/prism@1.9.0.rbi +42213 -0
  45. data/sorbet/rbi/gems/protocol-hpack@1.5.1.rbi +418 -0
  46. data/sorbet/rbi/gems/protocol-http1@0.41.1.rbi +894 -0
  47. data/sorbet/rbi/gems/protocol-http2@0.29.2.rbi +2277 -0
  48. data/sorbet/rbi/gems/protocol-http@0.72.1.rbi +3801 -0
  49. data/sorbet/rbi/gems/protocol-rack@0.23.0.rbi +9 -0
  50. data/sorbet/rbi/gems/protocol-url@0.19.0.rbi +9 -0
  51. data/sorbet/rbi/gems/protocol-websocket@0.21.3.rbi +1087 -0
  52. data/sorbet/rbi/gems/racc@1.8.1.rbi +169 -0
  53. data/sorbet/rbi/gems/rack@3.2.8.rbi +9 -0
  54. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +362 -0
  55. data/sorbet/rbi/gems/rake@13.4.2.rbi +3127 -0
  56. data/sorbet/rbi/gems/rbi@0.5.0.rbi +5875 -0
  57. data/sorbet/rbi/gems/rbs@4.2.0.rbi +7133 -0
  58. data/sorbet/rbi/gems/rdoc@8.1.0.rbi +9 -0
  59. data/sorbet/rbi/gems/regexp_parser@2.13.1.rbi +3500 -0
  60. data/sorbet/rbi/gems/reline@0.7.0.rbi +2449 -0
  61. data/sorbet/rbi/gems/require-hooks@0.5.1.rbi +152 -0
  62. data/sorbet/rbi/gems/rexml@3.4.4.rbi +4905 -0
  63. data/sorbet/rbi/gems/rubocop-ast@1.51.0.rbi +7230 -0
  64. data/sorbet/rbi/gems/rubocop-rake@0.7.1.rbi +314 -0
  65. data/sorbet/rbi/gems/rubocop@1.92.2.rbi +69094 -0
  66. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +988 -0
  67. data/sorbet/rbi/gems/rubydex@0.4.4.rbi +1620 -0
  68. data/sorbet/rbi/gems/spoom@1.8.13.rbi +7380 -0
  69. data/sorbet/rbi/gems/tapioca@0.20.0.rbi +3752 -0
  70. data/sorbet/rbi/gems/thor@1.5.0.rbi +3870 -0
  71. data/sorbet/rbi/gems/tsort@0.2.0.rbi +389 -0
  72. data/sorbet/rbi/gems/unicode-display_width@3.3.0.rbi +130 -0
  73. data/sorbet/rbi/gems/unicode-emoji@4.3.0.rbi +254 -0
  74. data/sorbet/rbi/gems/zeitwerk@2.8.3.rbi +1178 -0
  75. data/sorbet/tapioca/config.yml +13 -0
  76. data/sorbet/tapioca/require.rb +4 -0
  77. metadata +175 -0
@@ -0,0 +1,373 @@
1
+ # typed: false
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `pp` gem.
5
+ # Please instead update this file by running `bin/tapioca gem pp`.
6
+
7
+
8
+ class Array
9
+ include ::Enumerable
10
+
11
+ # pkg:gem/pp#lib/pp.rb:412
12
+ def pretty_print(q); end
13
+
14
+ # pkg:gem/pp#lib/pp.rb:420
15
+ def pretty_print_cycle(q); end
16
+ end
17
+
18
+ class Data
19
+ # pkg:gem/pp#lib/pp.rb:495
20
+ def pretty_print(q); end
21
+
22
+ # pkg:gem/pp#lib/pp.rb:523
23
+ def pretty_print_cycle(q); end
24
+ end
25
+
26
+ class File::Stat
27
+ include ::Comparable
28
+
29
+ # pkg:gem/pp#lib/pp.rb:557
30
+ def pretty_print(q); end
31
+ end
32
+
33
+ class Hash
34
+ include ::Enumerable
35
+
36
+ # pkg:gem/pp#lib/pp.rb:426
37
+ def pretty_print(q); end
38
+
39
+ # pkg:gem/pp#lib/pp.rb:430
40
+ def pretty_print_cycle(q); end
41
+ end
42
+
43
+ module Kernel
44
+ # Returns a pretty printed object as a string.
45
+ #
46
+ # See the PP module for more information.
47
+ #
48
+ # pkg:gem/pp#lib/pp.rb:724
49
+ def pretty_inspect; end
50
+
51
+ private
52
+
53
+ # prints arguments in pretty form.
54
+ #
55
+ # +#pp+ returns argument(s).
56
+ #
57
+ # pkg:gem/pp#lib/pp.rb:731
58
+ def pp(*objs); end
59
+
60
+ class << self
61
+ # pkg:gem/pp#lib/pp.rb:731
62
+ def pp(*objs); end
63
+ end
64
+ end
65
+
66
+ class MatchData
67
+ # pkg:gem/pp#lib/pp.rb:640
68
+ def pretty_print(q); end
69
+ end
70
+
71
+ # A pretty-printer for Ruby objects.
72
+ #
73
+ #
74
+ # == What PP Does
75
+ #
76
+ # Standard output by #p returns this:
77
+ # #<PP:0x81fedf0 @genspace=#<Proc:0x81feda0>, @group_queue=#<PrettyPrint::GroupQueue:0x81fed3c @queue=[[#<PrettyPrint::Group:0x81fed78 @breakables=[], @depth=0, @break=false>], []]>, @buffer=[], @newline="\n", @group_stack=[#<PrettyPrint::Group:0x81fed78 @breakables=[], @depth=0, @break=false>], @buffer_width=0, @indent=0, @maxwidth=79, @output_width=2, @output=#<IO:0x8114ee4>>
78
+ #
79
+ # Pretty-printed output returns this:
80
+ # #<PP:0x81fedf0
81
+ # @buffer=[],
82
+ # @buffer_width=0,
83
+ # @genspace=#<Proc:0x81feda0>,
84
+ # @group_queue=
85
+ # #<PrettyPrint::GroupQueue:0x81fed3c
86
+ # @queue=
87
+ # [[#<PrettyPrint::Group:0x81fed78 @break=false, @breakables=[], @depth=0>],
88
+ # []]>,
89
+ # @group_stack=
90
+ # [#<PrettyPrint::Group:0x81fed78 @break=false, @breakables=[], @depth=0>],
91
+ # @indent=0,
92
+ # @maxwidth=79,
93
+ # @newline="\n",
94
+ # @output=#<IO:0x8114ee4>,
95
+ # @output_width=2>
96
+ #
97
+ #
98
+ # == Usage
99
+ #
100
+ # pp(obj) #=> obj
101
+ # pp obj #=> obj
102
+ # pp(obj1, obj2, ...) #=> [obj1, obj2, ...]
103
+ # pp() #=> nil
104
+ #
105
+ # Output <tt>obj(s)</tt> to <tt>$></tt> in pretty printed format.
106
+ #
107
+ # It returns <tt>obj(s)</tt>.
108
+ #
109
+ #
110
+ # == Output Customization
111
+ #
112
+ # To define a customized pretty printing function for your classes,
113
+ # redefine method <code>#pretty_print(pp)</code> in the class.
114
+ # Note that <code>require 'pp'</code> is needed before redefining <code>#pretty_print(pp)</code>.
115
+ #
116
+ # <code>#pretty_print</code> takes the +pp+ argument, which is an instance of the PP class.
117
+ # The method uses #text, #breakable, #nest, #group and #pp to print the
118
+ # object.
119
+ #
120
+ #
121
+ # == Pretty-Print JSON
122
+ #
123
+ # To pretty-print JSON refer to JSON#pretty_generate.
124
+ #
125
+ #
126
+ # == Author
127
+ # Tanaka Akira <akr@fsij.org>
128
+ class PP < ::PrettyPrint
129
+ include ::PP::PPMethods
130
+
131
+ class << self
132
+ # :stopdoc:
133
+ #
134
+ # pkg:gem/pp#lib/pp.rb:116
135
+ def mcall(obj, mod, meth, *args, &block); end
136
+
137
+ # Outputs +obj+ to +out+ in pretty printed format of
138
+ # +width+ columns in width.
139
+ #
140
+ # If +out+ is omitted, <code>$></code> is assumed.
141
+ # If +width+ is omitted, the width of +out+ is assumed (see
142
+ # width_for).
143
+ #
144
+ # PP.pp returns +out+.
145
+ #
146
+ # pkg:gem/pp#lib/pp.rb:96
147
+ def pp(obj, out = T.unsafe(nil), width = T.unsafe(nil)); end
148
+
149
+ # Returns the sharing detection flag as a boolean value.
150
+ # It is false (nil) by default.
151
+ # Returns the sharing detection flag as a boolean value.
152
+ # It is false by default.
153
+ #
154
+ # pkg:gem/pp#lib/pp.rb:125
155
+ def sharing_detection; end
156
+
157
+ # Sets the sharing detection flag to b.
158
+ #
159
+ # pkg:gem/pp#lib/pp.rb:129
160
+ def sharing_detection=(b); end
161
+
162
+ # Outputs +obj+ to +out+ like PP.pp but with no indent and
163
+ # newline.
164
+ #
165
+ # PP.singleline_pp returns +out+.
166
+ #
167
+ # pkg:gem/pp#lib/pp.rb:108
168
+ def singleline_pp(obj, out = T.unsafe(nil)); end
169
+
170
+ # Returns the usable width for +out+.
171
+ # As the width of +out+:
172
+ # 1. If +out+ is assigned to a tty device, its width is used.
173
+ # 2. Otherwise, or it could not get the value, the +COLUMN+
174
+ # environment variable is assumed to be set to the width.
175
+ # 3. If +COLUMN+ is not set to a non-zero number, 80 is assumed.
176
+ #
177
+ # And finally, returns the above width value - 1.
178
+ # * This -1 is for Windows command prompt, which moves the cursor to
179
+ # the next line if it reaches the last column.
180
+ #
181
+ # pkg:gem/pp#lib/pp.rb:79
182
+ def width_for(out); end
183
+ end
184
+ end
185
+
186
+ module PP::ObjectMixin
187
+ # A default pretty printing method for general objects.
188
+ # It calls #pretty_print_instance_variables to list instance variables.
189
+ #
190
+ # If +self+ has a customized (redefined) #inspect method,
191
+ # the result of self.inspect is used but it obviously has no
192
+ # line break hints.
193
+ #
194
+ # This module provides predefined #pretty_print methods for some of
195
+ # the most commonly used built-in classes for convenience.
196
+ #
197
+ # pkg:gem/pp#lib/pp.rb:362
198
+ def pretty_print(q); end
199
+
200
+ # A default pretty printing method for general objects that are
201
+ # detected as part of a cycle.
202
+ #
203
+ # pkg:gem/pp#lib/pp.rb:379
204
+ def pretty_print_cycle(q); end
205
+
206
+ # Is #inspect implementation using #pretty_print.
207
+ # If you implement #pretty_print, it can be used as follows.
208
+ #
209
+ # alias inspect pretty_print_inspect
210
+ #
211
+ # However, doing this requires that every class that #inspect is called on
212
+ # implement #pretty_print, or a RuntimeError will be raised.
213
+ #
214
+ # pkg:gem/pp#lib/pp.rb:402
215
+ def pretty_print_inspect; end
216
+
217
+ # Returns a sorted array of instance variable names.
218
+ #
219
+ # This method should return an array of names of instance variables as symbols or strings as:
220
+ # +[:@a, :@b]+.
221
+ #
222
+ # pkg:gem/pp#lib/pp.rb:390
223
+ def pretty_print_instance_variables; end
224
+ end
225
+
226
+ # Module that defines helper methods for pretty_print.
227
+ module PP::PPMethods
228
+ # Check whether the object_id +id+ is in the current buffer of objects
229
+ # to be pretty printed. Used to break cycles in chains of objects to be
230
+ # pretty printed.
231
+ #
232
+ # pkg:gem/pp#lib/pp.rb:161
233
+ def check_inspect_key(id); end
234
+
235
+ # A convenience method which is same as follows:
236
+ #
237
+ # text ','
238
+ # breakable
239
+ #
240
+ # pkg:gem/pp#lib/pp.rb:238
241
+ def comma_breakable; end
242
+
243
+ # Yields to a block
244
+ # and preserves the previous set of objects being printed.
245
+ #
246
+ # pkg:gem/pp#lib/pp.rb:147
247
+ def guard_inspect_key; end
248
+
249
+ # A convenience method, like object_group, but also reformats the Object's
250
+ # object_id.
251
+ #
252
+ # pkg:gem/pp#lib/pp.rb:228
253
+ def object_address_group(obj, &block); end
254
+
255
+ # A convenience method which is same as follows:
256
+ #
257
+ # group(1, '#<' + obj.class.name, '>') { ... }
258
+ #
259
+ # pkg:gem/pp#lib/pp.rb:222
260
+ def object_group(obj, &block); end
261
+
262
+ # Removes an object from the set of objects being pretty printed.
263
+ #
264
+ # pkg:gem/pp#lib/pp.rb:173
265
+ def pop_inspect_key(id); end
266
+
267
+ # Adds +obj+ to the pretty printing buffer
268
+ # using Object#pretty_print or Object#pretty_print_cycle.
269
+ #
270
+ # Object#pretty_print_cycle is used when +obj+ is already
271
+ # printed, a.k.a the object reference chain has a cycle.
272
+ #
273
+ # pkg:gem/pp#lib/pp.rb:200
274
+ def pp(obj); end
275
+
276
+ # A pretty print for a Hash
277
+ #
278
+ # pkg:gem/pp#lib/pp.rb:302
279
+ def pp_hash(obj); end
280
+
281
+ # A pretty print for a pair of Hash
282
+ #
283
+ # pkg:gem/pp#lib/pp.rb:314
284
+ def pp_hash_pair(k, v); end
285
+
286
+ # A present standard failsafe for pretty printing any given Object
287
+ #
288
+ # pkg:gem/pp#lib/pp.rb:286
289
+ def pp_object(obj); end
290
+
291
+ # Adds the object_id +id+ to the set of objects being pretty printed, so
292
+ # as to not repeat objects.
293
+ #
294
+ # pkg:gem/pp#lib/pp.rb:168
295
+ def push_inspect_key(id); end
296
+
297
+ # Adds a separated list.
298
+ # The list is separated by comma with breakable space, by default.
299
+ #
300
+ # #seplist iterates the +list+ using +iter_method+.
301
+ # It yields each object to the block given for #seplist.
302
+ # The procedure +separator_proc+ is called between each yields.
303
+ #
304
+ # If the iteration is zero times, +separator_proc+ is not called at all.
305
+ #
306
+ # If +separator_proc+ is nil or not given,
307
+ # +lambda { comma_breakable }+ is used.
308
+ # If +iter_method+ is not given, :each is used.
309
+ #
310
+ # For example, following 3 code fragments has similar effect.
311
+ #
312
+ # q.seplist([1,2,3]) {|v| xxx v }
313
+ #
314
+ # q.seplist([1,2,3], lambda { q.comma_breakable }, :each) {|v| xxx v }
315
+ #
316
+ # xxx 1
317
+ # q.comma_breakable
318
+ # xxx 2
319
+ # q.comma_breakable
320
+ # xxx 3
321
+ #
322
+ # pkg:gem/pp#lib/pp.rb:267
323
+ def seplist(list, sep = T.unsafe(nil), iter_method = T.unsafe(nil)); end
324
+
325
+ private
326
+
327
+ # pkg:gem/pp#lib/pp.rb:177
328
+ def guard_inspect(object); end
329
+ end
330
+
331
+ # pkg:gem/pp#lib/pp.rb:280
332
+ PP::PPMethods::EMPTY_KWHASH = T.let(T.unsafe(nil), Hash)
333
+
334
+ class PP::SingleLine < ::PrettyPrint::SingleLine
335
+ include ::PP::PPMethods
336
+ end
337
+
338
+ # The version string
339
+ #
340
+ # pkg:gem/pp#lib/pp.rb:67
341
+ PP::VERSION = T.let(T.unsafe(nil), String)
342
+
343
+ class Range
344
+ include ::Enumerable
345
+
346
+ # pkg:gem/pp#lib/pp.rb:529
347
+ def pretty_print(q); end
348
+ end
349
+
350
+ class RubyVM::AbstractSyntaxTree::Node
351
+ # pkg:gem/pp#lib/pp.rb:679
352
+ def pretty_print(q); end
353
+
354
+ # pkg:gem/pp#lib/pp.rb:666
355
+ def pretty_print_children(q, names = T.unsafe(nil)); end
356
+ end
357
+
358
+ class String
359
+ include ::Comparable
360
+
361
+ # pkg:gem/pp#lib/pp.rb:541
362
+ def pretty_print(q); end
363
+ end
364
+
365
+ class Struct
366
+ include ::Enumerable
367
+
368
+ # pkg:gem/pp#lib/pp.rb:468
369
+ def pretty_print(q); end
370
+
371
+ # pkg:gem/pp#lib/pp.rb:482
372
+ def pretty_print_cycle(q); end
373
+ end