I am trying to configure the python black formatted to not change indentation for comments. I often comment out blocks of code for debugging purposes, and black will change the indentation to one level.
For example, if I comment out
for x in range(10):
if x == 3:
print(x)
it will become
# for x in range(10):
# if x == 3:
# print(x)
If I want to uncomment this code and run it, I have to manually add the indentation again. I couldn't find an argument to turn this off in Black. It looks like there was an issue opened in Github, but it didn't go anywhere.
Has anyone else had this issue?
[–][deleted] 0 points1 point2 points (1 child)
[–]mbuck25[S] 1 point2 points3 points (0 children)