Files
cave.nvim/lua/cave/python/runnable.lua
2024-10-02 14:58:20 +02:00

32 lines
878 B
Lua

local Meta = require "cave.meta"
local Task = require "cave.task"
---@class cave.Python.Runnable : cave.Task
local Runnable = Meta.derive("Python.Runnable", Task)
---@return cave.Python.Script?
---@return cave.Python.Module?
function Runnable:concrete() return self:script(), self:module() end
---@return cave.Python.Script?
function Runnable:script() end
---@return cave.Python.Module?
function Runnable:module() end
---@class cave.Python.Runnable.Factory : cave.Task.Factory
local Factory = Meta.derive("Python.Runnable.Factory", Task.Factory)
---@return cave.Python.Runnable
function Factory:build() error "Not implemented" end
---@return cave.Python.Runnable
function Factory:copy() error "Not implemented" end
---@param runnable cave.Python.Runnable
function Factory:init_runnable(runnable) self:init_task(runnable) end
Runnable.Factory = Factory
return Runnable