python - How to configure paths to import from for flake8 in syntastic -
i configured flake8
python checker in syntastic
plugin. problem project has paths added sys.path
@ runtime. need somewhere configure paths, otherwise checker keep complaining [f0401] unable import 'module'
. can this.
update
turns out pylint checker complains import error. flake8 seems not care this. following output of flake8. , solution fix pylint plz refer question:pylint "unable import" error - how set pythonpath?
$ flake8 testlistpage.py testlistpage.py:7:1: w191 indentation contains tabs testlistpage.py:8:1: w191 indentation contains tabs testlistpage.py:9:1: w191 indentation contains tabs testlistpage.py:10:1: w191 indentation contains tabs testlistpage.py:12:1: w191 indentation contains tabs testlistpage.py:13:1: w191 indentation contains tabs testlistpage.py:15:1: w191 indentation contains tabs testlistpage.py:16:1: w191 indentation contains tabs testlistpage.py:18:1: w191 indentation contains tabs
also answer of @lcd047 may other plugins using python interpreter. not fix pylint error.
$ echo $pythonpath /cygdrive/c/---------------/ $ pylint testlistpage.py ************* module testlistpage w: 7,0: found indentation tabs instead of spaces ... c: 45,0: line long (95/80) ... c: 1,0: missing docstring f: 3,0: unable import 'guis'
set environment variable pythonpath
either before running vim:
pythonpath='/some/dir:/some/other/dir' vim /path/to/your/file.py
or vim itself:
let $pythonpath='/some/dir:/some/other/dir'
Comments
Post a Comment