Skip to content

Commit a5e60bd

Browse files
committed
Update from flake8 to ruff
Fixes timtroendle#36
1 parent 290c051 commit a5e60bd

File tree

8 files changed

+41
-11
lines changed

8 files changed

+41
-11
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2017-2022 Tim Tröndle
1+
Copyright (c) 2017-2024 Tim Tröndle
22

33
Permission is hereby granted, free of charge, to any person obtaining
44
a copy of this software and associated documentation files (the

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The generated repository will have the following structure:
7474
├── tests <- Automatic tests of the source code go in here.
7575
│ └── test_model.py <- Demo file.
7676
├── .editorconfig <- Editor agnostic configuration settings.
77-
├── .flake8 <- Linting settings for flake8.
77+
├── .ruff <- Linter and formatter settings for ruff.
7878
├── .gitignore
7979
├── environment.yaml <- A file to create an environment to execute your project in.
8080
├── LICENSE.md <- MIT license description
@@ -87,7 +87,7 @@ The generated repository will have the following structure:
8787
```
8888
├── envs
8989
│ └── shell.yaml <- An environment for shell rules.
90-
├── profiles <- Snakemake profiles.
90+
├── profiles
9191
│ └── cluster <- Cluster Snakemake profile folder.
9292
│ └── config.yaml <- Cluster Snakemake profile.
9393
├── rules

cluster/{{cookiecutter.project_short_name}}/.flake8

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../default/{{cookiecutter.project_short_name}}/.ruff

default/{{cookiecutter.project_short_name}}/.flake8

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
line-length = 88
2+
preview = true # required to activate many pycodestyle errors and warnings as of 2024-05-01
3+
builtins = ["snakemake"]
4+
5+
[format]
6+
quote-style = "double"
7+
indent-style = "space"
8+
docstring-code-format = false
9+
line-ending = "auto"
10+
11+
[lint]
12+
select = [
13+
# pycodestyle errors
14+
"E",
15+
# pycodestyle warnings
16+
"W",
17+
# Pyflakes
18+
"F",
19+
# pyupgrade
20+
"UP",
21+
# flake8-bugbear
22+
"B",
23+
# flake8-simplify
24+
"SIM",
25+
# isort
26+
"I",
27+
]
28+
ignore = [
29+
# here and below, rules are redundant with formatter, see
30+
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
31+
"E501",
32+
"W191",
33+
"E111",
34+
"E114",
35+
"E117",
36+
]

default/{{cookiecutter.project_short_name}}/Snakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ configfile: "config/default.yaml"
66
include: "./rules/sync.smk"
77
localrules: all, report, clean
88
{%- endif %}
9-
min_version("7.8")
9+
min_version("8.10")
1010

1111
{% if cookiecutter._add_cluster_infrastructure == True -%}
1212
onstart:

default/{{cookiecutter.project_short_name}}/environment.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ channels:
44
- bioconda
55
dependencies:
66
- python=3.11
7-
- flake8=3.8.3
87
- snakemake-minimal=8.10.7

0 commit comments

Comments
 (0)