My code is automatically formatted by the formatter, and it adds blank lines that I do not want. This happens while using both autopep8
and black
. This is my code:
dict_n = {}
def new_dash():
new_list = input("do something ").split(",")
for i in range(len(new_list)):
# dict_n[new_list[i]] = [i]
dict_n[i] = new_list[i]
print(dict_n)
new_dash()
which gets formatted to:
dict_n = {}
def new_dash():
new_list = input("do something ").split(",")
for i in range(len(new_list)):
# dict_n[new_list[i]] = [i]
dict_n[i] = new_list[i]
print(dict_n)
new_dash()
Is there a way I can prevent the extra lines being added automatically by the formatter, possibly by editing the settings.json file in VSCode?