Skip to content

Commit

Permalink
Auto-correct style offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
vinistock committed Feb 1, 2022
1 parent 1cef4a9 commit 790d306
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/tapioca/compilers/dsl/aasm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class AASM < Tapioca::Compilers::Dsl::Base
EVENT_CALLBACKS =
T.let(
["after", "after_commit", "after_transaction", "before", "before_transaction", "ensure", "error",
"before_success", "success"].freeze,
"before_success", "success",].freeze,
T::Array[String]
)

Expand Down
2 changes: 1 addition & 1 deletion lib/tapioca/compilers/dsl/active_record_relations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def create_collection_proxy_methods(klass)
# `T.any(Model, Integer, String, T::Enumerable[T.any(Model, Integer, String, T::Enumerable[Model])])`
model_or_id_collection =
"T.any(#{constant_name}, Integer, String" \
", T::Enumerable[T.any(#{constant_name}, Integer, String, T::Enumerable[#{constant_name}])])"
", T::Enumerable[T.any(#{constant_name}, Integer, String, T::Enumerable[#{constant_name}])])"

COLLECTION_PROXY_METHODS.each do |method_name|
case method_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def type_for(column_name)
sig { params(constant: Module).returns(T::Boolean) }
def do_not_generate_strong_types?(constant)
Object.const_defined?(:StrongTypeGeneration) &&
!(constant.singleton_class < Object.const_get(:StrongTypeGeneration))
!(constant.singleton_class < Object.const_get(:StrongTypeGeneration))
end

sig { params(type: String).returns(String) }
Expand Down
2 changes: 1 addition & 1 deletion lib/tapioca/compilers/symbol_table_compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ def filtered_mixin?(mixin_name)

SPECIAL_METHOD_NAMES = T.let([
"!", "~", "+@", "**", "-@", "*", "/", "%", "+", "-", "<<", ">>", "&", "|", "^",
"<", "<=", "=>", ">", ">=", "==", "===", "!=", "=~", "!~", "<=>", "[]", "[]=", "`"
"<", "<=", "=>", ">", ">=", "==", "===", "!=", "=~", "!~", "<=>", "[]", "[]=", "`",
], T::Array[String])

sig { params(name: String).returns(T::Boolean) }
Expand Down
2 changes: 1 addition & 1 deletion lib/tapioca/helpers/config_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def validate_config_options(command_options, config_key, config_options)
end

error_msg = "invalid value for option `#{config_option_key}` for key `#{config_key}` - expected " \
"`#{command_option.type.capitalize}` but found #{config_option_value_type.capitalize}"
"`#{command_option.type.capitalize}` but found #{config_option_value_type.capitalize}"
next build_error(error_msg) unless config_option_value_type == command_option.type
end.compact
end
Expand Down
2 changes: 1 addition & 1 deletion lib/tapioca/rbi_ext/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def create_method(name, parameters: [], return_type: "T.untyped", class_method:

SPECIAL_METHOD_NAMES = T.let(
["!", "~", "+@", "**", "-@", "*", "/", "%", "+", "-", "<<", ">>", "&", "|", "^", "<", "<=", "=>", ">", ">=",
"==", "===", "!=", "=~", "!~", "<=>", "[]", "[]=", "`"].freeze,
"==", "===", "!=", "=~", "!~", "<=>", "[]", "[]=", "`",].freeze,
T::Array[String]
)

Expand Down
2 changes: 1 addition & 1 deletion lib/tapioca/trackers/autoload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Trackers
module Autoload
extend T::Sig

NOOP_METHOD = -> (*_args, **_kwargs, &_block) {}
NOOP_METHOD = ->(*_args, **_kwargs, &_block) {}

@constant_names_registered_for_autoload = T.let([], T::Array[String])

Expand Down
2 changes: 1 addition & 1 deletion spec/tapioca/compilers/symbol_table_compiler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ module Foo
def foo
end
end
RUBY
RUBY

add_ruby_file("toto.rb", <<~RUBY)
module Toto
Expand Down
2 changes: 1 addition & 1 deletion tapioca.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Gem::Specification.new do |spec|
spec.add_dependency("bundler", ">= 1.17.3")
spec.add_dependency("pry", ">= 0.12.2")
spec.add_dependency("rbi", "~> 0.0.0", ">= 0.0.9")
spec.add_dependency("sorbet-static", ">= 0.5.9204")
spec.add_dependency("sorbet-runtime", ">= 0.5.9204")
spec.add_dependency("sorbet-static", ">= 0.5.9204")
spec.add_dependency("spoom", "~> 1.1.0", ">= 1.1.4")
spec.add_dependency("thor", ">= 1.2.0")
spec.add_dependency("yard-sorbet")
Expand Down

0 comments on commit 790d306

Please sign in to comment.