zakissimo
zakissimo

Reputation: 53

How to get Pylint to display code smells in coc.nvim ? (Refactor issues)

I'm using Coc with coc-pyright and as suggested in the documentation I edited my coc-settings.json to display :

{
"python.linting.pylintEnabled": true
}

Despite all of that, whenever I write a "smelly" code, I don't get any notifications. (I do get errors if the code doesn't work, but nothing related to refactoring).

Exemple :

if foo > 1 and foo < 2:
    return bar

This is not flagged, when I should get : "[R1716 chained-comparison] : ["Simplify chained comparison between the operands"] was reported by Pylint."

The valid way being :

if 1 < foo < 2:
    return bar

Should I look into using a different plugin ?

Upvotes: 0

Views: 1857

Answers (1)

fannheyward
fannheyward

Reputation: 19287

By default, coc-pyright runs Pylint with a limit rules that ignore the chained-comparison.

This has been fixed in latest coc-pyright, :CocUpdate to latest release and try again.

Upvotes: 2

Related Questions