From 763d2a475206e03c922cde0cbf36ac037af15cb7 Mon Sep 17 00:00:00 2001 From: Michael Flaxman Date: Thu, 8 Jun 2023 10:24:36 -0500 Subject: [PATCH 01/12] stop failing flake8 --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index fe9c8b7..5499968 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,4 +1,4 @@ [flake8] ignore=E125,E203,E226,E501,W503 -exclude=pbkdf2.py,siphash.py,__init__.py,*/lib/*,*.venv3/* +exclude=pbkdf2.py,siphash.py,__init__.py,*/lib/*,*.venv3/*,tests_wycheproof_generate.py max-line-length=127 From 72465ee280848da7adcef524b98c10e6bcdae71c Mon Sep 17 00:00:00 2001 From: Michael Flaxman Date: Thu, 8 Jun 2023 10:30:30 -0500 Subject: [PATCH 02/12] black to setup.cfg --- setup.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.cfg b/setup.cfg index 5499968..bfefe09 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,3 +2,7 @@ ignore=E125,E203,E226,E501,W503 exclude=pbkdf2.py,siphash.py,__init__.py,*/lib/*,*.venv3/*,tests_wycheproof_generate.py max-line-length=127 + +[isort] +profile = black +exclude=tests_wycheproof_generate.py From 225e8158b1f53dcd1f9ec03ab9eca6f722e8feb9 Mon Sep 17 00:00:00 2001 From: Michael Flaxman Date: Thu, 8 Jun 2023 10:39:07 -0500 Subject: [PATCH 03/12] use setup.cfg for black --- .github/workflows/libsec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/libsec.yml b/.github/workflows/libsec.yml index b7dfb03..b62069e 100644 --- a/.github/workflows/libsec.yml +++ b/.github/workflows/libsec.yml @@ -46,7 +46,7 @@ jobs: flake8 . --count --statistics - name: Lint with black run: | - black . --diff --check + black . --diff --check --config setup.cfg - name: pytest CLI singlesig run: | # We retry these 3x if needed, which is a disgusting hack but GH is really buggy for CLI apps From 03e2d09b106546db164da178e16366d375ffc6c1 Mon Sep 17 00:00:00 2001 From: Michael Flaxman Date: Thu, 8 Jun 2023 10:43:43 -0500 Subject: [PATCH 04/12] spaces --- setup.cfg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.cfg b/setup.cfg index bfefe09..7796d63 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,8 +1,8 @@ [flake8] -ignore=E125,E203,E226,E501,W503 -exclude=pbkdf2.py,siphash.py,__init__.py,*/lib/*,*.venv3/*,tests_wycheproof_generate.py -max-line-length=127 +ignore = E125,E203,E226,E501,W503 +exclude = pbkdf2.py,siphash.py,__init__.py,*/lib/*,*.venv3/*,tests_wycheproof_generate.py +max-line-length = 127 [isort] profile = black -exclude=tests_wycheproof_generate.py +exclude = tests_wycheproof_generate.py From b56ea4a707becc8b4645e2a905af445be452f07a Mon Sep 17 00:00:00 2001 From: Michael Flaxman Date: Thu, 8 Jun 2023 10:51:01 -0500 Subject: [PATCH 05/12] tool.blacki --- setup.cfg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 7796d63..00277d4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,6 +3,5 @@ ignore = E125,E203,E226,E501,W503 exclude = pbkdf2.py,siphash.py,__init__.py,*/lib/*,*.venv3/*,tests_wycheproof_generate.py max-line-length = 127 -[isort] -profile = black +[tool.black] exclude = tests_wycheproof_generate.py From cd21298cf43ff610980ab3861ce3f627d6f1fa04 Mon Sep 17 00:00:00 2001 From: Michael Flaxman Date: Thu, 8 Jun 2023 11:07:38 -0500 Subject: [PATCH 06/12] remove spaces and black from setup.cfg --- setup.cfg | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/setup.cfg b/setup.cfg index 00277d4..5499968 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,4 @@ [flake8] -ignore = E125,E203,E226,E501,W503 -exclude = pbkdf2.py,siphash.py,__init__.py,*/lib/*,*.venv3/*,tests_wycheproof_generate.py -max-line-length = 127 - -[tool.black] -exclude = tests_wycheproof_generate.py +ignore=E125,E203,E226,E501,W503 +exclude=pbkdf2.py,siphash.py,__init__.py,*/lib/*,*.venv3/*,tests_wycheproof_generate.py +max-line-length=127 From 0d879cf263da77800662860d4c52bd95d46c2bc2 Mon Sep 17 00:00:00 2001 From: Michael Flaxman Date: Thu, 8 Jun 2023 11:08:56 -0500 Subject: [PATCH 07/12] break out settings for flake8 and black since they don't play nicely together --- setup.cfg => .flake8 | 0 pyproject.toml | 7 +++++++ 2 files changed, 7 insertions(+) rename setup.cfg => .flake8 (100%) create mode 100644 pyproject.toml diff --git a/setup.cfg b/.flake8 similarity index 100% rename from setup.cfg rename to .flake8 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b8afc9e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,7 @@ +[tool.black] +extend-exclude = ''' +/( + # You can add more by starting lines with | + | tests_wycheproof_generate.py +)/ +''' From ef4469c1086ada5f8b1122a5f1ad1bf7844a6458 Mon Sep 17 00:00:00 2001 From: Michael Flaxman Date: Thu, 8 Jun 2023 11:11:48 -0500 Subject: [PATCH 08/12] get rid of setup.cfg reference --- .github/workflows/libsec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/libsec.yml b/.github/workflows/libsec.yml index b62069e..b7dfb03 100644 --- a/.github/workflows/libsec.yml +++ b/.github/workflows/libsec.yml @@ -46,7 +46,7 @@ jobs: flake8 . --count --statistics - name: Lint with black run: | - black . --diff --check --config setup.cfg + black . --diff --check - name: pytest CLI singlesig run: | # We retry these 3x if needed, which is a disgusting hack but GH is really buggy for CLI apps From 9deef16c0db1ccdfd6b16c79c74d328bcb30f1b6 Mon Sep 17 00:00:00 2001 From: Michael Flaxman Date: Thu, 8 Jun 2023 11:16:28 -0500 Subject: [PATCH 09/12] specify config --- .github/workflows/libsec.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/libsec.yml b/.github/workflows/libsec.yml index b7dfb03..c69f38a 100644 --- a/.github/workflows/libsec.yml +++ b/.github/workflows/libsec.yml @@ -43,10 +43,10 @@ jobs: - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names - flake8 . --count --statistics + flake8 . --count --statistics --config .flake8 - name: Lint with black run: | - black . --diff --check + black . --diff --check --config pyproject.toml - name: pytest CLI singlesig run: | # We retry these 3x if needed, which is a disgusting hack but GH is really buggy for CLI apps From 4226cc356b745d31d21db3a57b593d2e5e6d1d64 Mon Sep 17 00:00:00 2001 From: Michael Flaxman Date: Thu, 8 Jun 2023 11:22:18 -0500 Subject: [PATCH 10/12] another way to exclude this file --- .github/workflows/libsec.yml | 2 +- pyproject.toml | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 pyproject.toml diff --git a/.github/workflows/libsec.yml b/.github/workflows/libsec.yml index c69f38a..a2a9773 100644 --- a/.github/workflows/libsec.yml +++ b/.github/workflows/libsec.yml @@ -46,7 +46,7 @@ jobs: flake8 . --count --statistics --config .flake8 - name: Lint with black run: | - black . --diff --check --config pyproject.toml + black . --diff --check --exclude *tests_wycheproof_generate.py* - name: pytest CLI singlesig run: | # We retry these 3x if needed, which is a disgusting hack but GH is really buggy for CLI apps diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index b8afc9e..0000000 --- a/pyproject.toml +++ /dev/null @@ -1,7 +0,0 @@ -[tool.black] -extend-exclude = ''' -/( - # You can add more by starting lines with | - | tests_wycheproof_generate.py -)/ -''' From eb388fcfd84c740b428023f84c6d8cf00370f963 Mon Sep 17 00:00:00 2001 From: Michael Flaxman Date: Thu, 8 Jun 2023 11:27:10 -0500 Subject: [PATCH 11/12] regex --- .github/workflows/libsec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/libsec.yml b/.github/workflows/libsec.yml index a2a9773..6107991 100644 --- a/.github/workflows/libsec.yml +++ b/.github/workflows/libsec.yml @@ -46,7 +46,7 @@ jobs: flake8 . --count --statistics --config .flake8 - name: Lint with black run: | - black . --diff --check --exclude *tests_wycheproof_generate.py* + black . --diff --check --exclude='tests_wycheproof_generate.py' - name: pytest CLI singlesig run: | # We retry these 3x if needed, which is a disgusting hack but GH is really buggy for CLI apps From 03d277521ce6d4527972e4ba64607522edc74a60 Mon Sep 17 00:00:00 2001 From: Michael Flaxman Date: Thu, 8 Jun 2023 11:32:14 -0500 Subject: [PATCH 12/12] simplify --- .github/workflows/libsec.yml | 2 +- .flake8 => setup.cfg | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename .flake8 => setup.cfg (100%) diff --git a/.github/workflows/libsec.yml b/.github/workflows/libsec.yml index 6107991..e3ee4e6 100644 --- a/.github/workflows/libsec.yml +++ b/.github/workflows/libsec.yml @@ -43,7 +43,7 @@ jobs: - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names - flake8 . --count --statistics --config .flake8 + flake8 . --count --statistics - name: Lint with black run: | black . --diff --check --exclude='tests_wycheproof_generate.py' diff --git a/.flake8 b/setup.cfg similarity index 100% rename from .flake8 rename to setup.cfg