Skip to content

Commit 2490d95

Browse files
committed
fix: fix tests
1 parent 41c26a6 commit 2490d95

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

xblocks_contrib/discussion/discussion.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
"""TO-DO: Write a description of what this XBlock is."""
22

3-
from importlib.resources import files
4-
53
import logging
6-
import markupsafe
74
import urllib
5+
6+
import markupsafe
87
from django.conf import settings
98
from django.template.loader import render_to_string
109
from django.urls import reverse
@@ -62,8 +61,8 @@ def is_discussion_enabled(course_id): #pylint: disable=unused-argument
6261
# This Xblock is just to test the strucutre of xblocks-contrib
6362
@XBlock.needs("i18n")
6463
@XBlock.wants("user")
65-
class DiscussionXBlock(XBlock, StudioEditableXBlockMixin,
66-
LegacyXmlMixin): #pylint: disable=abstract-method
64+
# pylint: disable=abstract-method
65+
class DiscussionXBlock(XBlock, StudioEditableXBlockMixin, LegacyXmlMixin):
6766
"""
6867
Provides a discussion forum that is inline with other content in the courseware.
6968
"""
@@ -189,7 +188,7 @@ def add_resource_urls(self, fragment):
189188
for js_file in self.get_all_js_files():
190189
try:
191190
fragment.add_javascript(loader.load_unicode(js_file))
192-
except Exception as e:
191+
except Exception as e: # pylint: disable=broad-exception-caught
193192
# Fallback to URL if file can't be loaded inline
194193
log.warning("Could not load %s inline, using URL: %s", js_file, e)
195194

0 commit comments

Comments
 (0)