black_notes
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
black_notes [2021/01/28 20:32] – [configure pycharm with black] raju | black_notes [2022/02/18 22:45] (current) – [do not convert single quotes to double quotes] raju | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== configure pycharm with black ==== | + | ==== configure pycharm |
+ | To run black on the entire file | ||
< | < | ||
File -> Settings | File -> Settings | ||
-> Tools -> External Tools -> click on + sign | -> Tools -> External Tools -> click on + sign | ||
- | -> Name = Black | + | -> Name: Black |
- | | + | |
| | ||
| | ||
Line 10: | Line 11: | ||
</ | </ | ||
- | Ref:- | + | To run black on selected text |
+ | < | ||
+ | File -> Settings | ||
+ | -> Tools -> External Tools -> click on + sign | ||
+ | -> Name: Black Selected | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | Restart pycharm after adding the external tools. | ||
+ | |||
+ | To format code | ||
+ | < | ||
+ | Select code of interest | ||
+ | -> Tools -> External Tools -> Black Selected | ||
+ | </ | ||
+ | |||
+ | |||
+ | See also :- | ||
+ | * [[https:// | ||
* https:// | * https:// | ||
- | * - simpler implementation; | + | * https:// |
+ | |||
+ | |||
+ | ==== do not convert single quotes to double quotes ==== | ||
+ | pass '' | ||
+ | |||
+ | Ref:- | ||
+ | * https:// | ||
+ | |||
==== useful links ==== | ==== useful links ==== |
black_notes.1611865973.txt.gz · Last modified: 2021/01/28 20:32 by raju