rhythmic-morning-87313
07/13/2022, 3:56 PMpython-default
environment? For instance, when using Vim, I need to activate the venv for the Vim ALE/LSP plugins to auto-detect and utilize the tools like flake8, black, etc.hundreds-father-404
07/15/2022, 6:43 PMrhythmic-morning-87313
07/17/2022, 3:14 AMdist/export/python/virtualenvs/tools/flake8/bin/flake8
), but for Vim ALE and similars, I could activate only one venv (python-default
) at a time and don't have access to the tools.rhythmic-morning-87313
07/17/2022, 3:49 AMrhythmic-morning-87313
07/17/2022, 4:10 AMpoetry run flake8
for example)rhythmic-morning-87313
07/17/2022, 4:10 AMrhythmic-morning-87313
07/17/2022, 1:43 PMset exrc
to the user-level vimrc and put the following in the .vimrc
of the build root:
let g:ale_python_flake8_executable = 'dist/export/python/virtualenvs/tools/flake8/bin/flake8'
let g:ale_python_isort_executable = 'dist/export/python/virtualenvs/tools/isort/bin/isort'
let g:ale_python_mypy_executable = 'dist/export/python/virtualenvs/tools/mypy/bin/mypy'
let g:ale_python_mypy_options = '--python-executable=dist/export/python/virtualenvs/python-default/3.10.5/bin/python'
let g:ale_fixers = {'python': ['isort']}
let g:ale_fix_on_save = 1
rhythmic-morning-87313
07/17/2022, 1:44 PM--python-executable
is crucial to make it able to find the stubs and external dependenciesrhythmic-morning-87313
07/17/2022, 1:44 PMmypy_path = "stubs:src"
in mypy.ini or pyproject.toml)rhythmic-morning-87313
07/17/2022, 1:45 PM