diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7ca000a1b6969157da0e2a20581d627fa44359cc..7c6abe26e5dbbfe19be1ff744c1befde37c39f47 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,6 +20,11 @@ repos: rev: v2.8.2 hooks: - id: pylint +- repo: https://github.com/asottile/pyupgrade + rev: v2.23.3 + hooks: + - id: pyupgrade + args: [--py36-plus] - repo: https://github.com/Lucas-C/pre-commit-hooks rev: v1.1.10 hooks: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 277ef82362ea9e8d80121c75c267aac9fd521b37..6895824e1f3f915ddd3e00239cf16545bc9dd18b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ main <− ###_feature_branch ## Pre-commit We are using [`pre-commit`](https://pre-commit.com/) tool to perform checks on staged changes before committing. -We are using it for `black` formatting, `isort` imports sorting, `pylint` code linting, `mypy` typing, and `gitlab-ci` linting. +We are using it for `black` formatting, `isort` imports sorting, `pylint` code linting, `pyupgrade` syntax upgrader, `mypy` typing, and `gitlab-ci` linting. Install `pre-commit` from your distribution. In case it is an outdated version, install it from `pip`: ```bash