Skip to content

Commit

Permalink
fix(typecheck): fix type errors caused by autoformat
Browse files Browse the repository at this point in the history
  • Loading branch information
pysan3 authored and vhyrro committed Nov 22, 2023
1 parent 9b0c31a commit 3f531c3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
14 changes: 7 additions & 7 deletions lua/neorg/modules/core/export/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -224,17 +224,17 @@ module.on_event = function(event)
local exported = module.public.export(event.buffer, filetype) ---@diagnostic disable-line -- TODO: type error workaround <pysan3>

vim.loop.fs_open(
filepath,
filepath, ---@diagnostic disable-line -- TODO: type error workaround <pysan3>
"w",
438,
function(err, fd) ---@diagnostic disable-line -- TODO: type error workaround <pysan3>
function(err, fd)
assert(not err, lib.lazy_string_concat("Failed to open file '", filepath, "' for export: ", err))

vim.loop.fs_write(
fd,
exported,
fd, ---@diagnostic disable-line -- TODO: type error workaround <pysan3>
exported, ---@diagnostic disable-line -- TODO: type error workaround <pysan3>
0,
function(werr) ---@diagnostic disable-line -- TODO: type error workaround <pysan3>
function(werr)
assert(
not werr,
lib.lazy_string_concat("Failed to write to file '", filepath, "' for export: ", werr)
Expand Down Expand Up @@ -310,10 +310,10 @@ module.on_event = function(event)
)

vim.loop.fs_write(
fd,
fd, ---@diagnostic disable-line -- TODO: type error workaround <pysan3>
exported,
0,
function(werr) ---@diagnostic disable-line -- TODO: type error workaround <pysan3>
function(werr)
assert(
not werr,
lib.lazy_string_concat(
Expand Down
4 changes: 2 additions & 2 deletions lua/neorg/modules/core/keybinds/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ module.load = function()
module.required["core.autocommands"].enable_autocommand("BufLeave")

if module.config.public.hook then
neorg.callbacks.on_event(
neorg.callbacks.on_event( ---@diagnostic disable-line -- TODO: type error workaround <pysan3>
"core.keybinds.events.enable_keybinds",
function(_, keybinds) ---@diagnostic disable-line -- TODO: type error workaround <pysan3>
function(_, keybinds)
module.config.public.hook(keybinds)
end
)
Expand Down
8 changes: 4 additions & 4 deletions lua/neorg/modules/core/tangle/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -430,18 +430,18 @@ module.on_event = function(event)

for file, content in pairs(tangles) do
vim.loop.fs_open(
vim.fn.expand(file),
vim.fn.expand(file), ---@diagnostic disable-line -- TODO: type error workaround <pysan3>
"w",
438,
function(err, fd) ---@diagnostic disable-line -- TODO: type error workaround <pysan3>
function(err, fd)
file_count = file_count - 1
assert(not err, lib.lazy_string_concat("Failed to open file '", file, "' for tangling: ", err))

vim.loop.fs_write(
fd,
fd, ---@diagnostic disable-line -- TODO: type error workaround <pysan3>
table.concat(content, "\n"),
0,
function(werr) ---@diagnostic disable-line -- TODO: type error workaround <pysan3>
function(werr)
assert(
not werr,
lib.lazy_string_concat("Failed to write to file '", file, "' for tangling: ", werr)
Expand Down
8 changes: 4 additions & 4 deletions lua/neorg/modules/core/upgrade/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,10 @@ module.on_event = function(event)
assert(not err, lib.lazy_string_concat("Failed to open file '", path, "' for upgrade: ", err))

vim.loop.fs_write(
fd,
fd, ---@diagnostic disable-line -- TODO: type error workaround <pysan3>
output,
0,
function(werr) ---@diagnostic disable-line -- TODO: type error workaround <pysan3>
function(werr)
assert(
not werr,
lib.lazy_string_concat("Failed to write to file '", path, "' for upgrade: ", werr)
Expand Down Expand Up @@ -372,10 +372,10 @@ module.on_event = function(event)
)

vim.loop.fs_write(
fd,
fd, ---@diagnostic disable-line -- TODO: type error workaround <pysan3>
output,
0,
function(werr) ---@diagnostic disable-line -- TODO: type error workaround <pysan3>
function(werr)
assert(
not werr,
lib.lazy_string_concat(
Expand Down

0 comments on commit 3f531c3

Please sign in to comment.