aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2019-04-19 17:59:55 +0100
committerGravatar Gareth Coles <[email protected]>2019-04-19 17:59:55 +0100
commit14e98f1e790c85e761c9ead44160ac1174f808d2 (patch)
treecd362664b5a3c5501338fa76d12589e702374676 /pydis_site/apps
parentTests for templatetags (diff)
Lint and update django-simple-bulma
Diffstat (limited to 'pydis_site/apps')
-rw-r--r--pydis_site/apps/home/templatetags/wiki_extra.py4
-rw-r--r--pydis_site/apps/home/tests/test_wiki_templatetags.py5
-rw-r--r--pydis_site/apps/home/urls.py2
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