Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions lib/tapioca.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@
require "rubygems/user_interaction"

module Tapioca
extend T::Sig

@traces = [] #: Array[TracePoint]

class << self
extend T::Sig

#: [Result] { -> Result } -> Result
def silence_warnings(&blk)
original_verbosity = $VERBOSE
Expand Down
3 changes: 0 additions & 3 deletions lib/tapioca/bundler_ext/auto_require_hook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions lib/tapioca/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,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

Expand Down
2 changes: 0 additions & 2 deletions lib/tapioca/commands/annotations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
module Tapioca
module Commands
class Annotations < CommandWithoutTracker
extend T::Sig

#: (central_repo_root_uris: Array[String], ?auth: String?, ?netrc_file: String?, ?central_repo_index_path: String, ?typed_overrides: Hash[String, String]) -> void
def initialize(
central_repo_root_uris:,
Expand Down
1 change: 0 additions & 1 deletion lib/tapioca/commands/check_shims.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
module Tapioca
module Commands
class CheckShims < CommandWithoutTracker
extend T::Sig
include SorbetHelper
include RBIFilesHelper

Expand Down
1 change: 0 additions & 1 deletion lib/tapioca/commands/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ module Tapioca
module Commands
# @abstract
class Command
extend T::Sig
class FileWriter < Thor
include Thor::Actions
end
Expand Down
4 changes: 0 additions & 4 deletions lib/tapioca/dsl/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ module Dsl
# @abstract
#: [ConstantType < Module]
class Compiler
extend T::Sig

include RBIHelper
include Runtime::Reflection
extend Runtime::Reflection
Expand All @@ -24,8 +22,6 @@ class Compiler
@@requested_constants = [] #: Array[Module] # rubocop:disable Style/ClassVars

class << self
extend T::Sig

#: (Module constant) -> bool
def handles?(constant)
processable_constants.include?(constant)
Expand Down
4 changes: 0 additions & 4 deletions lib/tapioca/dsl/compilers/aasm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -200,8 +198,6 @@ def decorate
end

class << self
extend T::Sig

# @override
#: -> T::Enumerable[Module]
def gather_constants
Expand Down
4 changes: 0 additions & 4 deletions lib/tapioca/dsl/compilers/action_controller_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ module Compilers
# ~~~
#: [ConstantType = singleton(::ActionController::Base)]
class ActionControllerHelpers < Compiler
extend T::Sig

# @override
#: -> void
def decorate
Expand Down Expand Up @@ -118,8 +116,6 @@ def decorate
end

class << self
extend T::Sig

# @override
#: -> T::Enumerable[Module]
def gather_constants
Expand Down
4 changes: 0 additions & 4 deletions lib/tapioca/dsl/compilers/action_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ module Compilers
# ~~~
#: [ConstantType = singleton(::ActionMailer::Base)]
class ActionMailer < Compiler
extend T::Sig

# @override
#: -> void
def decorate
Expand All @@ -51,8 +49,6 @@ def decorate
end

class << self
extend T::Sig

# @override
#: -> T::Enumerable[Module]
def gather_constants
Expand Down
4 changes: 0 additions & 4 deletions lib/tapioca/dsl/compilers/action_text.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ module Compilers
# ~~~
#: [ConstantType = singleton(::ActiveRecord::Base)]
class ActionText < Compiler
extend T::Sig

# @override
#: -> void
def decorate
Expand All @@ -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
Expand Down
4 changes: 0 additions & 4 deletions lib/tapioca/dsl/compilers/active_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ module Compilers
# ~~~
#: [ConstantType = singleton(::ActiveJob::Base)]
class ActiveJob < Compiler
extend T::Sig

# @override
#: -> void
def decorate
Expand Down Expand Up @@ -85,8 +83,6 @@ def perform_later_parameters(parameters, constant_name)
end

class << self
extend T::Sig

# @override
#: -> T::Enumerable[Module]
def gather_constants
Expand Down
4 changes: 0 additions & 4 deletions lib/tapioca/dsl/compilers/active_model_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ module Compilers
# ~~~
#: [ConstantType = (Class[::ActiveModel::Attributes] & ::ActiveModel::Attributes::ClassMethods)]
class ActiveModelAttributes < Compiler
extend T::Sig

# @override
#: -> void
def decorate
Expand All @@ -52,8 +50,6 @@ def decorate
end

class << self
extend T::Sig

# @override
#: -> T::Enumerable[Module]
def gather_constants
Expand Down
4 changes: 0 additions & 4 deletions lib/tapioca/dsl/compilers/active_model_secure_password.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ module Compilers
# ~~~
#: [ConstantType = (Class[::ActiveModel::SecurePassword] & ::ActiveModel::SecurePassword::ClassMethods)]
class ActiveModelSecurePassword < Compiler
extend T::Sig

# @override
#: -> void
def decorate
Expand Down Expand Up @@ -90,8 +88,6 @@ def decorate
end

class << self
extend T::Sig

# @override
#: -> T::Enumerable[Module]
def gather_constants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
#: -> T::Enumerable[Module]
Expand Down
5 changes: 0 additions & 5 deletions lib/tapioca/dsl/compilers/active_record_associations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -138,8 +135,6 @@ def decorate
end

class << self
extend T::Sig

# @override
#: -> T::Enumerable[Module]
def gather_constants
Expand Down
3 changes: 0 additions & 3 deletions lib/tapioca/dsl/compilers/active_record_columns.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ module Compilers
# ~~~
#: [ConstantType = singleton(ActiveRecord::Base)]
class ActiveRecordColumns < Compiler
extend T::Sig
include Helpers::ActiveRecordConstantsHelper

# @override
Expand Down Expand Up @@ -163,8 +162,6 @@ def decorate
end

class << self
extend T::Sig

# @override
#: -> T::Enumerable[Module]
def gather_constants
Expand Down
3 changes: 0 additions & 3 deletions lib/tapioca/dsl/compilers/active_record_delegated_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ module Compilers
# ~~~
#: [ConstantType = (singleton(ActiveRecord::Base) & Extensions::ActiveRecord)]
class ActiveRecordDelegatedTypes < Compiler
extend T::Sig
include Helpers::ActiveRecordConstantsHelper

# @override
Expand All @@ -88,8 +87,6 @@ def decorate
end

class << self
extend T::Sig

# @override
#: -> T::Enumerable[Module]
def gather_constants
Expand Down
4 changes: 0 additions & 4 deletions lib/tapioca/dsl/compilers/active_record_enum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ module Compilers
# ~~~
#: [ConstantType = singleton(::ActiveRecord::Base)]
class ActiveRecordEnum < Compiler
extend T::Sig

# @override
#: -> void
def decorate
Expand All @@ -75,8 +73,6 @@ def decorate
end

class << self
extend T::Sig

# @override
#: -> T::Enumerable[Module]
def gather_constants
Expand Down
4 changes: 0 additions & 4 deletions lib/tapioca/dsl/compilers/active_record_fixtures.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ module Compilers
# ~~~
#: [ConstantType = singleton(ActiveSupport::TestCase)]
class ActiveRecordFixtures < Compiler
extend T::Sig

MISSING = Object.new

# @override
Expand All @@ -59,8 +57,6 @@ def decorate
end

class << self
extend T::Sig

# @override
#: -> T::Enumerable[Module]
def gather_constants
Expand Down
3 changes: 0 additions & 3 deletions lib/tapioca/dsl/compilers/active_record_relations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ module Compilers
# ~~~
#: [ConstantType = singleton(::ActiveRecord::Base)]
class ActiveRecordRelations < Compiler
extend T::Sig
include Helpers::ActiveRecordConstantsHelper
include SorbetHelper

Expand Down Expand Up @@ -180,8 +179,6 @@ def decorate
end

class << self
extend T::Sig

# @override
#: -> T::Enumerable[Module]
def gather_constants
Expand Down
1 change: 0 additions & 1 deletion lib/tapioca/dsl/compilers/active_record_scope.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ module Compilers
# ~~~
#: [ConstantType = singleton(::ActiveRecord::Base)]
class ActiveRecordScope < Compiler
extend T::Sig
include Helpers::ActiveRecordConstantsHelper

# @override
Expand Down
3 changes: 0 additions & 3 deletions lib/tapioca/dsl/compilers/active_record_secure_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ module Compilers
# ~~~
#: [ConstantType = (singleton(ActiveRecord::Base) & Extensions::ActiveRecord)]
class ActiveRecordSecureToken < Compiler
extend T::Sig
include Helpers::ActiveRecordConstantsHelper

# @override
Expand All @@ -57,8 +56,6 @@ def decorate
end

class << self
extend T::Sig

# @override
#: -> T::Enumerable[Module]
def gather_constants
Expand Down
3 changes: 0 additions & 3 deletions lib/tapioca/dsl/compilers/active_record_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ module Compilers
# ~~~
#: [ConstantType = (singleton(ActiveRecord::Base) & Extensions::ActiveRecord)]
class ActiveRecordStore < Compiler
extend T::Sig
include Helpers::ActiveRecordConstantsHelper

# @override
Expand Down Expand Up @@ -132,8 +131,6 @@ def decorate
end

class << self
extend T::Sig

# @override
#: -> T::Enumerable[Module]
def gather_constants
Expand Down
4 changes: 0 additions & 4 deletions lib/tapioca/dsl/compilers/active_record_typed_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ module Compilers
# ~~~
#: [ConstantType = singleton(::ActiveRecord::Base)]
class ActiveRecordTypedStore < Compiler
extend T::Sig

# @override
#: -> void
def decorate
Expand All @@ -108,8 +106,6 @@ def decorate
end

class << self
extend T::Sig

# @override
#: -> T::Enumerable[Module]
def gather_constants
Expand Down
Loading
Loading