Fix issues raised by code review

Remove explicit `self.` from #process of parsers

Remove explicit return tuple in get_issue_template

Fix formatting

Move inline issue template style to stylesheet

Use @id in ProblematicTimelineItem xml repr

Fix naming
This commit is contained in:
syeopite
2025-04-05 12:23:42 -07:00
parent 7b27585454
commit 6c063436d4
7 changed files with 25 additions and 22 deletions

View File

@@ -62,7 +62,7 @@ private module Parsers
extend self
include BaseParser
def self.process(item : JSON::Any, author_fallback : AuthorFallback)
def process(item : JSON::Any, author_fallback : AuthorFallback)
if item_contents = (item["videoRenderer"]? || item["gridVideoRenderer"]?)
return self.parse(item_contents, author_fallback)
end
@@ -190,7 +190,7 @@ private module Parsers
extend self
include BaseParser
def self.process(item : JSON::Any, author_fallback : AuthorFallback)
def process(item : JSON::Any, author_fallback : AuthorFallback)
if item_contents = (item["channelRenderer"]? || item["gridChannelRenderer"]?)
return self.parse(item_contents, author_fallback)
end
@@ -253,7 +253,7 @@ private module Parsers
extend self
include BaseParser
def self.process(item : JSON::Any, author_fallback : AuthorFallback)
def process(item : JSON::Any, author_fallback : AuthorFallback)
if item_contents = item["hashtagTileRenderer"]?
return self.parse(item_contents)
end
@@ -306,7 +306,7 @@ private module Parsers
extend self
include BaseParser
def self.process(item : JSON::Any, author_fallback : AuthorFallback)
def process(item : JSON::Any, author_fallback : AuthorFallback)
if item_contents = item["gridPlaylistRenderer"]?
return self.parse(item_contents, author_fallback)
end
@@ -350,7 +350,7 @@ private module Parsers
extend self
include BaseParser
def self.process(item : JSON::Any, author_fallback : AuthorFallback)
def process(item : JSON::Any, author_fallback : AuthorFallback)
if item_contents = item["playlistRenderer"]?
return self.parse(item_contents, author_fallback)
end
@@ -413,7 +413,7 @@ private module Parsers
extend self
include BaseParser
def self.process(item : JSON::Any, author_fallback : AuthorFallback)
def process(item : JSON::Any, author_fallback : AuthorFallback)
if item_contents = item["shelfRenderer"]?
return self.parse(item_contents, author_fallback)
end
@@ -481,7 +481,7 @@ private module Parsers
extend self
include BaseParser
def self.process(item : JSON::Any, author_fallback : AuthorFallback)
def process(item : JSON::Any, author_fallback : AuthorFallback)
if item_contents = item.dig?("itemSectionRenderer", "contents", 0)
return self.parse(item_contents, author_fallback)
end
@@ -510,7 +510,7 @@ private module Parsers
extend self
include BaseParser
def self.process(item : JSON::Any, author_fallback : AuthorFallback)
def process(item : JSON::Any, author_fallback : AuthorFallback)
if item_contents = item.dig?("richItemRenderer", "content")
return self.parse(item_contents, author_fallback)
end
@@ -543,7 +543,7 @@ private module Parsers
extend self
include BaseParser
def self.process(item : JSON::Any, author_fallback : AuthorFallback)
def process(item : JSON::Any, author_fallback : AuthorFallback)
if item_contents = item["reelItemRenderer"]?
return self.parse(item_contents, author_fallback)
end
@@ -640,7 +640,7 @@ private module Parsers
extend self
include BaseParser
def self.process(item : JSON::Any, author_fallback : AuthorFallback)
def process(item : JSON::Any, author_fallback : AuthorFallback)
if item_contents = item["lockupViewModel"]?
return self.parse(item_contents, author_fallback)
end
@@ -718,7 +718,7 @@ private module Parsers
extend self
include BaseParser
def self.process(item : JSON::Any, author_fallback : AuthorFallback)
def process(item : JSON::Any, author_fallback : AuthorFallback)
if item_contents = item["shortsLockupViewModel"]?
return self.parse(item_contents, author_fallback)
end