You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.
If I don't activate the venv, it says that, for example, mypy isn't installed.
If I activate the venv, everything works.
If I install, for example, mypy. It will get the one from Mason.
Any way to have a check on getting the version from that json file if exists? If not, then use Mason one?
This is what I've tried:
local fs = require("plenary.path")
local cwd = fs.new(vim.fn.getcwd())
local pyrightconfigFile = cwd / "pyrightconfig.json"
local prefer_local = false
if pyrightconfigFile:exists() then
local data = vim.json.decode(pyrightconfigFile:read())
local venvPath = data.venvPath .. "/" .. data.venv
prefer_local = venvPath .. "/bin"
end
nls.builtins.diagnostics.mypy.with({
prefer_local = prefer_local,
}),
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a pyrightconfig.json file on my folder that has the configuration of my venv.
If I don't activate the venv, it says that, for example, mypy isn't installed.
If I activate the venv, everything works.
If I install, for example, mypy. It will get the one from Mason.
Any way to have a check on getting the version from that json file if exists? If not, then use Mason one?
This is what I've tried:
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions