From 72105497c9e12167bd7f491a56f0b594c4d6c738 Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Mon, 13 Jan 2025 16:10:35 +0100 Subject: [PATCH] fix: updated pre-commit, and fixed false positives --- .pre-commit-config.yaml | 4 ++-- diracx-core/src/diracx/core/models.py | 2 +- diracx-routers/src/diracx/routers/utils/users.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6dd26a93..01464fcc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - id: check-added-large-files - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.8.3' + rev: 'v0.9.1' hooks: - id: ruff args: ["--fix"] @@ -24,7 +24,7 @@ repos: - id: black - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.13.0 + rev: v1.14.1 hooks: - id: mypy additional_dependencies: diff --git a/diracx-core/src/diracx/core/models.py b/diracx-core/src/diracx/core/models.py index 6361818a..ca5598d7 100644 --- a/diracx-core/src/diracx/core/models.py +++ b/diracx-core/src/diracx/core/models.py @@ -50,7 +50,7 @@ class TokenResponse(BaseModel): # Based on RFC 6749 access_token: str expires_in: int - token_type: str = "Bearer" + token_type: str = "Bearer" # noqa: S105 refresh_token: str | None = None diff --git a/diracx-routers/src/diracx/routers/utils/users.py b/diracx-routers/src/diracx/routers/utils/users.py index bfd5f9b5..69c2a4ae 100644 --- a/diracx-routers/src/diracx/routers/utils/users.py +++ b/diracx-routers/src/diracx/routers/utils/users.py @@ -61,9 +61,9 @@ class AuthSettings(ServiceSettingsBase): # TODO: this should probably be something mandatory # to set by the user - token_issuer: str = "http://lhcbdirac.cern.ch/" + token_issuer: str = "http://lhcbdirac.cern.ch/" # noqa: S105 token_key: TokenSigningKey - token_algorithm: str = "RS256" + token_algorithm: str = "RS256" # noqa: S105 access_token_expire_minutes: int = 20 refresh_token_expire_minutes: int = 60