From 03bb0bda3342cfae7ef883f6c35ba61438843c42 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Sun, 21 Sep 2025 00:16:14 -0400 Subject: [PATCH] fix(ci): typing --- lua/cp/init.lua | 4 ++-- lua/cp/scrape.lua | 11 +---------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/lua/cp/init.lua b/lua/cp/init.lua index eb9c17d..fa68375 100644 --- a/lua/cp/init.lua +++ b/lua/cp/init.lua @@ -633,9 +633,9 @@ local function setup_contest(contest_id, language) cache.load() local missing_problems = {} for _, prob in ipairs(problems) do - local cached_tests = cache.get_test_cases(state.platform, contest_id, problem.id) + local cached_tests = cache.get_test_cases(state.platform, contest_id, prob.id) if not cached_tests then - table.insert(missing_problems, problem) + table.insert(missing_problems, prob) end end diff --git a/lua/cp/scrape.lua b/lua/cp/scrape.lua index c9d1d13..8c6a4a1 100644 --- a/lua/cp/scrape.lua +++ b/lua/cp/scrape.lua @@ -355,16 +355,7 @@ function M.scrape_problems_parallel(platform, contest_id, problems, config) scrape_result = data if data.tests and #data.tests > 0 then - local ctx_contest_id, ctx_problem_id - if platform == 'cses' then - ctx_contest_id = problem_id - ctx_problem_id = nil - else - ctx_contest_id = contest_id - ctx_problem_id = problem_id - end - - local ctx = problem.create_context(platform, ctx_contest_id, ctx_problem_id, config) + local ctx = problem.create_context(platform, contest_id, problem_id, config) local base_name = vim.fn.fnamemodify(ctx.input_file, ':r') for i, test_case in ipairs(data.tests) do