From e70720061241ddf15225263e6c4e5533aca27203 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 17:38:32 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/uv-pre-commit: 0.9.3 → 0.11.32](https://github.com/astral-sh/uv-pre-commit/compare/0.9.3...0.11.32) - [github.com/adamchainz/django-upgrade: 1.29.1 → 1.31.1](https://github.com/adamchainz/django-upgrade/compare/1.29.1...1.31.1) - [github.com/astral-sh/ruff-pre-commit: v0.14.6 → v0.16.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.6...v0.16.0) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 35e1f1e..13c9eb4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,13 +18,13 @@ repos: - repo: https://github.com/astral-sh/uv-pre-commit # uv version. - rev: 0.9.3 + rev: 0.11.32 hooks: # Update the uv lockfile - id: uv-lock - repo: https://github.com/adamchainz/django-upgrade - rev: "1.29.1" + rev: "1.31.1" hooks: - id: django-upgrade args: [--target-version, "4.2"] @@ -37,7 +37,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.14.6 + rev: v0.16.0 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From 0bec47cae2dd5f2dfcad3118ded22f4926fd57f3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 17:38:41 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- bigredbutton/apps.py | 2 +- bigredbutton/templatetags/user_agent_str.py | 13 +++++-------- bigredbutton/urls.py | 1 - manage.py | 2 +- tests/test_views.py | 2 +- tests/urls.py | 1 - 6 files changed, 8 insertions(+), 13 deletions(-) diff --git a/bigredbutton/apps.py b/bigredbutton/apps.py index c761e5b..53d4e68 100644 --- a/bigredbutton/apps.py +++ b/bigredbutton/apps.py @@ -11,7 +11,7 @@ class BigRedButtonConfig(AppConfig): @register() def check_session_engine(app_configs, **kwargs): errors = [] - if session_engine := getattr(settings, "SESSION_ENGINE"): + if session_engine := settings.SESSION_ENGINE: engine_name = session_engine.split('.')[0] engine = Engine.get_default() try: diff --git a/bigredbutton/templatetags/user_agent_str.py b/bigredbutton/templatetags/user_agent_str.py index 1d3f19d..4eb3749 100644 --- a/bigredbutton/templatetags/user_agent_str.py +++ b/bigredbutton/templatetags/user_agent_str.py @@ -1,10 +1,7 @@ -from typing import Optional - -from user_agents.parsers import Browser, Device, OperatingSystem, UserAgent from django import template from django.utils.translation import gettext_lazy as _ - +from user_agents.parsers import Browser, Device, OperatingSystem, UserAgent register = template.Library() @@ -13,7 +10,7 @@ def ua_str( ua: str | UserAgent, include_os: bool = False, include_versions: bool = False, -) -> Optional[str]: +) -> str | None: """ Return a human-readable string that summarizes a user agent from python-user-agents """ @@ -46,7 +43,7 @@ def ua_str( def ua_browser( ua_browser: Browser, include_version: bool = False, -) -> Optional[str]: +) -> str | None: """ Return a human-readable string that summarizes the browser from a user agent """ @@ -64,7 +61,7 @@ def ua_browser( def ua_os( ua_os: OperatingSystem, include_version: bool = False, -) -> Optional[str]: +) -> str | None: if include_version and ua_os.version_string: return _("{os} {version}").format( os=ua_os.family, @@ -78,7 +75,7 @@ def ua_os( @register.simple_tag(name="ua_device") def ua_device( ua_device: Device, -) -> Optional[str]: +) -> str | None: if ua_device.brand and ua_device.model: return _("{brand} {model}").format( brand=ua_device.brand, diff --git a/bigredbutton/urls.py b/bigredbutton/urls.py index 2dcba24..ef7d69c 100644 --- a/bigredbutton/urls.py +++ b/bigredbutton/urls.py @@ -5,7 +5,6 @@ SessionList, ) - urlpatterns = [ path('', SessionList.as_view(), name='list_sessions'), path('delete/others/', SessionDelete.as_view(), name='delete_other_sessions'), diff --git a/manage.py b/manage.py index 3745fc2..70d57d2 100644 --- a/manage.py +++ b/manage.py @@ -1,7 +1,7 @@ #!/usr/bin/env python -from pathlib import Path import os import sys +from pathlib import Path if __name__ == "__main__": sys.path.insert(0, Path(__file__).resolve()) diff --git a/tests/test_views.py b/tests/test_views.py index c776530..1eadb04 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -1,9 +1,9 @@ from datetime import timedelta from django.contrib.auth.models import User +from django.test import Client, TestCase from django.urls import reverse from django.utils.timezone import now -from django.test import Client, TestCase class ViewsTest(TestCase): diff --git a/tests/urls.py b/tests/urls.py index 2316917..5df3e29 100644 --- a/tests/urls.py +++ b/tests/urls.py @@ -1,6 +1,5 @@ from django.urls import include, path - urlpatterns = [ path("", include('bigredbutton.urls')), ]