Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No emit message in "missing whitespace around operator" #1110

Closed
moylop260 opened this issue Sep 14, 2016 · 5 comments · Fixed by #3577
Closed

No emit message in "missing whitespace around operator" #1110

moylop260 opened this issue Sep 14, 2016 · 5 comments · Fixed by #3577
Labels
Minor 💅 Polishing pylint is always nice Won't fix/not planned

Comments

@moylop260
Copy link
Contributor

moylop260 commented Sep 14, 2016

Steps to reproduce

  1. Use the following code var = 3+0
  2. Run flake8 --show-source --select=E226 file.py
  3. See the outuput: file.py:1:6: E226 missing whitespace around arithmetic operator
  4. Run pylint -d invalid-name,missing-docstring file.py

Current behaviour

Not emit messages.

Expected behaviour

Should we emit the message of missing whitespace around operator?

pylint --version output

pylint 1.6.4,
astroid 1.4.8
Python 2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]
@AWhetter
Copy link
Contributor

I agree that we should have a message for this.

@PCManticore
Copy link
Contributor

I think we don't have to mimic any flake8 or PEP 8 message for that matter, it would be an effort spent on things which are already handled quite well by other tools. I use pep8 in combination with pylint all the time, since I don't expect pylint to follow PEP 8 to the heart. That is, if anyone is willing to provide the code for such a check, I would not mind adding in, but I don't want to spend time on implementing it either.

@Pierre-Sassoulas
Copy link
Member

We're not going to merge new formatting check as black and other tools handle this better than pylint and we removed bad-whitespace in #3577 and bad-continuation in #3571.

@Ashark
Copy link

Ashark commented Jun 13, 2022

It looks strange this bug is closed.
For those who came from google and want to enable such warning in vs code, I just switched to flake8 with such settings.json:

{
    "python.linting.enabled": true,
    "python.linting.flake8Enabled": true,
    "python.linting.flake8Args": [
    ],
}

And in panel I now can see the error I want:
image

@Pierre-Sassoulas
Copy link
Member

I'd suggest using black to autoformat your code, you don't have to waste time adding a linter to warn about whitespaces around operator then also waste time by fixing them manually.

@Pierre-Sassoulas Pierre-Sassoulas added Won't fix/not planned and removed Help wanted 🙏 Outside help would be appreciated, good for new contributors labels Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Minor 💅 Polishing pylint is always nice Won't fix/not planned
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants