From add84dd9cc8d8f6dde1ee95778c587adc4d40f67 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Tue, 17 Oct 2023 11:19:18 -0500 Subject: [PATCH 1/2] Add slyp as a pre-commit hook --- .pre-commit-config.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 275f8f5e5..ce79ed75a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,6 +38,10 @@ repos: hooks: - id: isort name: "Sort python imports" +- repo: https://github.com/sirosen/slyp + rev: 0.1.1 + hooks: + - id: slyp - repo: https://github.com/codespell-project/codespell rev: v2.2.6 hooks: From 1518e2351009d1862394626a137a263ed94a45d2 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Tue, 17 Oct 2023 13:01:58 -0500 Subject: [PATCH 2/2] Resolve lint errors reported by slyp --- tests/unit/experimental/test_auth_requirements_error.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/unit/experimental/test_auth_requirements_error.py b/tests/unit/experimental/test_auth_requirements_error.py index 31298b64f..9defe786f 100644 --- a/tests/unit/experimental/test_auth_requirements_error.py +++ b/tests/unit/experimental/test_auth_requirements_error.py @@ -416,8 +416,10 @@ def test_backward_compatibility_consent_required_error(): ( # missing 'authorization_parameters' _variants.LegacyAuthorizationParametersError, {}, - "'authorization_parameters' must be a 'LegacyAuthorizationParameters' " - "object or a dictionary", + ( + "'authorization_parameters' must be a 'LegacyAuthorizationParameters' " + "object or a dictionary" + ), ), ( # missing 'code' _variants.LegacyConsentRequiredTransferError,