tapioca 0.19.0 → 0.19.1

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 (69) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tapioca/commands/abstract_dsl.rb +1 -1
  3. data/lib/tapioca/commands/check_shims.rb +3 -0
  4. data/lib/tapioca/commands/configure.rb +1 -0
  5. data/lib/tapioca/commands/todo.rb +8 -2
  6. data/lib/tapioca/dsl/compiler.rb +13 -13
  7. data/lib/tapioca/dsl/compilers/aasm.rb +1 -1
  8. data/lib/tapioca/dsl/compilers/action_controller_helpers.rb +2 -2
  9. data/lib/tapioca/dsl/compilers/action_mailer.rb +1 -1
  10. data/lib/tapioca/dsl/compilers/action_text.rb +1 -1
  11. data/lib/tapioca/dsl/compilers/active_job.rb +1 -1
  12. data/lib/tapioca/dsl/compilers/active_model_attributes.rb +1 -1
  13. data/lib/tapioca/dsl/compilers/active_model_secure_password.rb +1 -1
  14. data/lib/tapioca/dsl/compilers/active_model_validations_confirmation.rb +1 -1
  15. data/lib/tapioca/dsl/compilers/active_record_associations.rb +1 -1
  16. data/lib/tapioca/dsl/compilers/active_record_columns.rb +1 -1
  17. data/lib/tapioca/dsl/compilers/active_record_delegated_types.rb +1 -1
  18. data/lib/tapioca/dsl/compilers/active_record_enum.rb +1 -1
  19. data/lib/tapioca/dsl/compilers/active_record_fixtures.rb +1 -1
  20. data/lib/tapioca/dsl/compilers/active_record_relations.rb +1 -1
  21. data/lib/tapioca/dsl/compilers/active_record_scope.rb +1 -1
  22. data/lib/tapioca/dsl/compilers/active_record_secure_token.rb +1 -1
  23. data/lib/tapioca/dsl/compilers/active_record_store.rb +1 -1
  24. data/lib/tapioca/dsl/compilers/active_record_typed_store.rb +1 -1
  25. data/lib/tapioca/dsl/compilers/active_resource.rb +1 -1
  26. data/lib/tapioca/dsl/compilers/active_storage.rb +2 -2
  27. data/lib/tapioca/dsl/compilers/active_support_concern.rb +6 -6
  28. data/lib/tapioca/dsl/compilers/active_support_current_attributes.rb +1 -1
  29. data/lib/tapioca/dsl/compilers/active_support_environment_inquirer.rb +1 -1
  30. data/lib/tapioca/dsl/compilers/active_support_time_ext.rb +1 -1
  31. data/lib/tapioca/dsl/compilers/config.rb +2 -2
  32. data/lib/tapioca/dsl/compilers/frozen_record.rb +1 -1
  33. data/lib/tapioca/dsl/compilers/graphql_input_object.rb +1 -1
  34. data/lib/tapioca/dsl/compilers/graphql_mutation.rb +1 -1
  35. data/lib/tapioca/dsl/compilers/identity_cache.rb +2 -2
  36. data/lib/tapioca/dsl/compilers/json_api_client_resource.rb +1 -1
  37. data/lib/tapioca/dsl/compilers/kredis.rb +1 -1
  38. data/lib/tapioca/dsl/compilers/mixed_in_class_attributes.rb +2 -2
  39. data/lib/tapioca/dsl/compilers/protobuf.rb +1 -1
  40. data/lib/tapioca/dsl/compilers/rails_generators.rb +1 -1
  41. data/lib/tapioca/dsl/compilers/sidekiq_worker.rb +1 -1
  42. data/lib/tapioca/dsl/compilers/smart_properties.rb +1 -1
  43. data/lib/tapioca/dsl/compilers/state_machines.rb +2 -2
  44. data/lib/tapioca/dsl/compilers/url_helpers.rb +7 -7
  45. data/lib/tapioca/dsl/helpers/graphql_type_helper.rb +1 -1
  46. data/lib/tapioca/dsl/pipeline.rb +10 -10
  47. data/lib/tapioca/gem/events.rb +7 -7
  48. data/lib/tapioca/gem/listeners/methods.rb +8 -8
  49. data/lib/tapioca/gem/listeners/mixins.rb +3 -3
  50. data/lib/tapioca/gem/listeners/sorbet_signatures.rb +5 -3
  51. data/lib/tapioca/gem/listeners/sorbet_type_variables.rb +1 -1
  52. data/lib/tapioca/gem/pipeline.rb +18 -18
  53. data/lib/tapioca/helpers/sorbet_helper.rb +19 -0
  54. data/lib/tapioca/helpers/test/dsl_compiler.rb +2 -9
  55. data/lib/tapioca/internal.rb +1 -0
  56. data/lib/tapioca/rbi_ext/model.rb +8 -5
  57. data/lib/tapioca/runtime/dynamic_mixin_compiler.rb +6 -6
  58. data/lib/tapioca/runtime/generic_type_registry.rb +8 -8
  59. data/lib/tapioca/runtime/reflection.rb +20 -20
  60. data/lib/tapioca/runtime/trackers/constant_definition.rb +3 -3
  61. data/lib/tapioca/runtime/trackers/method_definition.rb +4 -4
  62. data/lib/tapioca/runtime/trackers/mixin.rb +5 -5
  63. data/lib/tapioca/runtime/trackers/required_ancestor.rb +2 -2
  64. data/lib/tapioca/runtime/trackers/tracker.rb +1 -1
  65. data/lib/tapioca/sorbet_ext/generic_name_patch.rb +1 -1
  66. data/lib/tapioca/sorbet_ext/void_patch.rb +29 -0
  67. data/lib/tapioca/static/symbol_loader.rb +19 -1
  68. data/lib/tapioca/version.rb +1 -1
  69. metadata +5 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1af20de26e446268513156110cac416ce7ba2b35f96f4bb7898960d640aa4333
4
- data.tar.gz: 4d760ed85be418d9c9dc166d61ea59ccaf312c929bd4930709abc4b946f3876f
3
+ metadata.gz: 4d3606b2440f453c78a226d8beec0ce61673d416fa74dba7d0380cd31404feaa
4
+ data.tar.gz: c290cccb23e39c3423913357b187d74de382de4c818194676b206e0981f21c17
5
5
  SHA512:
6
- metadata.gz: 1bf6bbf64b782f072a23109ca90cf9c3743b82501bf304badcd97b816583f2fff3ec3574d58df22f05af716d750ba86589074f43a1ee5d3f9e383fdb83c8ee02
7
- data.tar.gz: a4d066179177ee84ee349bb7a8514d9b2ad8836051b33adc45ca3708948ddc01a002d6d54fd9c42cc0993ca5e30f74a61f5f5ad8a603ef493b50bee0c7d6ef93
6
+ metadata.gz: 4d655006a08405d41158b918625eadbcf7eec8b43da4c9077a7a9fe3ad94ee549865c27f0c66ae1fc0424afc8e6f30806e60f2ed661067264d920e52c6f04b70
7
+ data.tar.gz: 96c0d237d2fda54650e919d74fc838b5121b714dcb3a4d35d60836911895265b99b29848f399b7f529050d4c930c3669e52ca3787dfbf1671b883883f39b6bba
@@ -162,7 +162,7 @@ module Tapioca
162
162
  filenames.to_set
163
163
  end
164
164
 
165
- #: (Array[String] constant_names, ?ignore_missing: bool) -> Array[T::Module[top]]
165
+ #: (Array[String] constant_names, ?ignore_missing: bool) -> Array[Module[top]]
166
166
  def constantize(constant_names, ignore_missing: false)
167
167
  constant_map = constant_names.to_h do |name|
168
168
  [name, Object.const_get(name)]
@@ -53,6 +53,9 @@ module Tapioca
53
53
  if @payload
54
54
  Dir.mktmpdir do |dir|
55
55
  payload_path = dir
56
+
57
+ # No need for `--stop-after`, because Sorbet exits immediately after dumping the payload.
58
+ # https://github.com/sorbet/sorbet/blob/41ae325/main/realmain.cc#L522-L552
56
59
  result = sorbet("--no-config --print=payload-sources:#{payload_path}")
57
60
 
58
61
  unless result.status
@@ -38,6 +38,7 @@ module Tapioca
38
38
  .
39
39
  --ignore=tmp/
40
40
  --ignore=vendor/
41
+ --parser=prism
41
42
  CONTENT
42
43
  end
43
44
 
@@ -83,12 +83,18 @@ module Tapioca
83
83
  #: -> Array[String]
84
84
  def unresolved_constants
85
85
  # Taken from https://github.com/sorbet/sorbet/blob/master/gems/sorbet/lib/todo-rbi.rb
86
- sorbet("--print=missing-constants", "--quiet", "--stdout-hup-hack", "--no-error-count")
86
+ sorbet(
87
+ "--print=missing-constants",
88
+ "--stop-after=resolver",
89
+ "--quiet",
90
+ "--stdout-hup-hack",
91
+ "--no-error-count",
92
+ )
87
93
  .out
88
94
  .strip
89
95
  .each_line
90
96
  .filter_map do |line|
91
- next if line.include?("<")
97
+ next if line.include?("<") # Skip singleton classes like `#<Class:String>`
92
98
 
93
99
  line.strip
94
100
  .gsub(/T\.class_of\(([:\w]+)\)/, '\1') # Turn T.class_of(Foo)::Bar into Foo::Bar
@@ -4,7 +4,7 @@
4
4
  module Tapioca
5
5
  module Dsl
6
6
  # @abstract
7
- #: [ConstantType < T::Module[top]]
7
+ #: [ConstantType < Module[top]]
8
8
  class Compiler
9
9
  include RBIHelper
10
10
  include Runtime::Reflection
@@ -19,24 +19,24 @@ module Tapioca
19
19
  #: Hash[String, untyped]
20
20
  attr_reader :options
21
21
 
22
- @@requested_constants = [] #: Array[T::Module[top]] # rubocop:disable Style/ClassVars
22
+ @@requested_constants = [] #: Array[Module[top]] # rubocop:disable Style/ClassVars
23
23
 
24
24
  class << self
25
- #: (T::Module[top] constant) -> bool
25
+ #: (Module[top] constant) -> bool
26
26
  def handles?(constant)
27
27
  processable_constants.include?(constant)
28
28
  end
29
29
 
30
30
  # @abstract
31
- #: -> Enumerable[T::Module[top]]
31
+ #: -> Enumerable[Module[top]]
32
32
  def gather_constants = raise NotImplementedError, "Abstract method called"
33
33
 
34
- #: -> Set[T::Module[top]]
34
+ #: -> Set[Module[top]]
35
35
  def processable_constants
36
- @processable_constants ||= T::Set[T::Module[T.anything]].new.compare_by_identity.merge(gather_constants) #: Set[T::Module[top]]?
36
+ @processable_constants ||= T::Set[T::Module[T.anything]].new.compare_by_identity.merge(gather_constants) #: Set[Module[top]]?
37
37
  end
38
38
 
39
- #: (Array[T::Module[top]] constants) -> void
39
+ #: (Array[Module[top]] constants) -> void
40
40
  def requested_constants=(constants)
41
41
  @@requested_constants = constants # rubocop:disable Style/ClassVars
42
42
  end
@@ -69,13 +69,13 @@ module Tapioca
69
69
  @all_classes ||= all_modules.grep(Class).freeze #: Enumerable[Class[top]]?
70
70
  end
71
71
 
72
- #: -> Enumerable[T::Module[top]]
72
+ #: -> Enumerable[Module[top]]
73
73
  def all_modules
74
74
  @all_modules ||= if @@requested_constants.any?
75
75
  @@requested_constants.grep(Module)
76
76
  else
77
77
  ObjectSpace.each_object(Module).to_a
78
- end.freeze #: Enumerable[T::Module[top]]?
78
+ end.freeze #: Enumerable[Module[top]]?
79
79
  end
80
80
  end
81
81
 
@@ -124,10 +124,12 @@ module Tapioca
124
124
  signature.kwarg_types.each { |_, kwarg_type| params << kwarg_type.to_s }
125
125
 
126
126
  # rest parameter type
127
- params << signature.rest_type.to_s if signature.has_rest
127
+ rest_type = signature.rest_type
128
+ params << rest_type.to_s if rest_type
128
129
 
129
130
  # keyrest parameter type
130
- params << signature.keyrest_type.to_s if signature.has_keyrest
131
+ keyrest_type = signature.keyrest_type
132
+ params << keyrest_type.to_s if keyrest_type
131
133
 
132
134
  # special case `.void` in a proc
133
135
  unless signature.block_name.nil?
@@ -141,14 +143,12 @@ module Tapioca
141
143
  def create_method_from_def(scope, method_def, class_method: false)
142
144
  parameters = compile_method_parameters_to_rbi(method_def)
143
145
  return_type = compile_method_return_type_to_rbi(method_def)
144
- type_params = extract_type_parameters(parameters.map(&:type).push(return_type))
145
146
 
146
147
  scope.create_method(
147
148
  method_def.name.to_s,
148
149
  parameters: parameters,
149
150
  return_type: return_type,
150
151
  class_method: class_method,
151
- type_params: type_params,
152
152
  )
153
153
  end
154
154
 
@@ -202,7 +202,7 @@ module Tapioca
202
202
 
203
203
  class << self
204
204
  # @override
205
- #: -> Enumerable[T::Module[top]]
205
+ #: -> Enumerable[Module[top]]
206
206
  def gather_constants
207
207
  T.cast(ObjectSpace.each_object(::AASM::ClassMethods), T::Enumerable[T::Module[T.anything]])
208
208
  end
@@ -117,7 +117,7 @@ module Tapioca
117
117
 
118
118
  class << self
119
119
  # @override
120
- #: -> Enumerable[T::Module[top]]
120
+ #: -> Enumerable[Module[top]]
121
121
  def gather_constants
122
122
  descendants_of(::ActionController::Base).select(&:name).select do |klass|
123
123
  klass.const_defined?(:HelperMethods, false)
@@ -148,7 +148,7 @@ module Tapioca
148
148
  )
149
149
  end
150
150
 
151
- #: (T::Module[top] mod) -> Array[String]
151
+ #: (Module[top] mod) -> Array[String]
152
152
  def gather_includes(mod)
153
153
  mod.ancestors
154
154
  .reject { |ancestor| ancestor.is_a?(Class) || ancestor == mod || name_of(ancestor).nil? }
@@ -50,7 +50,7 @@ module Tapioca
50
50
 
51
51
  class << self
52
52
  # @override
53
- #: -> Enumerable[T::Module[top]]
53
+ #: -> Enumerable[Module[top]]
54
54
  def gather_constants
55
55
  descendants_of(::ActionMailer::Base).reject(&:abstract?)
56
56
  end
@@ -80,7 +80,7 @@ module Tapioca
80
80
  end
81
81
 
82
82
  # @override
83
- #: -> Enumerable[T::Module[top]]
83
+ #: -> Enumerable[Module[top]]
84
84
  def gather_constants
85
85
  descendants_of(::ActiveRecord::Base)
86
86
  .reject(&:abstract_class?)
@@ -84,7 +84,7 @@ module Tapioca
84
84
 
85
85
  class << self
86
86
  # @override
87
- #: -> Enumerable[T::Module[top]]
87
+ #: -> Enumerable[Module[top]]
88
88
  def gather_constants
89
89
  descendants_of(::ActiveJob::Base)
90
90
  end
@@ -59,7 +59,7 @@ module Tapioca
59
59
 
60
60
  class << self
61
61
  # @override
62
- #: -> Enumerable[T::Module[top]]
62
+ #: -> Enumerable[Module[top]]
63
63
  def gather_constants
64
64
  all_classes.grep(::ActiveModel::Attributes::ClassMethods)
65
65
  end
@@ -89,7 +89,7 @@ module Tapioca
89
89
 
90
90
  class << self
91
91
  # @override
92
- #: -> Enumerable[T::Module[top]]
92
+ #: -> Enumerable[Module[top]]
93
93
  def gather_constants
94
94
  # In some versions of Rails 8.1, `ActiveModel::SecurePassword` uses `Numeric#minutes`
95
95
  # which isn't explicitly required in the gem, and it might not be loaded already.
@@ -44,7 +44,7 @@ module Tapioca
44
44
  class ActiveModelValidationsConfirmation < Compiler
45
45
  class << self
46
46
  # @override
47
- #: -> Enumerable[T::Module[top]]
47
+ #: -> Enumerable[Module[top]]
48
48
  def gather_constants
49
49
  # Collect all the classes that include ActiveModel::Validations
50
50
  all_classes.select { |c| ActiveModel::Validations > c }
@@ -136,7 +136,7 @@ module Tapioca
136
136
 
137
137
  class << self
138
138
  # @override
139
- #: -> Enumerable[T::Module[top]]
139
+ #: -> Enumerable[Module[top]]
140
140
  def gather_constants
141
141
  descendants_of(::ActiveRecord::Base).reject(&:abstract_class?)
142
142
  end
@@ -163,7 +163,7 @@ module Tapioca
163
163
 
164
164
  class << self
165
165
  # @override
166
- #: -> Enumerable[T::Module[top]]
166
+ #: -> Enumerable[Module[top]]
167
167
  def gather_constants
168
168
  descendants_of(::ActiveRecord::Base).reject(&:abstract_class?)
169
169
  end
@@ -88,7 +88,7 @@ module Tapioca
88
88
 
89
89
  class << self
90
90
  # @override
91
- #: -> Enumerable[T::Module[top]]
91
+ #: -> Enumerable[Module[top]]
92
92
  def gather_constants
93
93
  descendants_of(::ActiveRecord::Base).reject(&:abstract_class?)
94
94
  end
@@ -74,7 +74,7 @@ module Tapioca
74
74
 
75
75
  class << self
76
76
  # @override
77
- #: -> Enumerable[T::Module[top]]
77
+ #: -> Enumerable[Module[top]]
78
78
  def gather_constants
79
79
  descendants_of(::ActiveRecord::Base)
80
80
  end
@@ -58,7 +58,7 @@ module Tapioca
58
58
 
59
59
  class << self
60
60
  # @override
61
- #: -> Enumerable[T::Module[top]]
61
+ #: -> Enumerable[Module[top]]
62
62
  def gather_constants
63
63
  return [] unless defined?(Rails.application) && Rails.application
64
64
 
@@ -181,7 +181,7 @@ module Tapioca
181
181
 
182
182
  class << self
183
183
  # @override
184
- #: -> Enumerable[T::Module[top]]
184
+ #: -> Enumerable[Module[top]]
185
185
  def gather_constants
186
186
  ActiveRecord::Base.descendants.reject(&:abstract_class?)
187
187
  end
@@ -77,7 +77,7 @@ module Tapioca
77
77
 
78
78
  class << self
79
79
  # @override
80
- #: -> Enumerable[T::Module[top]]
80
+ #: -> Enumerable[Module[top]]
81
81
  def gather_constants
82
82
  descendants_of(::ActiveRecord::Base).reject(&:abstract_class?)
83
83
  end
@@ -57,7 +57,7 @@ module Tapioca
57
57
 
58
58
  class << self
59
59
  # @override
60
- #: -> Enumerable[T::Module[top]]
60
+ #: -> Enumerable[Module[top]]
61
61
  def gather_constants
62
62
  descendants_of(::ActiveRecord::Base).reject(&:abstract_class?)
63
63
  end
@@ -132,7 +132,7 @@ module Tapioca
132
132
 
133
133
  class << self
134
134
  # @override
135
- #: -> Enumerable[T::Module[top]]
135
+ #: -> Enumerable[Module[top]]
136
136
  def gather_constants
137
137
  descendants_of(::ActiveRecord::Base).reject(&:abstract_class?)
138
138
  end
@@ -107,7 +107,7 @@ module Tapioca
107
107
 
108
108
  class << self
109
109
  # @override
110
- #: -> Enumerable[T::Module[top]]
110
+ #: -> Enumerable[Module[top]]
111
111
  def gather_constants
112
112
  descendants_of(::ActiveRecord::Base).select do |klass|
113
113
  klass.include?(ActiveRecord::TypedStore::Behavior)
@@ -70,7 +70,7 @@ module Tapioca
70
70
 
71
71
  class << self
72
72
  # @override
73
- #: -> Enumerable[T::Module[top]]
73
+ #: -> Enumerable[Module[top]]
74
74
  def gather_constants
75
75
  descendants_of(::ActiveResource::Base)
76
76
  end
@@ -38,7 +38,7 @@ module Tapioca
38
38
  # def photo=(attachable); end
39
39
  # end
40
40
  # ~~~
41
- #: [ConstantType = (T::Module[top] & ::ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods)]
41
+ #: [ConstantType = (Module[top] & ::ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods)]
42
42
  class ActiveStorage < Compiler
43
43
  # @override
44
44
  #: -> void
@@ -64,7 +64,7 @@ module Tapioca
64
64
 
65
65
  class << self
66
66
  # @override
67
- #: -> Enumerable[T::Module[top]]
67
+ #: -> Enumerable[Module[top]]
68
68
  def gather_constants
69
69
  descendants_of(::ActiveRecord::Base)
70
70
  .reject(&:abstract_class?)
@@ -37,7 +37,7 @@ module Tapioca
37
37
  # mixes_in_class_methods(::Foo::ClassMethods)
38
38
  # end
39
39
  # ~~~
40
- #: [ConstantType = T::Module[top]]
40
+ #: [ConstantType = Module[top]]
41
41
  class ActiveSupportConcern < Compiler
42
42
  # @override
43
43
  #: -> void
@@ -61,7 +61,7 @@ module Tapioca
61
61
 
62
62
  class << self
63
63
  # @override
64
- #: -> Enumerable[T::Module[top]]
64
+ #: -> Enumerable[Module[top]]
65
65
  def gather_constants
66
66
  all_modules.select do |mod|
67
67
  name_of(mod) && # i.e. not anonymous
@@ -72,10 +72,10 @@ module Tapioca
72
72
  end
73
73
 
74
74
  # Returns true when `mod` includes other concerns
75
- #: (T::Module[top] mod) -> bool
75
+ #: (Module[top] mod) -> bool
76
76
  def has_dependencies?(mod) = dependencies_of(mod).any?
77
77
 
78
- #: (T::Module[top] concern) -> Array[T::Module[top]]
78
+ #: (Module[top] concern) -> Array[Module[top]]
79
79
  def dependencies_of(concern)
80
80
  concern.instance_variable_get(:@_dependencies) || []
81
81
  end
@@ -83,12 +83,12 @@ module Tapioca
83
83
 
84
84
  private
85
85
 
86
- #: (T::Module[top] concern) -> Array[T::Module[top]]
86
+ #: (Module[top] concern) -> Array[Module[top]]
87
87
  def dependencies_of(concern)
88
88
  self.class.dependencies_of(concern)
89
89
  end
90
90
 
91
- #: (?T::Module[top] concern) -> Array[T::Module[top]]
91
+ #: (?Module[top] concern) -> Array[Module[top]]
92
92
  def linearized_dependencies(concern = constant)
93
93
  # Grab all the dependencies of the concern
94
94
  dependencies = dependencies_of(concern)
@@ -93,7 +93,7 @@ module Tapioca
93
93
 
94
94
  class << self
95
95
  # @override
96
- #: -> Enumerable[T::Module[top]]
96
+ #: -> Enumerable[Module[top]]
97
97
  def gather_constants
98
98
  descendants_of(::ActiveSupport::CurrentAttributes)
99
99
  end
@@ -47,7 +47,7 @@ module Tapioca
47
47
 
48
48
  class << self
49
49
  # @override
50
- #: -> T::Enumerable[T::Module[top]]
50
+ #: -> T::Enumerable[Module[top]]
51
51
  def gather_constants
52
52
  return [] unless defined?(Rails.application) && Rails.application
53
53
 
@@ -54,7 +54,7 @@ module Tapioca
54
54
 
55
55
  class << self
56
56
  # @override
57
- #: -> Enumerable[T::Module[top]]
57
+ #: -> Enumerable[Module[top]]
58
58
  def gather_constants
59
59
  [::Time]
60
60
  end
@@ -40,7 +40,7 @@ module Tapioca
40
40
  # def github=(value); end
41
41
  # end
42
42
  # ```
43
- #: [ConstantType = T::Module[top]]
43
+ #: [ConstantType = Module[top]]
44
44
  class Config < Compiler
45
45
  CONFIG_OPTIONS_SUFFIX = "ConfigOptions"
46
46
 
@@ -92,7 +92,7 @@ module Tapioca
92
92
 
93
93
  class << self
94
94
  # @override
95
- #: -> Enumerable[T::Module[top]]
95
+ #: -> Enumerable[Module[top]]
96
96
  def gather_constants
97
97
  name = ::Config.const_name
98
98
  return [] unless Object.const_defined?(name)
@@ -84,7 +84,7 @@ module Tapioca
84
84
 
85
85
  class << self
86
86
  # @override
87
- #: -> Enumerable[T::Module[top]]
87
+ #: -> Enumerable[Module[top]]
88
88
  def gather_constants
89
89
  descendants_of(::FrozenRecord::Base).reject(&:abstract_class?)
90
90
  end
@@ -73,7 +73,7 @@ module Tapioca
73
73
 
74
74
  class << self
75
75
  # @override
76
- #: -> Enumerable[T::Module[top]]
76
+ #: -> Enumerable[Module[top]]
77
77
  def gather_constants
78
78
  all_classes.select { |c| GraphQL::Schema::InputObject > c }
79
79
  end
@@ -70,7 +70,7 @@ module Tapioca
70
70
 
71
71
  class << self
72
72
  # @override
73
- #: -> Enumerable[T::Module[top]]
73
+ #: -> Enumerable[Module[top]]
74
74
  def gather_constants
75
75
  all_classes.select { |c| GraphQL::Schema::Mutation > c && GraphQL::Schema::RelayClassicMutation != c }
76
76
  end
@@ -57,7 +57,7 @@ module Tapioca
57
57
  # ~~~
58
58
  #: [ConstantType = singleton(::ActiveRecord::Base)]
59
59
  class IdentityCache < Compiler
60
- COLLECTION_TYPE = ->(type) { "T::Array[::#{type}]" } #: ^((T::Module[top] | String) type) -> String
60
+ COLLECTION_TYPE = ->(type) { "T::Array[::#{type}]" } #: ^((Module[top] | String) type) -> String
61
61
 
62
62
  # @override
63
63
  #: -> void
@@ -91,7 +91,7 @@ module Tapioca
91
91
 
92
92
  class << self
93
93
  # @override
94
- #: -> Enumerable[T::Module[top]]
94
+ #: -> Enumerable[Module[top]]
95
95
  def gather_constants
96
96
  descendants_of(::ActiveRecord::Base).select do |klass|
97
97
  ::IdentityCache::WithoutPrimaryIndex > klass
@@ -105,7 +105,7 @@ module Tapioca
105
105
 
106
106
  class << self
107
107
  # @override
108
- #: -> Enumerable[T::Module[top]]
108
+ #: -> Enumerable[Module[top]]
109
109
  def gather_constants
110
110
  all_modules.select do |c|
111
111
  name_of(c) && ::JsonApiClient::Resource > c
@@ -84,7 +84,7 @@ module Tapioca
84
84
 
85
85
  class << self
86
86
  # @override
87
- #: -> Enumerable[T::Module[top]]
87
+ #: -> Enumerable[Module[top]]
88
88
  def gather_constants
89
89
  all_classes
90
90
  .grep(::Kredis::Attributes::ClassMethods)
@@ -44,7 +44,7 @@ module Tapioca
44
44
  # end
45
45
  # end
46
46
  # ~~~
47
- #: [ConstantType = T::Module[top]]
47
+ #: [ConstantType = Module[top]]
48
48
  class MixedInClassAttributes < Compiler
49
49
  # @override
50
50
  #: -> void
@@ -59,7 +59,7 @@ module Tapioca
59
59
 
60
60
  class << self
61
61
  # @override
62
- #: -> Enumerable[T::Module[top]]
62
+ #: -> Enumerable[Module[top]]
63
63
  def gather_constants
64
64
  # Select all non-anonymous modules that have overridden Module.included
65
65
  all_modules.select do |mod|
@@ -152,7 +152,7 @@ module Tapioca
152
152
 
153
153
  class << self
154
154
  # @override
155
- #: -> Enumerable[T::Module[top]]
155
+ #: -> Enumerable[Module[top]]
156
156
  def gather_constants
157
157
  marker = Google::Protobuf::MessageExts::ClassMethods
158
158
 
@@ -56,7 +56,7 @@ module Tapioca
56
56
 
57
57
  class << self
58
58
  # @override
59
- #: -> Enumerable[T::Module[top]]
59
+ #: -> Enumerable[Module[top]]
60
60
  def gather_constants
61
61
  all_classes.select do |const|
62
62
  name = qualified_name_of(const)
@@ -83,7 +83,7 @@ module Tapioca
83
83
 
84
84
  class << self
85
85
  # @override
86
- #: -> Enumerable[T::Module[top]]
86
+ #: -> Enumerable[Module[top]]
87
87
  def gather_constants
88
88
  all_classes.select { |c| Sidekiq::Worker > c }
89
89
  end
@@ -80,7 +80,7 @@ module Tapioca
80
80
 
81
81
  class << self
82
82
  # @override
83
- #: -> Enumerable[T::Module[top]]
83
+ #: -> Enumerable[Module[top]]
84
84
  def gather_constants
85
85
  all_modules.select do |c|
86
86
  name_of(c) &&
@@ -109,7 +109,7 @@ module Tapioca
109
109
  # end
110
110
  # end
111
111
  # ~~~
112
- #: [ConstantType = (T::Module[top] & ::StateMachines::ClassMethods)]
112
+ #: [ConstantType = (Module[top] & ::StateMachines::ClassMethods)]
113
113
  class StateMachines < Compiler
114
114
  # @override
115
115
  #: -> void
@@ -154,7 +154,7 @@ module Tapioca
154
154
 
155
155
  class << self
156
156
  # @override
157
- #: -> Enumerable[T::Module[top]]
157
+ #: -> Enumerable[Module[top]]
158
158
  def gather_constants
159
159
  all_classes.select { |mod| ::StateMachines::InstanceMethods > mod }
160
160
  end