diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 578d17f769..ad23a3c895 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,6 +11,11 @@ repos: rev: "v2.7.1" hooks: - id: prettier + - repo: https://github.com/asottile/pyupgrade + rev: v3.15.0 + hooks: + - id: pyupgrade + args: [--py38-plus] - repo: https://github.com/pre-commit/mirrors-mypy rev: "v1.7.1" # Use the sha / tag you want to point at hooks: diff --git a/CHANGELOG.md b/CHANGELOG.md index 560df29775..e81fb7093b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - Fix incorrectly failing linting if 'modules' was not found in meta.yml ([#2447](https://github.com/nf-core/tools/pull/2447)) - Correctly pass subworkflow linting test if `COMPONENT.out.versions` is used in the script ([#2448](https://github.com/nf-core/tools/pull/2448)) +- Add pyupgrade to pre-commit config and dev requirements as mentioned in [#2200](https://github.com/nf-core/tools/issues/2200) - Check for spaces in modules container URLs ([#2452](https://github.com/nf-core/tools/issues/2452)) - Correctly ignore `timeline.enabled`, `report.enabled`, `trace.enabled`, `dag.enabled` variables when linting a pipeline. ([#2507](https://github.com/nf-core/tools/pull/2507)) - Lint nf-test main.nf.test tags include all used components in chained tests ([#2572](https://github.com/nf-core/tools/pull/2572)) diff --git a/requirements-dev.txt b/requirements-dev.txt index 3ef0593085..13dba6f30d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -8,6 +8,7 @@ Sphinx sphinx-rtd-theme mypy types-PyYAML +pyupgrade types-requests types-jsonschema types-Markdown