Emacs: How do I set flycheck to Python 3?

后端 未结 4 1521
没有蜡笔的小新
没有蜡笔的小新 2021-02-12 19:01

I\'ve installed flycheck for Emacs Python on Ubuntu 15.04.

However, when using the tool it reports false positives like print(item, end=\' \') is wrong synt

4条回答
  •  孤独总比滥情好
    2021-02-12 19:37

    Flycheck has a number of checkers for each supported language (and many more provided by the community). Nearly all of them use external tools to check buffers and most of them can be configured.

    The easiest way to find out what checkers are supported and how to configure them is by introspection. Open a python file and call flycheck-verify-setup or press C-c ! v. This shows you a new buffer with a list of syntax checkers used in python-mode. Every checker is a hyperlink to the documentation where it is described and the configuration options are given.

    Since I don't have python-flake8 nor python-pylint I just set the variable flycheck-python-pycompile-executable to "python3" and all is bright and cheerful.

提交回复
热议问题