lint: ignore some type errors
This commit is contained in:
parent
aa0c00c7fd
commit
3283deec96
4 changed files with 6 additions and 6 deletions
|
|
@ -343,7 +343,7 @@ M.list = function(url, column_defs, cb)
|
||||||
local dir = fs.posix_to_os_path(path)
|
local dir = fs.posix_to_os_path(path)
|
||||||
local fetch_meta = columns.get_metadata_fetcher(M, column_defs)
|
local fetch_meta = columns.get_metadata_fetcher(M, column_defs)
|
||||||
|
|
||||||
---@diagnostic disable-next-line: param-type-mismatch
|
---@diagnostic disable-next-line: param-type-mismatch, discard-returns
|
||||||
uv.fs_opendir(dir, function(open_err, fd)
|
uv.fs_opendir(dir, function(open_err, fd)
|
||||||
if open_err then
|
if open_err then
|
||||||
if open_err:match("^ENOENT: no such file or directory") then
|
if open_err:match("^ENOENT: no such file or directory") then
|
||||||
|
|
|
||||||
|
|
@ -242,7 +242,7 @@ M.list = function(url, column_defs, cb)
|
||||||
end
|
end
|
||||||
|
|
||||||
local info_dir = fs.join(trash_dir, "info")
|
local info_dir = fs.join(trash_dir, "info")
|
||||||
---@diagnostic disable-next-line: param-type-mismatch
|
---@diagnostic disable-next-line: param-type-mismatch, discard-returns
|
||||||
uv.fs_opendir(info_dir, function(open_err, fd)
|
uv.fs_opendir(info_dir, function(open_err, fd)
|
||||||
if open_err then
|
if open_err then
|
||||||
if open_err:match("^ENOENT: no such file or directory") then
|
if open_err:match("^ENOENT: no such file or directory") then
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ M.list = function(url, column_defs, cb)
|
||||||
local _, path = util.parse_url(url)
|
local _, path = util.parse_url(url)
|
||||||
assert(path)
|
assert(path)
|
||||||
local trash_dir = get_trash_dir()
|
local trash_dir = get_trash_dir()
|
||||||
---@diagnostic disable-next-line: param-type-mismatch
|
---@diagnostic disable-next-line: param-type-mismatch, discard-returns
|
||||||
uv.fs_opendir(trash_dir, function(open_err, fd)
|
uv.fs_opendir(trash_dir, function(open_err, fd)
|
||||||
if open_err then
|
if open_err then
|
||||||
if open_err:match("^ENOENT: no such file or directory") then
|
if open_err:match("^ENOENT: no such file or directory") then
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ end
|
||||||
---@param dir string
|
---@param dir string
|
||||||
---@param cb fun(err: nil|string, entries: nil|{type: oil.EntryType, name: string})
|
---@param cb fun(err: nil|string, entries: nil|{type: oil.EntryType, name: string})
|
||||||
M.listdir = function(dir, cb)
|
M.listdir = function(dir, cb)
|
||||||
---@diagnostic disable-next-line: param-type-mismatch
|
---@diagnostic disable-next-line: param-type-mismatch, discard-returns
|
||||||
uv.fs_opendir(dir, function(open_err, fd)
|
uv.fs_opendir(dir, function(open_err, fd)
|
||||||
if open_err then
|
if open_err then
|
||||||
return cb(open_err)
|
return cb(open_err)
|
||||||
|
|
@ -203,7 +203,7 @@ M.recursive_delete = function(entry_type, path, cb)
|
||||||
if entry_type ~= "directory" then
|
if entry_type ~= "directory" then
|
||||||
return uv.fs_unlink(path, cb)
|
return uv.fs_unlink(path, cb)
|
||||||
end
|
end
|
||||||
---@diagnostic disable-next-line: param-type-mismatch
|
---@diagnostic disable-next-line: param-type-mismatch, discard-returns
|
||||||
uv.fs_opendir(path, function(open_err, fd)
|
uv.fs_opendir(path, function(open_err, fd)
|
||||||
if open_err then
|
if open_err then
|
||||||
return cb(open_err)
|
return cb(open_err)
|
||||||
|
|
@ -273,7 +273,7 @@ M.recursive_copy = function(entry_type, src_path, dest_path, cb)
|
||||||
if mkdir_err then
|
if mkdir_err then
|
||||||
return cb(mkdir_err)
|
return cb(mkdir_err)
|
||||||
end
|
end
|
||||||
---@diagnostic disable-next-line: param-type-mismatch
|
---@diagnostic disable-next-line: param-type-mismatch, discard-returns
|
||||||
uv.fs_opendir(src_path, function(open_err, fd)
|
uv.fs_opendir(src_path, function(open_err, fd)
|
||||||
if open_err then
|
if open_err then
|
||||||
return cb(open_err)
|
return cb(open_err)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue