diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 19624b8c..78551f30 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -55,10 +55,12 @@ repos: hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - - repo: https://github.com/psf/black - rev: 23.9.1 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.1.8 hooks: - - id: black + - id: ruff + args: [--fix, --exit-non-zero-on-fix] + - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.7.1 hooks: diff --git a/src/ghga_connector/core/api_calls/work_package.py b/src/ghga_connector/core/api_calls/work_package.py index 90676b43..66b31f11 100644 --- a/src/ghga_connector/core/api_calls/work_package.py +++ b/src/ghga_connector/core/api_calls/work_package.py @@ -99,9 +99,7 @@ def _check_public_key(self, token: str): base64.b64decode(token.split(".", 2)[1]).decode("utf-8") )["user_public_crypt4gh_key"] != base64.b64encode( self.my_public_key - ).decode( - "ascii" - ) + ).decode("ascii") except Exception: # pylint: disable=broad-exception-caught mismatch = False if mismatch: