Background/Situation
PyCharm 2026.2 rebuilt the integration with external Python tools (Black, Ruff, mypy, Pyright). The dedicated Settings | Tools | Black page from 2026.1, including its "On save" checkbox, was removed. After upgrading, Black no longer runs on save. The new combined settings page offers no visible on-save option: enabling Black there activates only its "On code reformat" mode, and the Actions on Save page has no Black entry.
Question
How to make Black format Python files on save in PyCharm 2026.2?
Answer
- Enable Black in Settings | Python | Tools | External Tools.
- In Settings | Tools | Actions on Save, enable Reformat code.
In 2026.2, Black is registered as the formatting service for Python files, so the standard reformat action delegates to it. A separate Black row does not exist on the Actions on Save page. The Activated On selector next to Reformat code controls which save events trigger formatting.
Running black as a File Watcher is not a recommended alternative: File Watchers trigger on every autosave and reformat the file while it is being edited.
Verified in PyCharm 2026.2 (build 262.8665.309).
Comments
0 comments
Please sign in to leave a comment.