jorgenschaefer / elpy

Emacs Python Development Environment
GNU General Public License v3.0
1.9k stars 260 forks source link

Inline errors not displaying #1407

Closed jamespo closed 3 years ago

jamespo commented 6 years ago

Summary

elpy-check works but I don't get the squiggly lines under errors... it used to work; not sure what's changed.

Steps to reproduce

Load a python file. Make bad edit & save

My configuration

OS

Fedora Core 28

Result of (elpy-config)

Virtualenv........: misc36 (/home/james/.virtualenvs/misc36)
RPC Python........: 3.6.5 (/home/james/.virtualenvs/misc36/bin/python)
Interactive Python: python (/home/james/.virtualenvs/misc36/bin/python)
Emacs.............: 26.1
Elpy..............: 1.22.0
Jedi..............: 0.12.1
Rope..............: 0.9.4-1
Autopep8..........: 1.3.5
Yapf..............: 0.22.0
Black.............: 18.6b4
Syntax checker....: flake8 (/home/james/.virtualenvs/misc36/bin/flake8)

Elpy configuration in my init.el

(let ((pyvenv-workon-starts-python nil))
  (pyvenv-workon "misc36"))
(defalias 'workon 'pyvenv-workon)
(elpy-enable)
(custom-set-variables
'(elpy-modules
   (quote
    (elpy-module-company elpy-module-eldoc elpy-module-flymake elpy-module-pyvenv elpy-module-highlight-indentation elpy-module-yasnippet elpy-module-django elpy-module-sane-defaults)))
)
galaunay commented 6 years ago

I think Emacs 26.1 happens. Because python.el now provides a flymake backend, elpy was modified to use it in place of elpy's own backend.

It appears that after this switch, flymake uses flake8, but elpy-check still use the default linter (pyflakes), which may explain why you get workings checks, but no squiggly lines.

Just to check if flymake works properly, what is the result of M-x flymake-show-diagnostics-buffer ?

jamespo commented 6 years ago

Yes, it could well be due to emacs 26.1

M-x flymake-show-diagnostics-buffer isn't found for me

However, I've noticed if I run flymake-python-pyflakes-load I get the desired behaviour so I've added this as a hook to python-mode for now.

galaunay commented 6 years ago

That is unexpected, the new version of flymake (featuring the "diagnostics" functions) should be shipped with Emacs 26.1.

In fact I just checked from the Emacs 26.1 sources and it is.