skip to Main Content

I wrote the code below on VSCode:

"""Say Hello"""

print("Hello"    )

Then, Flake8 extension can show E202 error for print("Hello" ) as shown below:

enter image description here

whitespace before ‘)’ Flake8(E202)

But, Pylint extension cannot show E202 error for print("Hello" ) as shown below:

enter image description here

So, how can I enable Pylint extension to show E202 error on VSCode?

2

Answers


  1. pylint does not have a rule to catch that type of issues.

    If I use the CLI commands, I can see that pylint does not show this as a problem:

    $ cat /tmp/a.py
    print("Hello"  )
    
    $ pylint /tmp/a.py
    ************* Module a
    /tmp/a.py:1:0: C0114: Missing module docstring (missing-module-docstring)
    
    ------------------------------------------------------------------
    Your code has been rated at 0.00/10 (previous run: 0.00/10, +0.00)
    
    $ flake8 /tmp/a.py
    /tmp/a.py:2:15: E202 whitespace before ')'
    

    So, the pylint extension does not show it.

    Login or Signup to reply.
  2. The bad-whitespace error has been removed from pylint. check this issue

    all messages are here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search