From d29e311275b31467fdb131163def79e9dcfe9da7 Mon Sep 17 00:00:00 2001 From: Ben Mares Date: Thu, 15 Dec 2022 20:51:56 +0100 Subject: [PATCH] Downgrade flake8 pre-commit for py37 compatibility Aesara's minimum-supported Python version is 3.7, and it's probably really convenient to develop with that version in order to avoid using incompatible language features. Then of course you want to run pre-commit, but for that you either need a higher version of Python (>=3.8.1) or a lower (<=5.0.4) version of flake8. It seems to me like the most straightforward solution is to revert flake8 to 5.0.4 (the second-most-recent release, August) until Aesara drops support for Python 3.7. --- .pre-commit-config.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 207171eeaa..8c9a442f89 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,10 +25,11 @@ repos: - id: black language_version: python3 - repo: https://github.com/pycqa/flake8 - rev: 6.0.0 + # NOTE: flake8 v6 requires python >=3.8.1 but + # Aesara still supports python 3.7. + rev: 5.0.4 hooks: - id: flake8 - language_version: python39 - repo: https://github.com/pycqa/isort rev: 5.10.1 hooks: