snakemake / snakefmt

The uncompromising Snakemake code formatter
MIT License
153 stars 29 forks source link

Pre-commit hook fails on recommended template #178

Closed chillenzer closed 1 year ago

chillenzer commented 1 year ago

Hi,

this is mostly an FYI and maybe a reference for other users running into this:

Using the recommended github template from here: https://github.com/snakemake-workflows/snakemake-workflow-template the pre-commit hook fails with

SyntaxError: L3: '[' in 'module' is not a valid identifier

This is because of the file .template/workflow/Snakefile.tmpl.tmpl that apparently gets parsed as a Snakefile which is bound to fail. Deleting the not very helpful .template folder resolves this issue. Not 100% sure what the latter is good for but that might be a scenario one wants to handle more gracefully from your side.

Best, Julian

mbhall88 commented 1 year ago

Adding the .template directory to the --exclude option is probably the best way to go about this. I'll add that to the default