aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-core/managers/pip3/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/mason-core/managers/pip3/init.lua')
-rw-r--r--lua/mason-core/managers/pip3/init.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/lua/mason-core/managers/pip3/init.lua b/lua/mason-core/managers/pip3/init.lua
index d4eb07b6..078f4c3d 100644
--- a/lua/mason-core/managers/pip3/init.lua
+++ b/lua/mason-core/managers/pip3/init.lua
@@ -27,7 +27,7 @@ local function with_receipt(packages)
end
---@async
----@param packages { [number]: string, bin: string[] | nil }: The pip packages to install. The first item in this list will be the recipient of the requested version, if set.
+---@param packages { [number]: string, bin: string[]? } The pip packages to install. The first item in this list will be the recipient of the requested version, if set.
function M.packages(packages)
return function()
return M.install(packages).with_receipt()
@@ -35,7 +35,7 @@ function M.packages(packages)
end
---@async
----@param packages { [number]: string, bin: string[] | nil }: The pip packages to install. The first item in this list will be the recipient of the requested version, if set.
+---@param packages { [number]: string, bin: string[]? } The pip packages to install. The first item in this list will be the recipient of the requested version, if set.
function M.install(packages)
local ctx = installer.context()
local pkgs = _.list_copy(packages)
@@ -90,7 +90,7 @@ function M.normalize_package(pkg)
end
---@async
----@param receipt InstallReceipt
+---@param receipt InstallReceipt<InstallReceiptPackageSource>
---@param install_dir string
function M.check_outdated_primary_package(receipt, install_dir)
if receipt.primary_source.type ~= "pip3" then
@@ -121,8 +121,8 @@ function M.check_outdated_primary_package(receipt, install_dir)
:map(function(pkg)
return {
name = normalized_package,
- current_version = assert(pkg.version),
- latest_version = assert(pkg.latest_version),
+ current_version = assert(pkg.version, "missing current pip3 package version"),
+ latest_version = assert(pkg.latest_version, "missing latest pip3 package version"),
}
end)
:or_else_throw "Primary package is not outdated."
@@ -130,7 +130,7 @@ function M.check_outdated_primary_package(receipt, install_dir)
end
---@async
----@param receipt InstallReceipt
+---@param receipt InstallReceipt<InstallReceiptPackageSource>
---@param install_dir string
function M.get_installed_primary_package_version(receipt, install_dir)
if receipt.primary_source.type ~= "pip3" then