Open krassowski opened 3 years ago
Three thoughts:
yield
and return
as well, as it is likely that the user may be already using a formatter which strips whitespaces from ends of lines.else
we could try to detect whether we are in a ternary expression or not using AST.Sounds good to me.
There is a number of keywords which are always followed by space or colon in Python:
Many editors modify their insert text to automatically add space/colon in such situations. I would propose that python-lsp-server does the same. Example implementation: https://github.com/krassowski/python-language-server/pull/5/files
Opening to get opinions and feedback.