An error message "Invalid path mode '\' in: No newline at end of file" pops up when for formatting document.
See original GitHub issueDescribe the bug
Steps to Reproduce
- Check Formatter (Tools/Options/Text Editor/Python/Formatting) is
black
(default) - Type
######this is a comment
import os,sys;
spam( ham [ 1 ], { eggs : 2 } )
def foo ():pass
x=1;y =2;
y = 2
#comment no newline
- Go to Edit > Advanced >Format Document
Expected behavior
The package is successfully installed and the code is automatically formatted.
Additional context and screenshots
An error message pops up. This issue reproduced when set Tools/Options/Text Editor/Python/Formatting to black
and autopep8
, do not reproduce when set yapf
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Formatter black is not working on my VSCode...but why?
No formatting happens. It appears that black isn't working. Try running black from the command line to see if there are error messages....
Read more >rsa - SSH Suddenly returning Invalid format
This stopped working without any changes. On a little thinking I replaced the "path to public key file" above with "path to private...
Read more >Clang-Format Style Options — Clang 18.0.0git documentation
Clang-Format Style Options describes configurable formatting style options supported by LibFormat and ClangFormat. When using clang-format command line utility ...
Read more >Errors while processing latex files
This web page tries to give some help with error messages that may pop up while processing your ... LaTeX Error: Command \end{itemize}...
Read more >File.WriteAllLines Method (System.IO)
Creates a new file, writes one or more strings to the file, and then closes the file. ... path is invalid (for example,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
black and yapf are both broken in PTVS currently. I’m digging into this.
autopep8 formats as expected:
I’ve fixed this particular issue, but it looks like we have other issues with the formatting code. I’m investigating.