Format on save with black isn't working
See original GitHub issueWhen saving a file, [coc.nvim] Formatted with black
is printed, but the file isn’t changed. Running call CocAction('format')
also prints the message, but the file is then updated. The output from :CocCommand workspace.showOutput
is as follows:
########## active formattor: black
execPath: black
moduleName: black
args: --diff,--quiet,/home/devneal/github/manim/manim/mobject/mobject.py.2c210016803c1db7200eb6ec681835ba.py
########## black output:
--- /home/devneal/github/manim/manim/mobject/mobject.py.2c210016803c1db7200eb6ec681835ba.py 2020-12-30 05:10:36.386043 +0000
+++ /home/devneal/github/manim/manim/mobject/mobject.py.2c210016803c1db7200eb6ec681835ba.py 2020-12-30 05:10:37.032054 +0000
@@ -1317,8 +1317,10 @@
self.method = getattr(self.mobject.generate_target(), method_name)
def build(*method_args, **method_kwargs):
self.method(*method_args, **method_kwargs)
- return _MethodAnimation(self.mobject, self.method, method_args, method_kwargs)
+ return _MethodAnimation(
+ self.mobject, self.method, method_args, method_kwargs
+ )
return build
It seems like a temp file may be being formatted instead of the actual file, but I don’t know if this is expected.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:36 (17 by maintainers)
Top Results From Across the Web
Formatter black is not working on my VSCode...but why?
I use Black from inside VSCode and it rocks. It frees mental cycles that you would spend deciding how to format your code....
Read more >Black formatting is not applied (but black runs) #18561 - GitHub
Issue Type: Bug Behaviour When formatting a *.py file with black, no changes are applied. I can see in the log black being...
Read more >Setting up python Black on Visual Studio Code | by Marco Belo
Type “format on save” at the search bar on top of the Settings tab and check the box. Search for “python formatting provider”...
Read more >Black 22.12.0 documentation
Black makes code review faster by producing the smallest diffs possible. Blackened code looks the same regardless of the project you're reading. Formatting...
Read more >Differences between the OpenDocument Spreadsheet (.ods ...
Area Subarea Level of Support
Excel for Microsoft 365 and Excel 2021
Formatting Row Heights/Column widths Supported. Appearance should be similar.
Formatting Cell Supported
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 FreeTop 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
Top GitHub Comments
The latest coc has added
coc.preferences.willSaveHandlerTimeout
, you can increase this time limitation.in my
.nvimrc
file worked for me