fix(ci): selene lint
This commit is contained in:
parent
62eab3df2d
commit
8df8c16a72
4 changed files with 4 additions and 6 deletions
|
|
@ -89,7 +89,7 @@ function M.load()
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.save()
|
function M.save()
|
||||||
local ok, err = pcall(vim.fn.mkdir, vim.fn.fnamemodify(cache_file, ':h'), 'p')
|
local ok, _ = pcall(vim.fn.mkdir, vim.fn.fnamemodify(cache_file, ':h'), 'p')
|
||||||
if not ok then
|
if not ok then
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
vim.fn.mkdir(vim.fn.fnamemodify(cache_file, ':h'), 'p')
|
vim.fn.mkdir(vim.fn.fnamemodify(cache_file, ':h'), 'p')
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ local M = {}
|
||||||
|
|
||||||
local cache = require('cp.cache')
|
local cache = require('cp.cache')
|
||||||
local logger = require('cp.log')
|
local logger = require('cp.log')
|
||||||
local scraper = require('cp.scraper')
|
|
||||||
local utils = require('cp.utils')
|
local utils = require('cp.utils')
|
||||||
|
|
||||||
---@class cp.PlatformItem
|
---@class cp.PlatformItem
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ end
|
||||||
---@param input_file string
|
---@param input_file string
|
||||||
---@param expected_file string
|
---@param expected_file string
|
||||||
---@return TestCase[]
|
---@return TestCase[]
|
||||||
local function parse_test_cases_from_files(input_file, expected_file)
|
local function parse_test_cases_from_files(input_file, _)
|
||||||
local base_name = vim.fn.fnamemodify(input_file, ':r')
|
local base_name = vim.fn.fnamemodify(input_file, ':r')
|
||||||
local test_cases = {}
|
local test_cases = {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,6 @@ end
|
||||||
|
|
||||||
function M.scrape_remaining_problems(platform, contest_id, problems)
|
function M.scrape_remaining_problems(platform, contest_id, problems)
|
||||||
cache.load()
|
cache.load()
|
||||||
local config = config_module.get_config()
|
|
||||||
local missing_problems = {}
|
local missing_problems = {}
|
||||||
|
|
||||||
for _, prob in ipairs(problems) do
|
for _, prob in ipairs(problems) do
|
||||||
|
|
@ -227,8 +226,8 @@ function M.navigate_problem(direction, language)
|
||||||
|
|
||||||
local problems = contest_data.problems
|
local problems = contest_data.problems
|
||||||
local current_index = nil
|
local current_index = nil
|
||||||
for i, problem in ipairs(problems) do
|
for i, prob in ipairs(problems) do
|
||||||
if problem.id == current_problem_id then
|
if prob.id == current_problem_id then
|
||||||
current_index = i
|
current_index = i
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue