snakefmt adds wrong indentation
See original GitHub issueIt looks like snakefmt 0.4.4
adds wrong indentations when formatting a snakemake rule containing a if-else-closure.
As an example the following output will be created for a proper formatted rule:
--- original
+++ new
params:
datasources=(
"-s {}".format(" ".join(config["annotations"]["dgidb"]["datasources"]))
- if config["annotations"]["dgidb"].get("datasources", "")
- else ""
+ if config["annotations"]["dgidb"].get("datasources", "")
+ else ""
),
output:
"results/calls/{prefix}.dgidb.bcf",
A minimal example is attached. Snakefile.zip
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Indentation Error in Python | How to Solve it - Edureka
This article will provide you with a detailed understanding of Indentation error in Python and the solutions to avoid the same.
Read more >snakefmt - PyPI
As snakefmt has a Conda recipe, there is a matching image built for each version by Biocontainers. ... Return code 123 means there...
Read more >Documentation - Doom Emacs v21.12 documentation
This module adds text rotation; the ability to cycle through keywords or text patterns at point. e.g. Swapping true and false . 7.5.11....
Read more >Formatting convention (#43) · Issues · IMP / IMP3 · GitLab
automatic formatter: Snakefmt, based on Black. References: ... add comments where possible; one place for all helper functions.
Read more >تويتر \ Brice Letcher على تويتر: "Snakefmt version 0.2.4 https://t ...
(better error handling in vim plugin) and jfear (version control ... Added pre-commit hook integration (@jfear) [#81] Fixed Proper indentation of nested ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think this label could get a
help wanted
label? Assuming it’s doable for a non-maintainer to tackle.I wonder if anyone would like to test out #164 as that fixes the two examples in this issue?