snakefmt
snakefmt copied to clipboard
Formatter mess up if-else statements indention
Take this input as an example, by running snakefmt, the indent will be wrong.
rule cutadapt:
input:
"a.txt"
output:
"b.txt"
run:
if (
"xxxxxxxxxxxxxxxxxxxxxx" not in wildcards.rn
and "yyyyyyyyyyyyyyyyyyyyyyyyyy" not in wildcards.rn
):
shell(
"""
cutadapt \
-m 30 \
{input} \
-o {output}
"""
)
else:
shell(
"""
cutadapt \
{input} \
-o {output}
"""
)
New space will be added on each run.
I figure out that the cause is from the if statment, which is too long.
This is probably a result of #151 I suspect. I'll try and take a look at it this week sorry.
This is not related to #151 in the end. Its a bit trickier. Leave it with me and I'll try get to the bottom of it soon.
This will be fixed in the next release