Skip to content

edge case: shell cmd prefix #129

Open
@siebrenf

Description

@siebrenf

We use some... unconventional... syntax in several rules. This may not even be worth your attention, but FYI.

minimal example:

rule break_snakefmt_044:
    shell:
        ("conditional prefix" if True else "") +
        """\
        cmd
        """

error:

snakefmt.exceptions.InvalidPython: Got error:
'''
Cannot parse: 1:40: ("conditional prefix" if True else "") +
'''
while formatting code with black.

P.S. This was the last issue I found while formatting our code 🎉

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions