However, coc-python does not invoke pylint in the working directory of the source file you are editing. So, I created a script called pylint-in-file-dir:
#!/bin/zsh
last_arg=${*[-1]}
dir_of_file=${last_arg:a:h}
cd $dir_of_file
~/.local/bin/pylint $*
Then, I edited coc-settings.json to use pylint-in-file-dir:
It would be useful to be able to customize the
PYTHONPATH
used bypylint
on a per-project basis.I found a work-around, although it is somewhat circuitous.
First, I created a
.pylintrc
file in the directory of the python script, with content that adds to the path:However,
coc-python
does not invokepylint
in the working directory of the source file you are editing. So, I created a script calledpylint-in-file-dir
:Then, I edited
coc-settings.json
to usepylint-in-file-dir
:This ultimately achieved the desired result.