diff --git a/lib/tapioca.rb b/lib/tapioca.rb index 0b2ddf26b..8e47d3b03 100644 --- a/lib/tapioca.rb +++ b/lib/tapioca.rb @@ -5,8 +5,6 @@ require "rubygems/user_interaction" module Tapioca - extend T::Sig - @traces = [] #: Array[TracePoint] class Error < StandardError; end diff --git a/lib/tapioca/bundler_ext/auto_require_hook.rb b/lib/tapioca/bundler_ext/auto_require_hook.rb index a90b0861b..d630430c8 100644 --- a/lib/tapioca/bundler_ext/auto_require_hook.rb +++ b/lib/tapioca/bundler_ext/auto_require_hook.rb @@ -8,13 +8,10 @@ module BundlerExt # `Bundler.require`. # @requires_ancestor: ::Bundler::Dependency module AutoRequireHook - extend T::Sig @exclude = [] #: Array[String] @enabled = false #: bool class << self - extend T::Sig - #: (untyped name) -> bool def excluded?(name) @exclude.include?(name) diff --git a/lib/tapioca/cli.rb b/lib/tapioca/cli.rb index f37c6ce6c..e679aca73 100644 --- a/lib/tapioca/cli.rb +++ b/lib/tapioca/cli.rb @@ -378,8 +378,6 @@ def __print_version @addon_mode = false class << self - extend T::Sig - # Indicates that we are running from the LSP, set using the `addon_mode!` method attr_reader :addon_mode diff --git a/lib/tapioca/commands/annotations.rb b/lib/tapioca/commands/annotations.rb index 7c53f6075..d807def32 100644 --- a/lib/tapioca/commands/annotations.rb +++ b/lib/tapioca/commands/annotations.rb @@ -4,8 +4,6 @@ module Tapioca module Commands class Annotations < CommandWithoutTracker - extend T::Sig - #: ( #| central_repo_root_uris: Array[String], #| ?auth: String?, diff --git a/lib/tapioca/commands/check_shims.rb b/lib/tapioca/commands/check_shims.rb index b6db84e05..065f69e20 100644 --- a/lib/tapioca/commands/check_shims.rb +++ b/lib/tapioca/commands/check_shims.rb @@ -4,7 +4,6 @@ module Tapioca module Commands class CheckShims < CommandWithoutTracker - extend T::Sig include SorbetHelper include RBIFilesHelper diff --git a/lib/tapioca/commands/command.rb b/lib/tapioca/commands/command.rb index e99d08989..48a4f8348 100644 --- a/lib/tapioca/commands/command.rb +++ b/lib/tapioca/commands/command.rb @@ -5,7 +5,6 @@ module Tapioca module Commands # @abstract class Command - extend T::Sig class FileWriter < Thor include Thor::Actions end diff --git a/lib/tapioca/dsl/compiler.rb b/lib/tapioca/dsl/compiler.rb index 054661975..33447f58f 100644 --- a/lib/tapioca/dsl/compiler.rb +++ b/lib/tapioca/dsl/compiler.rb @@ -6,8 +6,6 @@ module Dsl # @abstract #: [ConstantType < T::Module[top]] class Compiler - extend T::Sig - include RBIHelper include Runtime::Reflection extend Runtime::Reflection @@ -24,8 +22,6 @@ class Compiler @@requested_constants = [] #: Array[T::Module[top]] # rubocop:disable Style/ClassVars class << self - extend T::Sig - #: (T::Module[top] constant) -> bool def handles?(constant) processable_constants.include?(constant) diff --git a/lib/tapioca/dsl/compilers/aasm.rb b/lib/tapioca/dsl/compilers/aasm.rb index 8793fa1ba..829d58abf 100644 --- a/lib/tapioca/dsl/compilers/aasm.rb +++ b/lib/tapioca/dsl/compilers/aasm.rb @@ -34,8 +34,6 @@ module Compilers # #: [ConstantType = (Class[::AASM] & ::AASM::ClassMethods)] class AASM < Compiler - extend T::Sig - # Taken directly from the AASM::Core::Event class, here: # https://github.com/aasm/aasm/blob/0e03746/lib/aasm/core/event.rb#L21-L29 EVENT_CALLBACKS = [ @@ -200,8 +198,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/action_controller_helpers.rb b/lib/tapioca/dsl/compilers/action_controller_helpers.rb index bb9ce6ed2..74f27876a 100644 --- a/lib/tapioca/dsl/compilers/action_controller_helpers.rb +++ b/lib/tapioca/dsl/compilers/action_controller_helpers.rb @@ -63,8 +63,6 @@ module Compilers # ~~~ #: [ConstantType = singleton(::ActionController::Base)] class ActionControllerHelpers < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -118,8 +116,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/action_mailer.rb b/lib/tapioca/dsl/compilers/action_mailer.rb index b387607ce..325d574e1 100644 --- a/lib/tapioca/dsl/compilers/action_mailer.rb +++ b/lib/tapioca/dsl/compilers/action_mailer.rb @@ -31,8 +31,6 @@ module Compilers # ~~~ #: [ConstantType = singleton(::ActionMailer::Base)] class ActionMailer < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -51,8 +49,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/action_text.rb b/lib/tapioca/dsl/compilers/action_text.rb index 71bc868fa..ba7ae9def 100644 --- a/lib/tapioca/dsl/compilers/action_text.rb +++ b/lib/tapioca/dsl/compilers/action_text.rb @@ -45,8 +45,6 @@ module Compilers # ~~~ #: [ConstantType = singleton(::ActiveRecord::Base)] class ActionText < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -73,8 +71,6 @@ def decorate end class << self - extend T::Sig - #: (singleton(::ActiveRecord::Base) constant) -> Array[String] def action_text_associations(constant) # Implementation copied from https://github.com/rails/rails/blob/31052d0e518b9da103eea2f79d250242ed1e3705/actiontext/lib/action_text/attribute.rb#L66 diff --git a/lib/tapioca/dsl/compilers/active_job.rb b/lib/tapioca/dsl/compilers/active_job.rb index 66c5a6a00..4cd030479 100644 --- a/lib/tapioca/dsl/compilers/active_job.rb +++ b/lib/tapioca/dsl/compilers/active_job.rb @@ -40,8 +40,6 @@ module Compilers # ~~~ #: [ConstantType = singleton(::ActiveJob::Base)] class ActiveJob < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -85,8 +83,6 @@ def perform_later_parameters(parameters, constant_name) end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/active_model_attributes.rb b/lib/tapioca/dsl/compilers/active_model_attributes.rb index 5d2188680..116e63fd9 100644 --- a/lib/tapioca/dsl/compilers/active_model_attributes.rb +++ b/lib/tapioca/dsl/compilers/active_model_attributes.rb @@ -40,8 +40,6 @@ module Compilers # ~~~ #: [ConstantType = (Class[::ActiveModel::Attributes] & ::ActiveModel::Attributes::ClassMethods)] class ActiveModelAttributes < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -60,8 +58,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/active_model_secure_password.rb b/lib/tapioca/dsl/compilers/active_model_secure_password.rb index c351568c9..244ee8599 100644 --- a/lib/tapioca/dsl/compilers/active_model_secure_password.rb +++ b/lib/tapioca/dsl/compilers/active_model_secure_password.rb @@ -55,8 +55,6 @@ module Compilers # ~~~ #: [ConstantType = (Class[::ActiveModel::SecurePassword] & ::ActiveModel::SecurePassword::ClassMethods)] class ActiveModelSecurePassword < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -90,8 +88,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/active_model_validations_confirmation.rb b/lib/tapioca/dsl/compilers/active_model_validations_confirmation.rb index eaf9ea784..48578617e 100644 --- a/lib/tapioca/dsl/compilers/active_model_validations_confirmation.rb +++ b/lib/tapioca/dsl/compilers/active_model_validations_confirmation.rb @@ -42,8 +42,6 @@ module Compilers # ~~~ #: [ConstantType = (Class[ActiveModel::Validations] & ActiveModel::Validations::HelperMethods & ActiveModel::Validations::ClassMethods)] class ActiveModelValidationsConfirmation < Compiler - extend T::Sig - class << self # @override #: -> Enumerable[T::Module[top]] diff --git a/lib/tapioca/dsl/compilers/active_record_associations.rb b/lib/tapioca/dsl/compilers/active_record_associations.rb index f73e23ef9..e50a3bc85 100644 --- a/lib/tapioca/dsl/compilers/active_record_associations.rb +++ b/lib/tapioca/dsl/compilers/active_record_associations.rb @@ -103,15 +103,12 @@ module Compilers # ~~~ #: [ConstantType = singleton(ActiveRecord::Base)] class ActiveRecordAssociations < Compiler - extend T::Sig include Helpers::ActiveRecordConstantsHelper class SourceReflectionError < StandardError end class MissingConstantError < StandardError - extend T::Sig - #: String attr_reader :class_name @@ -138,8 +135,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/active_record_columns.rb b/lib/tapioca/dsl/compilers/active_record_columns.rb index bf972b87f..4ca072f73 100644 --- a/lib/tapioca/dsl/compilers/active_record_columns.rb +++ b/lib/tapioca/dsl/compilers/active_record_columns.rb @@ -122,7 +122,6 @@ module Compilers # ~~~ #: [ConstantType = singleton(ActiveRecord::Base)] class ActiveRecordColumns < Compiler - extend T::Sig include Helpers::ActiveRecordConstantsHelper # @override @@ -163,8 +162,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/active_record_delegated_types.rb b/lib/tapioca/dsl/compilers/active_record_delegated_types.rb index 9c29d25e3..30de629e8 100644 --- a/lib/tapioca/dsl/compilers/active_record_delegated_types.rb +++ b/lib/tapioca/dsl/compilers/active_record_delegated_types.rb @@ -65,7 +65,6 @@ module Compilers # ~~~ #: [ConstantType = (singleton(ActiveRecord::Base) & Extensions::ActiveRecord)] class ActiveRecordDelegatedTypes < Compiler - extend T::Sig include Helpers::ActiveRecordConstantsHelper # @override @@ -88,8 +87,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/active_record_enum.rb b/lib/tapioca/dsl/compilers/active_record_enum.rb index 04fcd6549..60bf2813b 100644 --- a/lib/tapioca/dsl/compilers/active_record_enum.rb +++ b/lib/tapioca/dsl/compilers/active_record_enum.rb @@ -51,8 +51,6 @@ module Compilers # ~~~ #: [ConstantType = singleton(::ActiveRecord::Base)] class ActiveRecordEnum < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -75,8 +73,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/active_record_fixtures.rb b/lib/tapioca/dsl/compilers/active_record_fixtures.rb index c0c2d1698..fbb8e01e8 100644 --- a/lib/tapioca/dsl/compilers/active_record_fixtures.rb +++ b/lib/tapioca/dsl/compilers/active_record_fixtures.rb @@ -35,8 +35,6 @@ module Compilers # ~~~ #: [ConstantType = singleton(ActiveSupport::TestCase)] class ActiveRecordFixtures < Compiler - extend T::Sig - MISSING = Object.new # @override @@ -59,8 +57,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/active_record_relations.rb b/lib/tapioca/dsl/compilers/active_record_relations.rb index 456423764..f61ce852f 100644 --- a/lib/tapioca/dsl/compilers/active_record_relations.rb +++ b/lib/tapioca/dsl/compilers/active_record_relations.rb @@ -151,7 +151,6 @@ module Compilers # ~~~ #: [ConstantType = singleton(::ActiveRecord::Base)] class ActiveRecordRelations < Compiler - extend T::Sig include Helpers::ActiveRecordConstantsHelper include SorbetHelper @@ -181,8 +180,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/active_record_scope.rb b/lib/tapioca/dsl/compilers/active_record_scope.rb index 5304821b5..e5d01b375 100644 --- a/lib/tapioca/dsl/compilers/active_record_scope.rb +++ b/lib/tapioca/dsl/compilers/active_record_scope.rb @@ -40,7 +40,6 @@ module Compilers # ~~~ #: [ConstantType = singleton(::ActiveRecord::Base)] class ActiveRecordScope < Compiler - extend T::Sig include Helpers::ActiveRecordConstantsHelper # @override diff --git a/lib/tapioca/dsl/compilers/active_record_secure_token.rb b/lib/tapioca/dsl/compilers/active_record_secure_token.rb index f4b440db4..ea494d133 100644 --- a/lib/tapioca/dsl/compilers/active_record_secure_token.rb +++ b/lib/tapioca/dsl/compilers/active_record_secure_token.rb @@ -34,7 +34,6 @@ module Compilers # ~~~ #: [ConstantType = (singleton(ActiveRecord::Base) & Extensions::ActiveRecord)] class ActiveRecordSecureToken < Compiler - extend T::Sig include Helpers::ActiveRecordConstantsHelper # @override @@ -57,8 +56,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/active_record_store.rb b/lib/tapioca/dsl/compilers/active_record_store.rb index 4b57dcff5..6faeec6f9 100644 --- a/lib/tapioca/dsl/compilers/active_record_store.rb +++ b/lib/tapioca/dsl/compilers/active_record_store.rb @@ -80,7 +80,6 @@ module Compilers # ~~~ #: [ConstantType = (singleton(ActiveRecord::Base) & Extensions::ActiveRecord)] class ActiveRecordStore < Compiler - extend T::Sig include Helpers::ActiveRecordConstantsHelper # @override @@ -132,8 +131,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/active_record_typed_store.rb b/lib/tapioca/dsl/compilers/active_record_typed_store.rb index 1b76845a8..b374f8bbc 100644 --- a/lib/tapioca/dsl/compilers/active_record_typed_store.rb +++ b/lib/tapioca/dsl/compilers/active_record_typed_store.rb @@ -83,8 +83,6 @@ module Compilers # ~~~ #: [ConstantType = singleton(::ActiveRecord::Base)] class ActiveRecordTypedStore < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -108,8 +106,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/active_resource.rb b/lib/tapioca/dsl/compilers/active_resource.rb index 7fe5de628..7373efdf1 100644 --- a/lib/tapioca/dsl/compilers/active_resource.rb +++ b/lib/tapioca/dsl/compilers/active_resource.rb @@ -56,8 +56,6 @@ module Compilers # ~~~ #: [ConstantType = singleton(::ActiveResource::Base)] class ActiveResource < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -71,8 +69,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/active_storage.rb b/lib/tapioca/dsl/compilers/active_storage.rb index 0b53b4d39..53a68c674 100644 --- a/lib/tapioca/dsl/compilers/active_storage.rb +++ b/lib/tapioca/dsl/compilers/active_storage.rb @@ -40,8 +40,6 @@ module Compilers # ~~~ #: [ConstantType = (T::Module[top] & ::ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods)] class ActiveStorage < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -65,8 +63,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/active_support_concern.rb b/lib/tapioca/dsl/compilers/active_support_concern.rb index e8ed8912f..8a9e4777d 100644 --- a/lib/tapioca/dsl/compilers/active_support_concern.rb +++ b/lib/tapioca/dsl/compilers/active_support_concern.rb @@ -39,8 +39,6 @@ module Compilers # ~~~ #: [ConstantType = T::Module[top]] class ActiveSupportConcern < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -62,8 +60,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/active_support_current_attributes.rb b/lib/tapioca/dsl/compilers/active_support_current_attributes.rb index 219aba876..872cb933e 100644 --- a/lib/tapioca/dsl/compilers/active_support_current_attributes.rb +++ b/lib/tapioca/dsl/compilers/active_support_current_attributes.rb @@ -61,8 +61,6 @@ module Compilers # ~~~ #: [ConstantType = singleton(::ActiveSupport::CurrentAttributes)] class ActiveSupportCurrentAttributes < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -94,8 +92,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/active_support_environment_inquirer.rb b/lib/tapioca/dsl/compilers/active_support_environment_inquirer.rb index d184e7006..af9dd216b 100644 --- a/lib/tapioca/dsl/compilers/active_support_environment_inquirer.rb +++ b/lib/tapioca/dsl/compilers/active_support_environment_inquirer.rb @@ -31,8 +31,6 @@ module Compilers # ~~~ #: [ConstantType = singleton(::ActiveSupport::EnvironmentInquirer)] class ActiveSupportEnvironmentInquirer < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -48,8 +46,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> T::Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/active_support_time_ext.rb b/lib/tapioca/dsl/compilers/active_support_time_ext.rb index 36ee87033..7f8ed63b0 100644 --- a/lib/tapioca/dsl/compilers/active_support_time_ext.rb +++ b/lib/tapioca/dsl/compilers/active_support_time_ext.rb @@ -36,8 +36,6 @@ module Compilers # ``` #: [ConstantType = singleton(::Time)] class ActiveSupportTimeExt < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -55,8 +53,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/config.rb b/lib/tapioca/dsl/compilers/config.rb index 090a60c28..3bd78bc1d 100644 --- a/lib/tapioca/dsl/compilers/config.rb +++ b/lib/tapioca/dsl/compilers/config.rb @@ -42,8 +42,6 @@ module Compilers # ``` #: [ConstantType = T::Module[top]] class Config < Compiler - extend T::Sig - CONFIG_OPTIONS_SUFFIX = "ConfigOptions" # @override @@ -93,8 +91,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/frozen_record.rb b/lib/tapioca/dsl/compilers/frozen_record.rb index 318cf6a0c..a055a2066 100644 --- a/lib/tapioca/dsl/compilers/frozen_record.rb +++ b/lib/tapioca/dsl/compilers/frozen_record.rb @@ -60,8 +60,6 @@ module Compilers # ~~~ #: [ConstantType = (singleton(::FrozenRecord::Base) & Extensions::FrozenRecord)] class FrozenRecord < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -85,8 +83,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/graphql_input_object.rb b/lib/tapioca/dsl/compilers/graphql_input_object.rb index be3bed13b..cf0c053f5 100644 --- a/lib/tapioca/dsl/compilers/graphql_input_object.rb +++ b/lib/tapioca/dsl/compilers/graphql_input_object.rb @@ -36,8 +36,6 @@ module Compilers # ~~~ #: [ConstantType = singleton(GraphQL::Schema::InputObject)] class GraphqlInputObject < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -74,8 +72,6 @@ def method_defined_by_graphql?(method_name) end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/graphql_mutation.rb b/lib/tapioca/dsl/compilers/graphql_mutation.rb index 635ff39e8..a33a1eed9 100644 --- a/lib/tapioca/dsl/compilers/graphql_mutation.rb +++ b/lib/tapioca/dsl/compilers/graphql_mutation.rb @@ -37,8 +37,6 @@ module Compilers # ~~~ #: [ConstantType = singleton(GraphQL::Schema::Mutation)] class GraphqlMutation < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -71,8 +69,6 @@ def argument_type(argument, constant) end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/identity_cache.rb b/lib/tapioca/dsl/compilers/identity_cache.rb index b6c4754e3..029cf7e41 100644 --- a/lib/tapioca/dsl/compilers/identity_cache.rb +++ b/lib/tapioca/dsl/compilers/identity_cache.rb @@ -57,8 +57,6 @@ module Compilers # ~~~ #: [ConstantType = singleton(::ActiveRecord::Base)] class IdentityCache < Compiler - extend T::Sig - COLLECTION_TYPE = ->(type) { "T::Array[::#{type}]" } #: ^((T::Module[top] | String) type) -> String # @override @@ -92,8 +90,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/json_api_client_resource.rb b/lib/tapioca/dsl/compilers/json_api_client_resource.rb index 0d192132a..46036b41e 100644 --- a/lib/tapioca/dsl/compilers/json_api_client_resource.rb +++ b/lib/tapioca/dsl/compilers/json_api_client_resource.rb @@ -81,8 +81,6 @@ module Compilers # ~~~ #: [ConstantType = singleton(::JsonApiClient::Resource)] class JsonApiClientResource < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -106,8 +104,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/kredis.rb b/lib/tapioca/dsl/compilers/kredis.rb index 7366cdd0d..cbc930018 100644 --- a/lib/tapioca/dsl/compilers/kredis.rb +++ b/lib/tapioca/dsl/compilers/kredis.rb @@ -65,8 +65,6 @@ module Compilers # ~~~ #: [ConstantType = (Class[::Kredis::Attributes] & ::Kredis::Attributes::ClassMethods & Extensions::Kredis)] class Kredis < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -85,8 +83,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/mixed_in_class_attributes.rb b/lib/tapioca/dsl/compilers/mixed_in_class_attributes.rb index 61433d81f..c3e62ea25 100644 --- a/lib/tapioca/dsl/compilers/mixed_in_class_attributes.rb +++ b/lib/tapioca/dsl/compilers/mixed_in_class_attributes.rb @@ -46,8 +46,6 @@ module Compilers # ~~~ #: [ConstantType = T::Module[top]] class MixedInClassAttributes < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -60,8 +58,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/protobuf.rb b/lib/tapioca/dsl/compilers/protobuf.rb index 9bb096c37..16edfb5a8 100644 --- a/lib/tapioca/dsl/compilers/protobuf.rb +++ b/lib/tapioca/dsl/compilers/protobuf.rb @@ -73,8 +73,6 @@ class Field < T::Struct prop :default, String end - extend T::Sig - FIELD_RE = /^[a-z_][a-zA-Z0-9_]*$/ # @override @@ -153,8 +151,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/rails_generators.rb b/lib/tapioca/dsl/compilers/rails_generators.rb index 7edbab9d1..ef4310c47 100644 --- a/lib/tapioca/dsl/compilers/rails_generators.rb +++ b/lib/tapioca/dsl/compilers/rails_generators.rb @@ -35,8 +35,6 @@ module Compilers # ~~~ #: [ConstantType = singleton(::Rails::Generators::Base)] class RailsGenerators < Compiler - extend T::Sig - BUILT_IN_MATCHER = /::(ActionMailbox|ActionText|ActiveRecord|Rails)::Generators/ # @override @@ -57,8 +55,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/sidekiq_worker.rb b/lib/tapioca/dsl/compilers/sidekiq_worker.rb index 4ae1c0d43..762512f1d 100644 --- a/lib/tapioca/dsl/compilers/sidekiq_worker.rb +++ b/lib/tapioca/dsl/compilers/sidekiq_worker.rb @@ -43,8 +43,6 @@ module Compilers # * `self.perform_in` will also accept a `ActiveSupport::Duration` value #: [ConstantType = singleton(::Sidekiq::Worker)] class SidekiqWorker < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -84,8 +82,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/smart_properties.rb b/lib/tapioca/dsl/compilers/smart_properties.rb index 7bbd2a89f..263c8b359 100644 --- a/lib/tapioca/dsl/compilers/smart_properties.rb +++ b/lib/tapioca/dsl/compilers/smart_properties.rb @@ -60,8 +60,6 @@ module Compilers # ~~~ #: [ConstantType = singleton(::SmartProperties)] class SmartProperties < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -81,8 +79,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/state_machines.rb b/lib/tapioca/dsl/compilers/state_machines.rb index c39b3c263..e24aaf074 100644 --- a/lib/tapioca/dsl/compilers/state_machines.rb +++ b/lib/tapioca/dsl/compilers/state_machines.rb @@ -111,8 +111,6 @@ module Compilers # ~~~ #: [ConstantType = (T::Module[top] & ::StateMachines::ClassMethods)] class StateMachines < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -155,8 +153,6 @@ def decorate end class << self - extend T::Sig - # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/compilers/url_helpers.rb b/lib/tapioca/dsl/compilers/url_helpers.rb index 69f459523..c9216cb35 100644 --- a/lib/tapioca/dsl/compilers/url_helpers.rb +++ b/lib/tapioca/dsl/compilers/url_helpers.rb @@ -80,8 +80,6 @@ module Compilers # ~~~ #: [ConstantType = T::Module[top]] class UrlHelpers < Compiler - extend T::Sig - # @override #: -> void def decorate @@ -97,7 +95,6 @@ def decorate end class << self - extend T::Sig # @override #: -> Enumerable[T::Module[top]] def gather_constants diff --git a/lib/tapioca/dsl/helpers/active_model_type_helper.rb b/lib/tapioca/dsl/helpers/active_model_type_helper.rb index 092e05ca4..4fa9bdadf 100644 --- a/lib/tapioca/dsl/helpers/active_model_type_helper.rb +++ b/lib/tapioca/dsl/helpers/active_model_type_helper.rb @@ -6,8 +6,6 @@ module Dsl module Helpers module ActiveModelTypeHelper class << self - extend T::Sig - # Returns the type indicated by the custom ActiveModel::Type::Value. # Accepts subclasses of ActiveModel::Type::Value as well as classes that implement similar methods. #: (untyped type_value) -> String diff --git a/lib/tapioca/dsl/helpers/active_record_column_type_helper.rb b/lib/tapioca/dsl/helpers/active_record_column_type_helper.rb index 27be6d1c2..b32c57335 100644 --- a/lib/tapioca/dsl/helpers/active_record_column_type_helper.rb +++ b/lib/tapioca/dsl/helpers/active_record_column_type_helper.rb @@ -7,12 +7,9 @@ module Tapioca module Dsl module Helpers class ActiveRecordColumnTypeHelper - extend T::Sig include RBIHelper class ColumnTypeOption < T::Enum - extend T::Sig - enums do Untyped = new("untyped") Nilable = new("nilable") @@ -20,8 +17,6 @@ class ColumnTypeOption < T::Enum end class << self - extend T::Sig - #: ( #| Hash[String, untyped] options, #| ) { (String value, ColumnTypeOption default_column_type_option) -> void } -> ColumnTypeOption diff --git a/lib/tapioca/dsl/helpers/active_record_constants_helper.rb b/lib/tapioca/dsl/helpers/active_record_constants_helper.rb index 5bbee4f85..1325a16f2 100644 --- a/lib/tapioca/dsl/helpers/active_record_constants_helper.rb +++ b/lib/tapioca/dsl/helpers/active_record_constants_helper.rb @@ -5,8 +5,6 @@ module Tapioca module Dsl module Helpers module ActiveRecordConstantsHelper - extend T::Sig - ReflectionType = T.type_alias do T.any(::ActiveRecord::Reflection::ThroughReflection, ::ActiveRecord::Reflection::AssociationReflection) end diff --git a/lib/tapioca/dsl/helpers/graphql_type_helper.rb b/lib/tapioca/dsl/helpers/graphql_type_helper.rb index 1be190337..4a4e6ba9a 100644 --- a/lib/tapioca/dsl/helpers/graphql_type_helper.rb +++ b/lib/tapioca/dsl/helpers/graphql_type_helper.rb @@ -7,8 +7,6 @@ module Helpers module GraphqlTypeHelper extend self - extend T::Sig - #: ( #| GraphQL::Schema::Argument argument, #| (singleton(GraphQL::Schema::Mutation) | singleton(GraphQL::Schema::InputObject)) constant diff --git a/lib/tapioca/dsl/pipeline.rb b/lib/tapioca/dsl/pipeline.rb index 4a6e23c01..ffcd88ef9 100644 --- a/lib/tapioca/dsl/pipeline.rb +++ b/lib/tapioca/dsl/pipeline.rb @@ -4,8 +4,6 @@ module Tapioca module Dsl class Pipeline - extend T::Sig - #: Enumerable[singleton(Compiler)] attr_reader :active_compilers diff --git a/lib/tapioca/executor.rb b/lib/tapioca/executor.rb index 75f40530e..13243ad38 100644 --- a/lib/tapioca/executor.rb +++ b/lib/tapioca/executor.rb @@ -3,8 +3,6 @@ module Tapioca class Executor - extend T::Sig - MINIMUM_ITEMS_PER_WORKER = 2 #: Integer #: (Array[untyped] queue, ?number_of_workers: Integer?) -> void diff --git a/lib/tapioca/gem/events.rb b/lib/tapioca/gem/events.rb index e27de053a..696270657 100644 --- a/lib/tapioca/gem/events.rb +++ b/lib/tapioca/gem/events.rb @@ -5,12 +5,9 @@ module Tapioca module Gem # @abstract class Event - extend T::Sig end class SymbolFound < Event - extend T::Sig - #: String attr_reader :symbol @@ -22,8 +19,6 @@ def initialize(symbol) end class ConstantFound < Event - extend T::Sig - #: String attr_reader :symbol @@ -41,8 +36,6 @@ def initialize(symbol, constant) end class ForeignConstantFound < ConstantFound - extend T::Sig - # @override #: -> T::Module[top] def constant @@ -57,8 +50,6 @@ def initialize(symbol, constant) # @abstract class NodeAdded < Event - extend T::Sig - #: String attr_reader :symbol @@ -74,8 +65,6 @@ def initialize(symbol, constant) end class ConstNodeAdded < NodeAdded - extend T::Sig - #: RBI::Const attr_reader :node @@ -87,8 +76,6 @@ def initialize(symbol, constant, node) end class ScopeNodeAdded < NodeAdded - extend T::Sig - #: RBI::Scope attr_reader :node @@ -102,8 +89,6 @@ def initialize(symbol, constant, node) class ForeignScopeNodeAdded < ScopeNodeAdded; end class MethodNodeAdded < NodeAdded - extend T::Sig - #: UnboundMethod attr_reader :method diff --git a/lib/tapioca/gem/listeners/base.rb b/lib/tapioca/gem/listeners/base.rb index 9fa317b4b..cf5c99904 100644 --- a/lib/tapioca/gem/listeners/base.rb +++ b/lib/tapioca/gem/listeners/base.rb @@ -6,7 +6,6 @@ module Gem module Listeners # @abstract class Base - extend T::Sig #: (Pipeline pipeline) -> void def initialize(pipeline) @pipeline = pipeline diff --git a/lib/tapioca/gem/listeners/dynamic_mixins.rb b/lib/tapioca/gem/listeners/dynamic_mixins.rb index df4176b4d..f7aff1e1e 100644 --- a/lib/tapioca/gem/listeners/dynamic_mixins.rb +++ b/lib/tapioca/gem/listeners/dynamic_mixins.rb @@ -5,8 +5,6 @@ module Tapioca module Gem module Listeners class DynamicMixins < Base - extend T::Sig - include Runtime::Reflection private diff --git a/lib/tapioca/gem/listeners/foreign_constants.rb b/lib/tapioca/gem/listeners/foreign_constants.rb index 359d2292d..e7ab3bdd9 100644 --- a/lib/tapioca/gem/listeners/foreign_constants.rb +++ b/lib/tapioca/gem/listeners/foreign_constants.rb @@ -5,8 +5,6 @@ module Tapioca module Gem module Listeners class ForeignConstants < Base - extend T::Sig - include Runtime::Reflection private diff --git a/lib/tapioca/gem/listeners/methods.rb b/lib/tapioca/gem/listeners/methods.rb index 82da8a2cb..bd3316463 100644 --- a/lib/tapioca/gem/listeners/methods.rb +++ b/lib/tapioca/gem/listeners/methods.rb @@ -5,8 +5,6 @@ module Tapioca module Gem module Listeners class Methods < Base - extend T::Sig - include RBIHelper include Runtime::Reflection diff --git a/lib/tapioca/gem/listeners/mixins.rb b/lib/tapioca/gem/listeners/mixins.rb index d853e0945..73c5e4507 100644 --- a/lib/tapioca/gem/listeners/mixins.rb +++ b/lib/tapioca/gem/listeners/mixins.rb @@ -5,8 +5,6 @@ module Tapioca module Gem module Listeners class Mixins < Base - extend T::Sig - include Runtime::Reflection private diff --git a/lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb b/lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb index 845d74b64..501c087c7 100644 --- a/lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb +++ b/lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb @@ -5,8 +5,6 @@ module Tapioca module Gem module Listeners class RemoveEmptyPayloadScopes < Base - extend T::Sig - include Runtime::Reflection private diff --git a/lib/tapioca/gem/listeners/sorbet_enums.rb b/lib/tapioca/gem/listeners/sorbet_enums.rb index a448dd299..bd3b60218 100644 --- a/lib/tapioca/gem/listeners/sorbet_enums.rb +++ b/lib/tapioca/gem/listeners/sorbet_enums.rb @@ -5,8 +5,6 @@ module Tapioca module Gem module Listeners class SorbetEnums < Base - extend T::Sig - private # @override diff --git a/lib/tapioca/gem/listeners/sorbet_helpers.rb b/lib/tapioca/gem/listeners/sorbet_helpers.rb index 587b7da00..7b0a289c2 100644 --- a/lib/tapioca/gem/listeners/sorbet_helpers.rb +++ b/lib/tapioca/gem/listeners/sorbet_helpers.rb @@ -5,8 +5,6 @@ module Tapioca module Gem module Listeners class SorbetHelpers < Base - extend T::Sig - include Runtime::Reflection private diff --git a/lib/tapioca/gem/listeners/sorbet_props.rb b/lib/tapioca/gem/listeners/sorbet_props.rb index 8e3ff70f5..e9858149f 100644 --- a/lib/tapioca/gem/listeners/sorbet_props.rb +++ b/lib/tapioca/gem/listeners/sorbet_props.rb @@ -5,7 +5,6 @@ module Tapioca module Gem module Listeners class SorbetProps < Base - extend T::Sig include RBIHelper private diff --git a/lib/tapioca/gem/listeners/sorbet_required_ancestors.rb b/lib/tapioca/gem/listeners/sorbet_required_ancestors.rb index e554f2a30..7033a7ddb 100644 --- a/lib/tapioca/gem/listeners/sorbet_required_ancestors.rb +++ b/lib/tapioca/gem/listeners/sorbet_required_ancestors.rb @@ -5,8 +5,6 @@ module Tapioca module Gem module Listeners class SorbetRequiredAncestors < Base - extend T::Sig - private # @override diff --git a/lib/tapioca/gem/listeners/sorbet_signatures.rb b/lib/tapioca/gem/listeners/sorbet_signatures.rb index 81f115b35..4b3b1d4d0 100644 --- a/lib/tapioca/gem/listeners/sorbet_signatures.rb +++ b/lib/tapioca/gem/listeners/sorbet_signatures.rb @@ -5,8 +5,6 @@ module Tapioca module Gem module Listeners class SorbetSignatures < Base - extend T::Sig - include Runtime::Reflection include RBIHelper diff --git a/lib/tapioca/gem/listeners/sorbet_type_variables.rb b/lib/tapioca/gem/listeners/sorbet_type_variables.rb index ff6fb8e07..3475c4d9b 100644 --- a/lib/tapioca/gem/listeners/sorbet_type_variables.rb +++ b/lib/tapioca/gem/listeners/sorbet_type_variables.rb @@ -5,8 +5,6 @@ module Tapioca module Gem module Listeners class SorbetTypeVariables < Base - extend T::Sig - include Runtime::Reflection private diff --git a/lib/tapioca/gem/listeners/source_location.rb b/lib/tapioca/gem/listeners/source_location.rb index 423ffceac..5654a7631 100644 --- a/lib/tapioca/gem/listeners/source_location.rb +++ b/lib/tapioca/gem/listeners/source_location.rb @@ -5,8 +5,6 @@ module Tapioca module Gem module Listeners class SourceLocation < Base - extend T::Sig - private # @override diff --git a/lib/tapioca/gem/listeners/subconstants.rb b/lib/tapioca/gem/listeners/subconstants.rb index 0499cc595..0d8636cb7 100644 --- a/lib/tapioca/gem/listeners/subconstants.rb +++ b/lib/tapioca/gem/listeners/subconstants.rb @@ -5,8 +5,6 @@ module Tapioca module Gem module Listeners class Subconstants < Base - extend T::Sig - include Runtime::Reflection private diff --git a/lib/tapioca/gem/listeners/yard_doc.rb b/lib/tapioca/gem/listeners/yard_doc.rb index e2290ab65..d4f9b4065 100644 --- a/lib/tapioca/gem/listeners/yard_doc.rb +++ b/lib/tapioca/gem/listeners/yard_doc.rb @@ -5,8 +5,6 @@ module Tapioca module Gem module Listeners class YardDoc < Base - extend T::Sig - IGNORED_COMMENTS = [ ":doc:", ":nodoc:", diff --git a/lib/tapioca/gem/pipeline.rb b/lib/tapioca/gem/pipeline.rb index 647e8809c..a415df757 100644 --- a/lib/tapioca/gem/pipeline.rb +++ b/lib/tapioca/gem/pipeline.rb @@ -4,7 +4,6 @@ module Tapioca module Gem class Pipeline - extend T::Sig include Runtime::Reflection include RBIHelper @@ -140,8 +139,6 @@ class MethodInGemWithoutLocation < MethodDefinitionLookupResult; end # The method defined in gem and has a source location class MethodInGemWithLocation < MethodDefinitionLookupResult - extend T::Sig - #: Runtime::SourceLocation attr_reader :location diff --git a/lib/tapioca/gemfile.rb b/lib/tapioca/gemfile.rb index 182920958..b9b2be5cb 100644 --- a/lib/tapioca/gemfile.rb +++ b/lib/tapioca/gemfile.rb @@ -107,8 +107,6 @@ class GemSpec include GemHelper class << self - extend T::Sig - #: -> Hash[String, Gemfile::GemSpec] def spec_lookup_by_file_path @lookup ||= [*::Gem::Specification.default_stubs, *::Gem::Specification.stubs] diff --git a/lib/tapioca/helpers/cli_helper.rb b/lib/tapioca/helpers/cli_helper.rb index 62e19b27a..67f4fb19e 100644 --- a/lib/tapioca/helpers/cli_helper.rb +++ b/lib/tapioca/helpers/cli_helper.rb @@ -4,7 +4,6 @@ module Tapioca # @requires_ancestor: Thor::Shell module CliHelper - extend T::Sig #: (?String message, *(Symbol | Array[Symbol]) color) -> void def say_error(message = "", *color) # Thor has its own `say_error` now, but it has two problems: diff --git a/lib/tapioca/helpers/config_helper.rb b/lib/tapioca/helpers/config_helper.rb index 958678c8c..e96c4c59c 100644 --- a/lib/tapioca/helpers/config_helper.rb +++ b/lib/tapioca/helpers/config_helper.rb @@ -4,7 +4,6 @@ module Tapioca # @requires_ancestor: Thor module ConfigHelper - extend T::Sig #: String attr_reader :command_name diff --git a/lib/tapioca/helpers/env_helper.rb b/lib/tapioca/helpers/env_helper.rb index 743ca535b..9bb45023a 100644 --- a/lib/tapioca/helpers/env_helper.rb +++ b/lib/tapioca/helpers/env_helper.rb @@ -4,7 +4,6 @@ module Tapioca # @requires_ancestor: Thor module EnvHelper - extend T::Sig #: (Hash[Symbol, untyped] options) -> void def set_environment(options) # rubocop:disable Naming/AccessorMethodName ENV["RAILS_ENV"] = ENV["RACK_ENV"] = options[:environment] diff --git a/lib/tapioca/helpers/gem_helper.rb b/lib/tapioca/helpers/gem_helper.rb index 64b9525b0..cb995503c 100644 --- a/lib/tapioca/helpers/gem_helper.rb +++ b/lib/tapioca/helpers/gem_helper.rb @@ -3,8 +3,6 @@ module Tapioca module GemHelper - extend T::Sig - #: ((String | Pathname) app_dir, String full_gem_path) -> bool def gem_in_app_dir?(app_dir, full_gem_path) app_dir = to_realpath(app_dir) diff --git a/lib/tapioca/helpers/git_attributes.rb b/lib/tapioca/helpers/git_attributes.rb index 6db040984..e1594e845 100644 --- a/lib/tapioca/helpers/git_attributes.rb +++ b/lib/tapioca/helpers/git_attributes.rb @@ -3,8 +3,6 @@ class GitAttributes class << self - extend T::Sig - #: (Pathname path) -> void def create_generated_attribute_file(path) create_gitattributes_file(path, <<~CONTENT) diff --git a/lib/tapioca/helpers/rbi_files_helper.rb b/lib/tapioca/helpers/rbi_files_helper.rb index ac2bdcd05..b84e81832 100644 --- a/lib/tapioca/helpers/rbi_files_helper.rb +++ b/lib/tapioca/helpers/rbi_files_helper.rb @@ -5,7 +5,6 @@ module Tapioca # @requires_ancestor: Thor::Shell # @requires_ancestor: SorbetHelper module RBIFilesHelper - extend T::Sig #: (RBI::Index index, String kind, String file) -> void def index_rbi(index, kind, file) return unless File.exist?(file) diff --git a/lib/tapioca/helpers/rbi_helper.rb b/lib/tapioca/helpers/rbi_helper.rb index f695a508c..273e422bd 100644 --- a/lib/tapioca/helpers/rbi_helper.rb +++ b/lib/tapioca/helpers/rbi_helper.rb @@ -3,14 +3,11 @@ module Tapioca module RBIHelper - extend T::Sig include SorbetHelper extend SorbetHelper extend self class << self - extend T::Sig - #: (String type, Symbol variance, String? fixed, String? upper, String? lower) -> String def serialize_type_variable(type, variance, fixed, upper, lower) variance = nil if variance == :invariant diff --git a/lib/tapioca/helpers/sorbet_helper.rb b/lib/tapioca/helpers/sorbet_helper.rb index 3925b3f31..d9156e1b7 100644 --- a/lib/tapioca/helpers/sorbet_helper.rb +++ b/lib/tapioca/helpers/sorbet_helper.rb @@ -3,8 +3,6 @@ module Tapioca module SorbetHelper - extend T::Sig - SORBET_GEM_SPEC = ::Gem::Specification.find_by_name("sorbet-static") #: ::Gem::Specification SORBET_BIN = Pathname.new(SORBET_GEM_SPEC.full_gem_path) / "libexec" / "sorbet" #: Pathname diff --git a/lib/tapioca/helpers/source_uri.rb b/lib/tapioca/helpers/source_uri.rb index 19723ff96..5965ade30 100644 --- a/lib/tapioca/helpers/source_uri.rb +++ b/lib/tapioca/helpers/source_uri.rb @@ -5,8 +5,6 @@ module Tapioca class SourceURI < URI::File - extend T::Sig - COMPONENT = [ :scheme, :gem_name, @@ -26,8 +24,6 @@ class SourceURI < URI::File attr_reader :gem_version class << self - extend T::Sig - #: (gem_name: String, gem_version: String?, path: String, line_number: String?) -> instance def build(gem_name:, gem_version:, path:, line_number:) super( diff --git a/lib/tapioca/helpers/test/content.rb b/lib/tapioca/helpers/test/content.rb index 495775b6f..3c712371a 100644 --- a/lib/tapioca/helpers/test/content.rb +++ b/lib/tapioca/helpers/test/content.rb @@ -6,7 +6,6 @@ module Helpers module Test # @requires_ancestor: Kernel module Content - extend T::Sig #: -> void def teardown super diff --git a/lib/tapioca/helpers/test/dsl_compiler.rb b/lib/tapioca/helpers/test/dsl_compiler.rb index edf7b39fd..8274a03dc 100644 --- a/lib/tapioca/helpers/test/dsl_compiler.rb +++ b/lib/tapioca/helpers/test/dsl_compiler.rb @@ -12,7 +12,6 @@ module Helpers module Test # @requires_ancestor: Kernel module DslCompiler - extend T::Sig include Isolation include Content include Template @@ -50,8 +49,6 @@ def context end class CompilerContext - extend T::Sig - include SorbetHelper #: singleton(Tapioca::Dsl::Compiler) diff --git a/lib/tapioca/helpers/test/isolation.rb b/lib/tapioca/helpers/test/isolation.rb index c6ef08545..6a32946e1 100644 --- a/lib/tapioca/helpers/test/isolation.rb +++ b/lib/tapioca/helpers/test/isolation.rb @@ -7,12 +7,9 @@ module Test # Copied from ActiveSupport::Testing::Isolation since we cannot require # constants from ActiveSupport without polluting the global namespace. module Isolation - extend T::Sig require "thread" class << self - extend T::Sig - #: -> bool def forking_env? !ENV["NO_FORK"] && Process.respond_to?(:fork) @@ -30,7 +27,6 @@ def run # @requires_ancestor: Kernel module Forking - extend T::Sig #: ?{ (?) -> untyped } -> String def run_in_isolation(&_blk) read, write = IO.pipe @@ -72,8 +68,6 @@ def run_in_isolation(&_blk) # @requires_ancestor: Kernel module Subprocess - extend T::Sig - ORIG_ARGV = ARGV.dup #: Array[String] # Crazy H4X to get this working in windows / jruby with diff --git a/lib/tapioca/helpers/test/template.rb b/lib/tapioca/helpers/test/template.rb index 3c239c92b..3eca63406 100644 --- a/lib/tapioca/helpers/test/template.rb +++ b/lib/tapioca/helpers/test/template.rb @@ -6,8 +6,6 @@ module Helpers module Test # @requires_ancestor: Kernel module Template - extend T::Sig - #: (String selector) -> bool def ruby_version(selector) ::Gem::Requirement.new(selector).satisfied_by?(::Gem::Version.new(RUBY_VERSION)) diff --git a/lib/tapioca/loaders/dsl.rb b/lib/tapioca/loaders/dsl.rb index 5f1e57cee..df363dd5a 100644 --- a/lib/tapioca/loaders/dsl.rb +++ b/lib/tapioca/loaders/dsl.rb @@ -4,11 +4,7 @@ module Tapioca module Loaders class Dsl < Loader - extend T::Sig - class << self - extend T::Sig - #: (tapioca_path: String, ?eager_load: bool, ?app_root: String, ?halt_upon_load_error: bool) -> void def load_application( tapioca_path:, diff --git a/lib/tapioca/loaders/gem.rb b/lib/tapioca/loaders/gem.rb index 6b0225118..67fbc45dd 100644 --- a/lib/tapioca/loaders/gem.rb +++ b/lib/tapioca/loaders/gem.rb @@ -4,11 +4,7 @@ module Tapioca module Loaders class Gem < Loader - extend T::Sig - class << self - extend T::Sig - #: ( #| bundle: Gemfile, #| prerequire: String?, diff --git a/lib/tapioca/loaders/loader.rb b/lib/tapioca/loaders/loader.rb index 00e974908..23a3fa845 100644 --- a/lib/tapioca/loaders/loader.rb +++ b/lib/tapioca/loaders/loader.rb @@ -5,7 +5,6 @@ module Tapioca module Loaders # @abstract class Loader - extend T::Sig include Thor::Base include CliHelper include Tapioca::GemHelper diff --git a/lib/tapioca/rbi_ext/model.rb b/lib/tapioca/rbi_ext/model.rb index a3acf129a..31dca1108 100644 --- a/lib/tapioca/rbi_ext/model.rb +++ b/lib/tapioca/rbi_ext/model.rb @@ -3,8 +3,6 @@ module RBI class Tree - extend T::Sig - #: (T::Module[top] constant) ?{ (Scope scope) -> void } -> Scope def create_path(constant, &block) constant_name = Tapioca::Runtime::Reflection.name_of(constant) diff --git a/lib/tapioca/rbi_formatter.rb b/lib/tapioca/rbi_formatter.rb index 26fc20ef3..0ae4ccbb8 100644 --- a/lib/tapioca/rbi_formatter.rb +++ b/lib/tapioca/rbi_formatter.rb @@ -3,8 +3,6 @@ module Tapioca class RBIFormatter < RBI::Formatter - extend T::Sig - #: (RBI::File file, String command, ?reason: String?) -> void def write_header!(file, command, reason: nil) file.comments << RBI::Comment.new("DO NOT EDIT MANUALLY") diff --git a/lib/tapioca/repo_index.rb b/lib/tapioca/repo_index.rb index 9d547b564..aef0dbf63 100644 --- a/lib/tapioca/repo_index.rb +++ b/lib/tapioca/repo_index.rb @@ -3,10 +3,7 @@ module Tapioca class RepoIndex - extend T::Sig class << self - extend T::Sig - #: (String json) -> RepoIndex def from_json(json) RepoIndex.from_hash(JSON.parse(json)) diff --git a/lib/tapioca/runtime/attached_class_of_32.rb b/lib/tapioca/runtime/attached_class_of_32.rb index d0ccf6db8..e91c5f8c0 100644 --- a/lib/tapioca/runtime/attached_class_of_32.rb +++ b/lib/tapioca/runtime/attached_class_of_32.rb @@ -8,8 +8,6 @@ module Runtime # added in Ruby 3.2 and fetches the attached object of a singleton # class without having to iterate through all of ObjectSpace. module AttachedClassOf - extend T::Sig - #: (Class singleton_class) -> T::Module[top]? def attached_class_of(singleton_class) result = singleton_class.attached_object diff --git a/lib/tapioca/runtime/attached_class_of_legacy.rb b/lib/tapioca/runtime/attached_class_of_legacy.rb index ec16ec78b..25ca074a6 100644 --- a/lib/tapioca/runtime/attached_class_of_legacy.rb +++ b/lib/tapioca/runtime/attached_class_of_legacy.rb @@ -9,7 +9,6 @@ module Runtime # class by iterating through ObjectSpace. # @requires_ancestor: Tapioca::Runtime::Reflection module AttachedClassOf - extend T::Sig #: (Class singleton_class) -> T::Module[top]? def attached_class_of(singleton_class) # https://stackoverflow.com/a/36622320/98634 diff --git a/lib/tapioca/runtime/dynamic_mixin_compiler.rb b/lib/tapioca/runtime/dynamic_mixin_compiler.rb index c91c0c177..f2678e25f 100644 --- a/lib/tapioca/runtime/dynamic_mixin_compiler.rb +++ b/lib/tapioca/runtime/dynamic_mixin_compiler.rb @@ -4,7 +4,6 @@ module Tapioca module Runtime class DynamicMixinCompiler - extend T::Sig include Runtime::Reflection #: Array[T::Module[top]] @@ -95,8 +94,6 @@ def method_missing(symbol, *args) end class << self - extend T::Sig - T::Sig::WithoutRuntime.sig { params(symbol: Symbol, args: T.untyped).returns(T.untyped) } def method_missing(symbol, *args) # Similarly, we need this here so that we can handle any diff --git a/lib/tapioca/runtime/generic_type_registry.rb b/lib/tapioca/runtime/generic_type_registry.rb index 46b494291..661edabd6 100644 --- a/lib/tapioca/runtime/generic_type_registry.rb +++ b/lib/tapioca/runtime/generic_type_registry.rb @@ -26,8 +26,6 @@ module GenericTypeRegistry @type_variables = {}.compare_by_identity #: Hash[T::Module[top], Array[TypeVariableModule]] class GenericType < T::Types::Simple - extend T::Sig - #: (T::Module[top] raw_type, T::Module[top] underlying_type) -> void def initialize(raw_type, underlying_type) super(raw_type) @@ -43,8 +41,6 @@ def valid?(obj) end class << self - extend T::Sig - # This method is responsible for building the name of the instantiated concrete type # and cloning the given constant so that we can return a type that is the same # as the current type but is a different instance and has a different name method. diff --git a/lib/tapioca/runtime/reflection.rb b/lib/tapioca/runtime/reflection.rb index 1570dd4dd..2c421039f 100644 --- a/lib/tapioca/runtime/reflection.rb +++ b/lib/tapioca/runtime/reflection.rb @@ -16,8 +16,6 @@ module Tapioca module Runtime module Reflection include AttachedClassOf - - extend T::Sig extend self CLASS_METHOD = Kernel.instance_method(:class) #: UnboundMethod diff --git a/lib/tapioca/runtime/trackers.rb b/lib/tapioca/runtime/trackers.rb index 580f4fbdc..b1e5ea1af 100644 --- a/lib/tapioca/runtime/trackers.rb +++ b/lib/tapioca/runtime/trackers.rb @@ -6,13 +6,9 @@ module Tapioca module Runtime module Trackers - extend T::Sig - @trackers = [] #: Array[Tracker] class << self - extend T::Sig - #: [Return] { -> Return } -> Return def with_trackers_enabled(&blk) # Currently this is a dirty hack to ensure disabling trackers diff --git a/lib/tapioca/runtime/trackers/autoload.rb b/lib/tapioca/runtime/trackers/autoload.rb index cca6eb6f8..2224fcb12 100644 --- a/lib/tapioca/runtime/trackers/autoload.rb +++ b/lib/tapioca/runtime/trackers/autoload.rb @@ -6,13 +6,10 @@ module Runtime module Trackers module Autoload extend Tracker - extend T::Sig @constant_names_registered_for_autoload = [] #: Array[String] class << self - extend T::Sig - #: -> void def eager_load_all! Runtime.with_disabled_exits do diff --git a/lib/tapioca/runtime/trackers/constant_definition.rb b/lib/tapioca/runtime/trackers/constant_definition.rb index 412471e9b..f1a7b9cbd 100644 --- a/lib/tapioca/runtime/trackers/constant_definition.rb +++ b/lib/tapioca/runtime/trackers/constant_definition.rb @@ -11,7 +11,6 @@ module Trackers module ConstantDefinition extend Tracker extend Reflection - extend T::Sig @class_files = {}.compare_by_identity #: Hash[T::Module[top], Set[SourceLocation]] @@ -50,8 +49,6 @@ module ConstantDefinition end class << self - extend T::Sig - def disable! @class_tracepoint.disable @creturn_tracepoint.disable diff --git a/lib/tapioca/runtime/trackers/method_definition.rb b/lib/tapioca/runtime/trackers/method_definition.rb index afd9171af..059759a31 100644 --- a/lib/tapioca/runtime/trackers/method_definition.rb +++ b/lib/tapioca/runtime/trackers/method_definition.rb @@ -6,7 +6,6 @@ module Runtime module Trackers module MethodDefinition extend Tracker - extend T::Sig @method_definitions = {}.compare_by_identity #: Hash[T::Module[top], Hash[Symbol, Array[SourceLocation]]] diff --git a/lib/tapioca/runtime/trackers/mixin.rb b/lib/tapioca/runtime/trackers/mixin.rb index 088cffda3..a09a547bf 100644 --- a/lib/tapioca/runtime/trackers/mixin.rb +++ b/lib/tapioca/runtime/trackers/mixin.rb @@ -6,7 +6,6 @@ module Runtime module Trackers module Mixin extend Tracker - extend T::Sig @constants_to_mixin_locations = {}.compare_by_identity @mixins_to_constants = {}.compare_by_identity @@ -20,8 +19,6 @@ class Type < T::Enum end class << self - extend T::Sig - #: [Result] { -> Result } -> Result def with_disabled_registration(&block) with_disabled_tracker(&block) diff --git a/lib/tapioca/runtime/trackers/required_ancestor.rb b/lib/tapioca/runtime/trackers/required_ancestor.rb index 03cbb80ed..8c14e6f9e 100644 --- a/lib/tapioca/runtime/trackers/required_ancestor.rb +++ b/lib/tapioca/runtime/trackers/required_ancestor.rb @@ -9,8 +9,6 @@ module RequiredAncestor @required_ancestors_map = {}.compare_by_identity class << self - extend T::Sig - #: (T::Helpers requiring, ^-> void block) -> void def register(requiring, block) return unless enabled? diff --git a/lib/tapioca/runtime/trackers/tracker.rb b/lib/tapioca/runtime/trackers/tracker.rb index 18c82b48d..92508c1c2 100644 --- a/lib/tapioca/runtime/trackers/tracker.rb +++ b/lib/tapioca/runtime/trackers/tracker.rb @@ -6,10 +6,7 @@ module Runtime module Trackers # @abstract module Tracker - extend T::Sig class << self - extend T::Sig - #: ((Tracker & T::Module[top]) base) -> void def extended(base) Trackers.register_tracker(base) diff --git a/lib/tapioca/sorbet_ext/generic_name_patch.rb b/lib/tapioca/sorbet_ext/generic_name_patch.rb index 805cf3c2a..b7ea2426d 100644 --- a/lib/tapioca/sorbet_ext/generic_name_patch.rb +++ b/lib/tapioca/sorbet_ext/generic_name_patch.rb @@ -120,8 +120,6 @@ def initialize(name, variance) # need to do any matching of constants to type variables to bind their names, Ruby will # do that automatically for us and we get the `name` method for free from `Module`. class TypeVariableModule < Module - extend T::Sig - class Type < T::Enum enums do Member = new("type_member") diff --git a/lib/tapioca/static/requires_compiler.rb b/lib/tapioca/static/requires_compiler.rb index e68c910ae..51dc48703 100644 --- a/lib/tapioca/static/requires_compiler.rb +++ b/lib/tapioca/static/requires_compiler.rb @@ -4,8 +4,6 @@ module Tapioca module Static class RequiresCompiler - extend T::Sig - #: (String sorbet_path) -> void def initialize(sorbet_path) @sorbet_path = sorbet_path diff --git a/lib/tapioca/static/symbol_loader.rb b/lib/tapioca/static/symbol_loader.rb index 16b31ccaa..bce33e3e1 100644 --- a/lib/tapioca/static/symbol_loader.rb +++ b/lib/tapioca/static/symbol_loader.rb @@ -5,7 +5,6 @@ module Tapioca module Static module SymbolLoader class << self - extend T::Sig include SorbetHelper include Runtime::Reflection diff --git a/lib/tapioca/static/symbol_table_parser.rb b/lib/tapioca/static/symbol_table_parser.rb index a8f22d815..4600a0638 100644 --- a/lib/tapioca/static/symbol_table_parser.rb +++ b/lib/tapioca/static/symbol_table_parser.rb @@ -4,13 +4,9 @@ module Tapioca module Static class SymbolTableParser - extend T::Sig - SKIP_PARSE_KINDS = ["CLASS_OR_MODULE", "STATIC_FIELD"].freeze #: Array[String] class << self - extend T::Sig - #: (String json_string) -> Set[String] def parse_json(json_string) obj = JSON.parse(json_string) diff --git a/spec/dsl_spec_helper.rb b/spec/dsl_spec_helper.rb index 091775312..02f3cda67 100644 --- a/spec/dsl_spec_helper.rb +++ b/spec/dsl_spec_helper.rb @@ -6,12 +6,9 @@ require "tapioca/helpers/test/dsl_compiler" class DslSpec < Minitest::Spec - extend T::Sig include Tapioca::Helpers::Test::DslCompiler class << self - extend T::Sig - #: -> singleton(DslSpec) def spec_test_class # It should be the one that directly inherits from DslSpec diff --git a/spec/helpers/mock_gem.rb b/spec/helpers/mock_gem.rb index 88d35e581..e47b3bce9 100644 --- a/spec/helpers/mock_gem.rb +++ b/spec/helpers/mock_gem.rb @@ -4,8 +4,6 @@ module Tapioca # A mock gem used for testing purposes class MockGem < Spoom::Context - extend T::Sig - # The gem's name #: String attr_reader :name diff --git a/spec/helpers/mock_project.rb b/spec/helpers/mock_project.rb index 6cc2fa592..55f41d0b8 100644 --- a/spec/helpers/mock_project.rb +++ b/spec/helpers/mock_project.rb @@ -7,8 +7,6 @@ module Tapioca # A mock project used for testing purposes class MockProject < Spoom::Context - extend T::Sig - # Path to Tapioca's source files TAPIOCA_PATH = (Pathname.new(__FILE__) / ".." / ".." / "..").to_s #: String diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index d781ce4c0..215c01eab 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -25,7 +25,6 @@ module Minitest class Test - extend T::Sig extend Rails::LineFiltering end end diff --git a/spec/spec_with_project.rb b/spec/spec_with_project.rb index c152f36af..d5b53b475 100644 --- a/spec/spec_with_project.rb +++ b/spec/spec_with_project.rb @@ -5,8 +5,6 @@ module Tapioca class SpecWithProject < Minitest::HooksSpec - extend T::Sig - TEST_TMP_PATH = "/tmp/tapioca/tests" # Spec lifecycle @@ -173,8 +171,6 @@ def assert_stderr_equals(text, result) @assertion_updates = {} #: Hash[String, Array[[Integer, Symbol, String]]] class << self - extend T::Sig - #: Hash[String, Array[[Integer, Symbol, String]]] attr_reader :assertion_updates diff --git a/spec/tapioca/dsl/helpers/active_model_type_helper_spec.rb b/spec/tapioca/dsl/helpers/active_model_type_helper_spec.rb index c7f4833af..7b9e68a1f 100644 --- a/spec/tapioca/dsl/helpers/active_model_type_helper_spec.rb +++ b/spec/tapioca/dsl/helpers/active_model_type_helper_spec.rb @@ -16,7 +16,6 @@ class ValueType end class CustomWithTypeVariable < ActiveModel::Type::Value - extend T::Sig extend T::Generic Elem = type_member @@ -30,8 +29,6 @@ def cast(value) describe "type_for" do it "discovers custom type from __tapioca_type method" do klass = Class.new(ActiveModel::Type::Value) do - extend T::Sig - #: -> untyped def __tapioca_type T.any(Integer, String) @@ -67,8 +64,6 @@ def cast_value(value) it "discovers custom type from signature on deserialize method" do klass = Class.new(ActiveModel::Type::Value) do - extend T::Sig - #: (untyped value) -> String def cast(value) super @@ -99,8 +94,6 @@ def cast_value(value) it "discovers custom type from signature on cast method" do klass = Class.new(ActiveModel::Type::Value) do - extend T::Sig - #: (untyped value) -> String def cast(value) super @@ -131,8 +124,6 @@ def cast_value(value) it "discovers custom type from signature on cast_value method" do klass = Class.new(ActiveModel::Type::Value) do - extend T::Sig - #: (untyped value) -> untyped def cast(value) super @@ -163,8 +154,6 @@ def cast_value(value) it "discovers custom type from signature on serialize method" do klass = Class.new(ActiveModel::Type::Value) do - extend T::Sig - #: (untyped value) -> untyped def cast(value) super @@ -195,8 +184,6 @@ def cast_value(value) it "discovers custom type even if it is not ActiveModel::Type::Value" do klass = Class.new do - extend T::Sig - #: (untyped value) -> Integer def cast(value) end @@ -210,8 +197,6 @@ def cast(value) it "discovers custom type even if it is generic" do klass = Class.new(ActiveModel::Type::Value) do - extend T::Sig - #: (untyped value) -> ValueType[Integer] def cast(value) end @@ -230,10 +215,8 @@ def cast(value) ) end - it "returns a weak type if custom type cannot be discovered from signatures" do + it "returns a weak type if custom type cannot be discovered from signatures" do # rubocop:disable RSpec/RepeatedExample klass = Class.new(ActiveModel::Type::Value) do - extend T::Sig - #: (untyped value) -> untyped def cast(value) super @@ -261,7 +244,7 @@ def cast_value(value) ) end - it "returns a weak type if custom type does not have any signatures" do + it "returns a weak type if custom type does not have any signatures" do # rubocop:disable RSpec/RepeatedExample klass = Class.new(ActiveModel::Type::Value) do def cast(value) super @@ -308,8 +291,6 @@ def cast_value(value) it "does not assume the type is nilable when `#__tapioca_type` is defined" do klass = Class.new(ActiveModel::Type::Value) do - extend T::Sig - #: -> T::Module[top] def __tapioca_type = String end diff --git a/spec/tapioca/dsl/helpers/graphql_type_helper_spec.rb b/spec/tapioca/dsl/helpers/graphql_type_helper_spec.rb index 9587e4dd9..c8b19583e 100644 --- a/spec/tapioca/dsl/helpers/graphql_type_helper_spec.rb +++ b/spec/tapioca/dsl/helpers/graphql_type_helper_spec.rb @@ -8,8 +8,6 @@ module Tapioca module Dsl module Helpers class GraphqlTypeHelperSpec < Minitest::Spec - extend T::Sig - #: -> void def before_setup require "graphql" diff --git a/spec/tapioca/gemfile_spec.rb b/spec/tapioca/gemfile_spec.rb index de419e1f9..1e6882a3a 100644 --- a/spec/tapioca/gemfile_spec.rb +++ b/spec/tapioca/gemfile_spec.rb @@ -5,8 +5,6 @@ module Tapioca class GemfileSpec < SpecWithProject - extend T::Sig - describe Tapioca::Gemfile do it "export_rbi_files? returns false if the gem does not export RBI files" do foo_gem = mock_gem("foo", "0.0.1") diff --git a/spec/tapioca/runtime/reflection_spec.rb b/spec/tapioca/runtime/reflection_spec.rb index 0b087d72f..95edd51c3 100644 --- a/spec/tapioca/runtime/reflection_spec.rb +++ b/spec/tapioca/runtime/reflection_spec.rb @@ -62,8 +62,6 @@ def equal?(other) end class SignatureFoo - extend T::Sig - #: -> String def good_method "Thank you."