0
0
Fork 0

Fixed code quality issues (#15541)

* Added .deepsource.toml

* Removed bad use of `alias`

* Fixed operand order in the binary expression

* Prefixed unused method arguments with an underscore

* Replaced the old OpenSSL algorithmic constants with the newer strings initializers.

* Removed unnecessary UTF-8 encoding comment
This commit is contained in:
Shubhendra Singh Chauhan 2021-02-01 01:56:09 +05:30 committed by GitHub
parent 3efa0c54b6
commit c8d11b8bdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 26 additions and 10 deletions

View file

@ -1,5 +1,5 @@
if String.method_defined?(:blank_as?)
class String
alias_method :blank?, :blank_as?
alias blank? blank_as?
end
end

View file

@ -1,7 +1,7 @@
# Use this setup block to configure all options available in SimpleForm.
module AppendComponent
def append(wrapper_options = nil)
def append(_wrapper_options = nil)
@append ||= begin
options[:append].to_s.html_safe if options[:append].present?
end
@ -9,7 +9,7 @@ module AppendComponent
end
module RecommendedComponent
def recommended(wrapper_options = nil)
def recommended(_wrapper_options = nil)
return unless options[:recommended]
options[:label_text] = ->(raw_label_text, _required_label_text, _label_present) { safe_join([raw_label_text, ' ', content_tag(:span, I18n.t('simple_form.recommended'), class: 'recommended')]) }
nil

View file

@ -75,7 +75,7 @@ module Twitter
# XMPP or magnet URIs an empty array will be returned.
#
# If a block is given then it will be called for each XMPP URI.
def extract_extra_uris_with_indices(text, options = {}) # :yields: uri, start, end
def extract_extra_uris_with_indices(text, _options = {}) # :yields: uri, start, end
return [] unless text && text.index(":")
urls = []