black_notes
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
black_notes [2020/12/29 18:13] – raju | black_notes [2022/02/18 22:45] (current) – [do not convert single quotes to double quotes] raju | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ==== configure pycharm to format code with black ==== | ||
+ | To run black on the entire file | ||
+ | < | ||
+ | File -> Settings | ||
+ | -> Tools -> External Tools -> click on + sign | ||
+ | -> Name: Black | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | 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:// | ||
+ | |||
+ | |||
+ | ==== do not convert single quotes to double quotes ==== | ||
+ | pass '' | ||
+ | |||
+ | Ref:- | ||
+ | * https:// | ||
+ | |||
+ | |||
+ | |||
==== useful links ==== | ==== useful links ==== | ||
* https:// | * https:// | ||
* code repo - https:// | * code repo - https:// | ||
black_notes.1609265589.txt.gz · Last modified: 2020/12/29 18:13 by raju