From d14e1b1a1927b07c235f7b9d5320d03f31c07032 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Wed, 24 Apr 2024 11:54:15 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=9A=9A=20Don't=20run=20autopep8=20on?= =?UTF-8?q?=20tests=20directory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `autopep8` has a bug on Python 3.12 where it may change the contents of f-strings, which breaks our tests which assert that some string is literally equal to another string. https://github.com/hhatto/autopep8/issues/712 --- .pre-commit-config.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a59dc71fe27..5e116d16a89 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,11 @@ repos: rev: v2.1.0 hooks: - id: autopep8 + # autopep8 has a bug on Python 3.12 where it may change the contents of f-strings, which + # breaks our tests which assert that some string is literally equal to another string. + # https://github.com/hhatto/autopep8/issues/712 + exclude: '^tests/' - repo: https://github.com/pycqa/flake8 rev: 7.0.0 hooks: - - id: flake8 \ No newline at end of file + - id: flake8 From 3209e328b26e9092532f4a0e234f68a32d0d0987 Mon Sep 17 00:00:00 2001 From: Rico Hermans Date: Wed, 24 Apr 2024 12:17:07 +0200 Subject: [PATCH 2/2] Update .pre-commit-config.yaml --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5e116d16a89..3eb32657109 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - id: autopep8 # autopep8 has a bug on Python 3.12 where it may change the contents of f-strings, which # breaks our tests which assert that some string is literally equal to another string. - # https://github.com/hhatto/autopep8/issues/712 + # https://github.com/hhatto/autopep8/issues/744 exclude: '^tests/' - repo: https://github.com/pycqa/flake8 rev: 7.0.0