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,4 +1,3 @@
# -*- encoding: utf-8 -*-
# frozen_string_literal: true
# This file generated automatically from http://w3id.org/identity/v1
require 'json/ld'

View file

@ -1,4 +1,3 @@
# -*- encoding: utf-8 -*-
# frozen_string_literal: true
# This file generated automatically from http://w3id.org/security/v1
require 'json/ld'

View file

@ -113,7 +113,7 @@ module Mastodon
result = entry.destroy
if result
processed += 1 + children_count
processed += children_count + 1
else
say("#{domain} could not be unblocked.", :red)
failed += 1

View file

@ -55,7 +55,7 @@ module Paperclip
# If we don't have enough colors for accent and foreground, generate
# new ones by manipulating the background color
(2 - foreground_colors.size).times do |i|
foreground_colors << lighten_or_darken(background_color, 35 + (15 * i))
foreground_colors << lighten_or_darken(background_color, 35 + (i * 15))
end
# We want the color with the highest contrast to background to be the foreground one,
@ -147,7 +147,7 @@ module Paperclip
g = l.to_f
b = l.to_f # achromatic
else
q = l < 0.5 ? l * (1 + s) : l + s - l * s
q = l < 0.5 ? l * (s + 1) : l + s - l * s
p = 2 * l - q
r = hue_to_rgb(p, q, h + 1 / 3.0)
g = hue_to_rgb(p, q, h)