From 8dfcd118e5a90a4b21a5cd70721ceabdbbec3488 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Helle=C5=9Ben?= Date: Sun, 22 Mar 2026 00:34:01 +0100 Subject: [PATCH] Fix pyright attribute access issues in test_sitemaps and fix import in views --- core/tests/test_sitemaps.py | 4 ++-- core/views.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/tests/test_sitemaps.py b/core/tests/test_sitemaps.py index 4486791..c833d26 100644 --- a/core/tests/test_sitemaps.py +++ b/core/tests/test_sitemaps.py @@ -23,7 +23,7 @@ def test_sitemap_static_contains_expected_links( youtube apps as well as some misc static files like /robots.txt. """ # Ensure deterministic BASE_URL - settings.BASE_URL = "https://ttvdrops.lovinator.space" + settings.BASE_URL = "https://ttvdrops.lovinator.space" # pyright: ignore[reportAttributeAccessIssue] response = client.get(reverse("sitemap-static")) assert response.status_code == 200 @@ -31,7 +31,7 @@ def test_sitemap_static_contains_expected_links( locs = _extract_locs(response.content) - base = settings.BASE_URL.rstrip("/") + base = settings.BASE_URL.rstrip("/") # pyright: ignore[reportAttributeAccessIssue] expected_paths = [ reverse("core:dashboard"), diff --git a/core/views.py b/core/views.py index 464ded6..2c6e8b1 100644 --- a/core/views.py +++ b/core/views.py @@ -22,8 +22,8 @@ from django.http import Http404 from django.http import HttpRequest from django.http import HttpResponse from django.shortcuts import render -from django.shortcuts import reverse from django.template.defaultfilters import filesizeformat +from django.urls import reverse from django.utils import timezone from kick.models import KickChannel