Flycheck support for the Pyre type checker
Install pyre and watchman
pip install pyre-check
brew install watchman
Init Pyre and startup a background daemon. For more information visit Pyre's documentation
pyre init
pyre check
pyre start
Add to your .init.el
:
(require 'flycheck)
(require 'flycheck-pyre)
(eval-after-load 'flycheck
'(add-hook 'flycheck-mode-hook #'flycheck-pyre-setup))
(defun my/configure-python-mode-flycheck-checkers ()
;; configure all your checkers for python-mode here
(flycheck-mode)
(flycheck-select-checker 'python-pyre)
)
(add-hook 'python-mode-hook #'my/configure-python-mode-flycheck-checkers)
Undefined import [21]: Could not find a module corresponding to import
If you are using a virtualenv and/or have a .pth
files in your site-packages
directory, then you should include these paths manually via --search-path
when starting a daemon
pyre \
--search-path /Users/dev/.virtualenvs/env/lib/python3.7/site-packages \
--search-path /Users/dev/workspace/libfoo \
--search-path /Users/dev/workspace/libbar \
start