Skip to content

linnik/flycheck-pyre

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flycheck-pyre

MELPA

Flycheck support for the Pyre type checker

Setup

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)

Troubleshooting

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

About

Flycheck support for the Pyre type checker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published