elpy icon indicating copy to clipboard operation
elpy copied to clipboard

Flake8 5.0 broken

Open jotsif opened this issue 2 years ago • 2 comments

Summary

When upgrading to flake8 5.0.x which was released a couple of days ago, flycheck no longer shows flake8 errors. Downgrading to flake8 4.0.1 solves the issue.

Steps to reproduce

Upgrade to flake8 5.0.x

My configuration

OS

MacOS12.4 apple silicon.

Result of (elpy-config)

Elpy Configuration

Emacs.............: 28.1
Elpy..............: 1.35.0
Virtualenv........: .venv (/Users/joseflindmanhornlund/github.com/fluendo/smartcut/.venv)
Interactive Python: python3 3.9.13 (/Users/joseflindmanhornlund/github.com/fluendo/smartcut/.venv/bin/python3)
RPC virtualenv....: .venv (/Users/joseflindmanhornlund/github.com/fluendo/smartcut/.venv)
 Python...........: python 3.9.13 (/Users/joseflindmanhornlund/github.com/fluendo/smartcut/.venv/bin/python)
 Jedi.............: 0.17.2 (0.18.1 available)
 Autopep8.........: 1.6.0
 Yapf.............: Not found (0.32.0 available)
 Black............: 22.6.0
Syntax checker....: flake8 (/Users/joseflindmanhornlund/github.com/fluendo/smartcut/.venv/bin/flake8)

Elpy configuration in my init.el

(use-package elpy
  :ensure t
  :init
  (elpy-enable)
  :config
  (setq elpy-rpc-virtualenv-path 'current))

(add-hook 'elpy-mode-hook (lambda ()
                            (add-hook 'before-save-hook
                                      'elpy-black-fix-code nil t)))

(setq elpy-rpc-backend "jedi")
(setq jedi:complete-on-dot t)

jotsif avatar Aug 04 '22 11:08 jotsif

Also stumbled upon this, I haven't dug more in depth but the first impression is that flake8 5.0.x+ emits coloured (i.e., with ANSI escape sequences) output indiscriminately which in turn partially confuses flycheck.

vytas7 avatar Aug 20 '22 14:08 vytas7

At least the colour issue might have been already fixed: https://github.com/flycheck/flycheck/issues/1969.

vytas7 avatar Aug 20 '22 14:08 vytas7

Works with latest flycheck in my setup. So closing.

jotsif avatar Oct 30 '22 10:10 jotsif