0

With VS Code, when I use a linter like Flake8 or Pylint, it will underline sections of the code, and when I hover it will tell me the code of the rule being broken and a description.

I would like to have the same functionality but for formatters like pep8 or black. But it seems all they can do it format on save, or format as a command. I would like to have this information more visible so I can understand the rules more, and decide if I want to change the default formatter rules for my project. Right now I have to just save, and try to guess what's been changed or do a diff of the file before/after.

I don't see any options in the format settings to make this info visible for python code.

draav
  • 1,454
  • 8
  • 8

1 Answers1

1

There isn't any such settings as the formatters themselves don't provide this sort of information. All they do is provide is a diff which then gets applied to your file. There isn't any information provided to say exactly which part of a line would be changed.

Brett Cannon
  • 14,438
  • 3
  • 45
  • 40
  • hmm, that gives me an idea, i could probably just look at the diff git provides after i save a file. I still don't entirely understand the reasoning behind why this doesn't exist. But I have a pseudo-solution for now. thanks – draav Jan 07 '20 at 03:16