diff options
Diffstat (limited to 'pydis_site/apps/home')
-rw-r--r-- | pydis_site/apps/home/templatetags/wiki_extra.py | 4 | ||||
-rw-r--r-- | pydis_site/apps/home/tests/test_wiki_templatetags.py | 5 | ||||
-rw-r--r-- | pydis_site/apps/home/urls.py | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/pydis_site/apps/home/templatetags/wiki_extra.py b/pydis_site/apps/home/templatetags/wiki_extra.py index a6861fd9..9847ef5a 100644 --- a/pydis_site/apps/home/templatetags/wiki_extra.py +++ b/pydis_site/apps/home/templatetags/wiki_extra.py @@ -1,4 +1,4 @@ -from typing import Union, Dict, Type, Any +from typing import Any, Dict, Type, Union from django import template from django.forms import BooleanField, BoundField, CharField, Field, ImageField, ModelChoiceField @@ -34,7 +34,7 @@ def get_unbound_field(field: BoundField) -> Field: def render(template_path: str, context: Dict[str, Any]): - return mark_safe(get_template(template_path).render(context)) + return mark_safe(get_template(template_path).render(context)) # noqa: S703 S308 @register.simple_tag diff --git a/pydis_site/apps/home/tests/test_wiki_templatetags.py b/pydis_site/apps/home/tests/test_wiki_templatetags.py index 6399c0b6..201d3df4 100644 --- a/pydis_site/apps/home/tests/test_wiki_templatetags.py +++ b/pydis_site/apps/home/tests/test_wiki_templatetags.py @@ -1,6 +1,9 @@ from unittest.mock import Mock, create_autospec -from django.forms import BooleanField, BoundField, CharField, ChoiceField, Field, Form, ImageField, ModelChoiceField +from django.forms import ( + BooleanField, BoundField, CharField, ChoiceField, Field, Form, ImageField, + ModelChoiceField +) from django.template import Context, Template from django.test import TestCase from wiki.editors.markitup import MarkItUpWidget diff --git a/pydis_site/apps/home/urls.py b/pydis_site/apps/home/urls.py index 34ceda40..6d144aaa 100644 --- a/pydis_site/apps/home/urls.py +++ b/pydis_site/apps/home/urls.py @@ -1,7 +1,7 @@ from django.conf import settings from django.conf.urls.static import static from django.contrib import admin -from django.urls import path, include +from django.urls import include, path from django.views.generic import TemplateView |