summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamantaz Fox <coding@samantaz.fr>2024-08-11 11:43:56 +0200
committerSamantaz Fox <coding@samantaz.fr>2024-08-11 11:43:56 +0200
commitb45310c7d4bd4ebeb9395f205c56cbffab300f70 (patch)
treeec4fe1259787b3ee33590ef8788f1eb111ce9255 /src
parenteb2dfe0ab1c8294281ab898d158a98e533432750 (diff)
parentc8fb75e6fd314bc1241bf256a2b897d409f79f42 (diff)
downloadinvidious-b45310c7d4bd4ebeb9395f205c56cbffab300f70.tar.gz
invidious-b45310c7d4bd4ebeb9395f205c56cbffab300f70.tar.bz2
invidious-b45310c7d4bd4ebeb9395f205c56cbffab300f70.zip
Ameba: Fix unused argument Lint warnings (#4805)
Related to issue 2231
Diffstat (limited to 'src')
-rw-r--r--src/invidious/routes/account.cr4
-rw-r--r--src/invidious/yt_backend/connection_pool.cr4
-rw-r--r--src/invidious/yt_backend/extractors.cr2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/invidious/routes/account.cr b/src/invidious/routes/account.cr
index 9d930841..dd65e7a6 100644
--- a/src/invidious/routes/account.cr
+++ b/src/invidious/routes/account.cr
@@ -53,7 +53,7 @@ module Invidious::Routes::Account
return error_template(401, "Password is a required field")
end
- new_passwords = env.params.body.select { |k, v| k.match(/^new_password\[\d+\]$/) }.map { |k, v| v }
+ new_passwords = env.params.body.select { |k, _| k.match(/^new_password\[\d+\]$/) }.map { |_, v| v }
if new_passwords.size <= 1 || new_passwords.uniq.size != 1
return error_template(400, "New passwords must match")
@@ -240,7 +240,7 @@ module Invidious::Routes::Account
return error_template(400, ex)
end
- scopes = env.params.body.select { |k, v| k.match(/^scopes\[\d+\]$/) }.map { |k, v| v }
+ scopes = env.params.body.select { |k, _| k.match(/^scopes\[\d+\]$/) }.map { |_, v| v }
callback_url = env.params.body["callbackUrl"]?
expire = env.params.body["expire"]?.try &.to_i?
diff --git a/src/invidious/yt_backend/connection_pool.cr b/src/invidious/yt_backend/connection_pool.cr
index d3dbcc0e..0ac785e6 100644
--- a/src/invidious/yt_backend/connection_pool.cr
+++ b/src/invidious/yt_backend/connection_pool.cr
@@ -24,7 +24,7 @@ struct YoutubeConnectionPool
@pool = build_pool()
end
- def client(&block)
+ def client(&)
conn = pool.checkout
begin
response = yield conn
@@ -69,7 +69,7 @@ def make_client(url : URI, region = nil, force_resolve : Bool = false)
return client
end
-def make_client(url : URI, region = nil, force_resolve : Bool = false, &block)
+def make_client(url : URI, region = nil, force_resolve : Bool = false, &)
client = make_client(url, region, force_resolve)
begin
yield client
diff --git a/src/invidious/yt_backend/extractors.cr b/src/invidious/yt_backend/extractors.cr
index 0e72957e..57a5dc3d 100644
--- a/src/invidious/yt_backend/extractors.cr
+++ b/src/invidious/yt_backend/extractors.cr
@@ -856,7 +856,7 @@ end
#
# This function yields the container so that items can be parsed separately.
#
-def extract_items(initial_data : InitialData, &block)
+def extract_items(initial_data : InitialData, &)
if unpackaged_data = initial_data["contents"]?.try &.as_h
elsif unpackaged_data = initial_data["response"]?.try &.as_h
elsif unpackaged_data = initial_data.dig?("onResponseReceivedActions", 1).try &.as_h