fix(ci): unused vars

This commit is contained in:
Barrett Ruth 2025-09-22 23:05:52 -04:00
parent 7ad64677a5
commit 76cb1e456e
5 changed files with 9 additions and 9 deletions

View file

@ -27,7 +27,7 @@ function M.kill_job(job_id)
end end
function M.kill_all_jobs() function M.kill_all_jobs()
for job_id, job in pairs(current_jobs) do for _, job in pairs(current_jobs) do
job:kill(9) job:kill(9)
end end
current_jobs = {} current_jobs = {}

View file

@ -149,7 +149,7 @@ function M.setup_problem_async(contest_id, problem_id, language)
async.finish_contest_operation() async.finish_contest_operation()
end end
function M.start_background_problem_scraping(contest_id, problems, config) function M.start_background_problem_scraping(contest_id, problems, _)
cache.load() cache.load()
local platform = state.get_platform() or '' local platform = state.get_platform() or ''
local missing_problems = {} local missing_problems = {}

View file

@ -140,7 +140,7 @@ describe('async integration', function()
it('handles complete contest setup workflow', function() it('handles complete contest setup workflow', function()
local setup_completed = false local setup_completed = false
local mock_async_setup = { local mock_async_setup = {
setup_contest_async = function(contest_id, _) setup_contest_async = function(contest_id)
assert.equals('abc123', contest_id) assert.equals('abc123', contest_id)
setup_completed = true setup_completed = true
end, end,

View file

@ -26,7 +26,7 @@ describe('cp.async.scraper', function()
end, end,
} }
vim.system = function(cmd, opts, callback) vim.system = function(cmd, _, callback)
local result = { code = 0, stdout = '{}', stderr = '' } local result = { code = 0, stdout = '{}', stderr = '' }
if cmd[1] == 'ping' then if cmd[1] == 'ping' then
result = { code = 0 } result = { code = 0 }
@ -77,7 +77,7 @@ describe('cp.async.scraper', function()
end) end)
it('calls callback with error on network failure', function() it('calls callback with error on network failure', function()
vim.system = function(cmd, opts, callback) vim.system = function(cmd, _, callback)
if cmd[1] == 'ping' then if cmd[1] == 'ping' then
callback({ code = 1 }) callback({ code = 1 })
end end
@ -107,7 +107,7 @@ describe('cp.async.scraper', function()
end) end)
it('calls callback with error on subprocess failure', function() it('calls callback with error on subprocess failure', function()
vim.system = function(cmd, opts, callback) vim.system = function(cmd, _, callback)
if cmd[1] == 'ping' then if cmd[1] == 'ping' then
callback({ code = 0 }) callback({ code = 0 })
else else
@ -125,7 +125,7 @@ describe('cp.async.scraper', function()
end) end)
it('calls callback with error on invalid JSON', function() it('calls callback with error on invalid JSON', function()
vim.system = function(cmd, opts, callback) vim.system = function(cmd, _, callback)
if cmd[1] == 'ping' then if cmd[1] == 'ping' then
callback({ code = 0 }) callback({ code = 0 })
else else
@ -156,7 +156,7 @@ describe('cp.async.scraper', function()
end) end)
it('handles network failure gracefully', function() it('handles network failure gracefully', function()
vim.system = function(cmd, opts, callback) vim.system = function(cmd, _, callback)
if cmd[1] == 'ping' then if cmd[1] == 'ping' then
callback({ code = 1 }) callback({ code = 1 })
end end

View file

@ -11,7 +11,7 @@ describe('cp.async.setup', function()
} }
mock_scraper = { mock_scraper = {
scrape_contest_metadata_async = function(platform, contest_id, callback) scrape_contest_metadata_async = function(_, _, callback)
callback({ callback({
success = true, success = true,
problems = { problems = {