Skip to content

Formatting Guide

Brice Letcher edited this page Mar 26, 2020 · 3 revisions

Here we explicitly describe how snakefmt will handle formatting of snakemake files.

Design

We run black on python code. For the rest, we follow black's (and therefore PEP8) style.

Rules

Rules are treated the same as python's class. Meaning they will have two newlines above and below (with comments being excluded).

Examples

Before

rule a:
    input: "foo.txt"
# this function does f all
def f():
    pass

After

rule a:
    input: 
        "foo.txt"


# this function does f all
def f():
    pass
Clone this wiki locally