mirror of
https://github.com/iv-org/invidious.git
synced 2026-01-28 15:58:30 -06:00
Fix Style/RedundantBegin type of Ameba issues
This commit is contained in:
parent
5f1c9849bf
commit
9f96682783
@ -31,9 +31,6 @@ Lint/SpecFilename:
|
||||
# Style
|
||||
#
|
||||
|
||||
Style/RedundantBegin:
|
||||
Enabled: false
|
||||
|
||||
Style/RedundantReturn:
|
||||
Enabled: false
|
||||
|
||||
|
||||
@ -64,7 +64,6 @@ struct Preferences
|
||||
end
|
||||
|
||||
def self.from_json(value : JSON::PullParser) : String
|
||||
begin
|
||||
result = value.read_string
|
||||
|
||||
if result.empty?
|
||||
@ -79,7 +78,6 @@ struct Preferences
|
||||
"light"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def self.to_yaml(value : String, yaml : YAML::Nodes::Builder)
|
||||
yaml.scalar value
|
||||
|
||||
@ -17,11 +17,9 @@ struct Invidious::User
|
||||
|
||||
module PreferencesConverter
|
||||
def self.from_rs(rs)
|
||||
begin
|
||||
Preferences.from_json(rs.read(String))
|
||||
rescue ex
|
||||
Preferences.from_json("{}")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -37,7 +37,6 @@ record AuthorFallback, name : String, id : String
|
||||
private module Parsers
|
||||
module BaseParser
|
||||
def parse(*args)
|
||||
begin
|
||||
return parse_internal(*args)
|
||||
rescue ex
|
||||
LOGGER.debug("#{{{ @type.name }}}: Failed to render item.")
|
||||
@ -47,7 +46,6 @@ private module Parsers
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Parses a InnerTube videoRenderer into a SearchVideo. Returns nil when the given object isn't a videoRenderer
|
||||
#
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user