Skip to content

Commit

Permalink
Merge pull request #926 from lsst-sqre/u/neophile
Browse files Browse the repository at this point in the history
[neophile] Update dependencies
  • Loading branch information
neophile-square[bot] authored Jan 3, 2024
2 parents ec582ad + 0db21e2 commit 8318115
Show file tree
Hide file tree
Showing 7 changed files with 1,020 additions and 976 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.8
rev: v0.1.9
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -28,13 +28,13 @@ repos:
- id: eslint
additional_dependencies:
- '@babel/[email protected]'
- '@babel/preset-react@7.22.15'
- eslint@8.55.0
- '@babel/preset-react@7.23.3'
- eslint@8.56.0
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- eslint-plugin-import@2.28.1
- eslint-plugin-import@2.29.1
- [email protected]
- [email protected]
- [email protected]
Expand Down
876 changes: 442 additions & 434 deletions requirements/dev.txt

Large diffs are not rendered by default.

642 changes: 329 additions & 313 deletions requirements/main.txt

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/gafaelfawr/handlers/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,9 @@ async def _error_system(
if slack_client:
await slack_client.post_exception(exc)
return templates.TemplateResponse(
context.request,
"login-error.html",
context={
"request": context.request,
"error": error,
"message": error.value,
"details": str(exc),
Expand Down Expand Up @@ -366,9 +366,9 @@ def _error_user(
else:
context.logger.warning("Authentication failed", error=error.value)
return templates.TemplateResponse(
context.request,
"login-error.html",
context={
"request": context.request,
"error": error,
"message": error.value,
"details": details,
Expand Down
10 changes: 5 additions & 5 deletions src/gafaelfawr/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
from __future__ import annotations

from fastapi.templating import Jinja2Templates
from jinja2 import PackageLoader
from jinja2 import Environment, PackageLoader

__all__ = ["templates"]

# Starlette requires a directory argument, but since we override the loader so
# that the templates are retrieved from the Python package, it's unused.
templates = Jinja2Templates(
loader=PackageLoader("gafaelfawr", package_path="templates"),
directory="templates",
env=Environment(
loader=PackageLoader("gafaelfawr", package_path="templates"),
autoescape=True,
),
)
"""The template manager."""
2 changes: 1 addition & 1 deletion tests/models/oidc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_authorization_lifetime() -> None:
token=Token(),
)
assert authorization.lifetime <= OIDC_AUTHORIZATION_LIFETIME
assert OIDC_AUTHORIZATION_LIFETIME - 2 <= authorization.lifetime
assert authorization.lifetime >= OIDC_AUTHORIZATION_LIFETIME - 2

lifetime = timedelta(seconds=OIDC_AUTHORIZATION_LIFETIME)
authorization.created_at = current_datetime() - lifetime
Expand Down
Loading

0 comments on commit 8318115

Please sign in to comment.