First time here? Check out the FAQ!

Revision history  [back]

This happens if you enable the Editor > Auto-Formating > PEP8: Spaces after # preference. Autopep8, which is what is being used to do the reformatting, tries to see if the content of a comment is code and if so it doesn't reformat it, but that determination seems to be skipped when that option is enabled.

It looks like our default for this preference is currently to enable it, but given this quirk I'm thinking the default should instead be to disable it. We'll look into making that change in the future.