プラグインflake8
でpythonチェッカーとして設定しました。問題は、プロジェクトに実行時syntastic
にいくつかの追加パスが追加されていることです。sys.path
これらのパスを設定する場所が必要です。そうしないと、チェッカーが文句を言い続け[F0401] Unable to import 'module'
ます。では、どこでこれを行うことができますか。
アップデート
インポートエラーを訴えるのは pylint チェッカーであることが判明しました。flake8 はこれを気にしないようです。以下はflake8の出力です。そして、pylint plz でこれを修正するための解決策は、次の質問を参照してください: PyLint "Unable to import" error - how to 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
また、@ lcd047 の回答は、Python インタープリターを使用する他のプラグインに役立つ場合があります。ただし、pylint エラーは修正されません。
$ echo $PYTHONPATH
/cygdrive/c/---------------/
$ pylint TestListPage.py
************* Module TestListPage
W: 7,0: Found indentation with tabs instead of spaces
...
C: 45,0: Line too long (95/80)
...
C: 1,0: Missing docstring
F: 3,0: Unable to import 'guis'