Loading README.md +12 −4 Changes for README.md: 12 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -638,21 +638,29 @@ $ where black %LocalAppData%\Programs\Python\Python36-32\Scripts\black.exe # possible location ``` 3. Open External tools in PyCharm with `File -> Settings -> Tools -> External Tools`. 3. Open External tools in PyCharm On macOS: ```PyCharm -> Preferences -> Tools -> External Tools``` On Windows / Linux / BSD: ```File -> Settings -> Tools -> External Tools``` 4. Click the + icon to add a new external tool with the following values: - Name: Black - Description: Black is the uncompromising Python code formatter. - Program: <install_location_from_step_2> - Arguments: `$FilePath$` - Arguments: `"$FilePath$"` 5. Format the currently opened file by selecting `Tools -> External Tools -> black`. - Alternatively, you can set a keyboard shortcut by navigating to `Preferences -> Keymap -> External Tools -> External Tools - Black`. - Alternatively, you can set a keyboard shortcut by navigating to `Preferences or Settings -> Keymap -> External Tools -> External Tools - Black`. 6. Optionally, run Black on every file save: 1. Make sure you have the [File Watcher](https://plugins.jetbrains.com/plugin/7177-file-watchers) plugin installed. 2. Go to `Preferences -> Tools -> File Watchers` and click `+` to add a new watcher: 2. Go to `Preferences or Settings -> Tools -> File Watchers` and click `+` to add a new watcher: - Name: Black - File type: Python - Scope: Project Files Loading Loading
README.md +12 −4 Changes for README.md: 12 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -638,21 +638,29 @@ $ where black %LocalAppData%\Programs\Python\Python36-32\Scripts\black.exe # possible location ``` 3. Open External tools in PyCharm with `File -> Settings -> Tools -> External Tools`. 3. Open External tools in PyCharm On macOS: ```PyCharm -> Preferences -> Tools -> External Tools``` On Windows / Linux / BSD: ```File -> Settings -> Tools -> External Tools``` 4. Click the + icon to add a new external tool with the following values: - Name: Black - Description: Black is the uncompromising Python code formatter. - Program: <install_location_from_step_2> - Arguments: `$FilePath$` - Arguments: `"$FilePath$"` 5. Format the currently opened file by selecting `Tools -> External Tools -> black`. - Alternatively, you can set a keyboard shortcut by navigating to `Preferences -> Keymap -> External Tools -> External Tools - Black`. - Alternatively, you can set a keyboard shortcut by navigating to `Preferences or Settings -> Keymap -> External Tools -> External Tools - Black`. 6. Optionally, run Black on every file save: 1. Make sure you have the [File Watcher](https://plugins.jetbrains.com/plugin/7177-file-watchers) plugin installed. 2. Go to `Preferences -> Tools -> File Watchers` and click `+` to add a new watcher: 2. Go to `Preferences or Settings -> Tools -> File Watchers` and click `+` to add a new watcher: - Name: Black - File type: Python - Scope: Project Files Loading