Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 12, 2024
1 parent a6e7692 commit 02ae10b
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/ol_openedx_chat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
MIT's AI chatbot for Open edX
"""

__version__ = '0.1.0'
__version__ = "0.1.0"

default_app_config = "ol_openedx_chat.apps.OlOpenedxChatConfig"
6 changes: 2 additions & 4 deletions src/ol_openedx_chat/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@
"""

from django.apps import AppConfig
from edx_django_utils.plugins import PluginSettings, PluginURLs
from edx_django_utils.plugins import PluginSettings
from openedx.core.djangoapps.plugins.constants import ProjectType, SettingsType



class OlOpenedxChatConfig(AppConfig):
"""
Configuration for the ol_openedx_chat Django application.
"""

name = 'ol_openedx_chat'

name = "ol_openedx_chat"

plugin_app = {
PluginSettings.CONFIG: {
Expand Down
14 changes: 2 additions & 12 deletions src/ol_openedx_chat/block.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import pkg_resources
from django.template import Context, Template
from django.utils.translation import gettext_lazy as _
from web_fragments.fragment import Fragment
from xblock.core import XBlockAside


BLOCK_PROBLEM_CATEGORY = "problem"
MULTIPLE_CHOICE_TYPE = "multiplechoiceresponse"

Expand Down Expand Up @@ -38,16 +36,13 @@ class OLChatAside(XBlockAside):
XBlock aside that enables OL AI Chat functionality for an XBlock
"""


@XBlockAside.aside_for("student_view")
def student_view_aside(self, block, context=None): # noqa: ARG002
"""
Renders the aside contents for the student view
""" # noqa: D401
fragment = Fragment("")
fragment.add_content(
render_template("static/html/student_view.html")
)
fragment.add_content(render_template("static/html/student_view.html"))
return fragment

@XBlockAside.aside_for("author_view")
Expand All @@ -56,14 +51,9 @@ def author_view_aside(self, block, context=None): # noqa: ARG002
Renders the aside contents for the author view
""" # noqa: D401
fragment = Fragment("")
fragment.add_content(
render_template(
"static/html/studio_view.html"
)
)
fragment.add_content(render_template("static/html/studio_view.html"))
return fragment


@classmethod
def should_apply_to_block(cls, block):
"""
Expand Down
2 changes: 0 additions & 2 deletions src/ol_openedx_chat/docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@ Dependencies can be installed via the command below.
.. code-block:: bash
$ make requirements
1 change: 0 additions & 1 deletion src/ol_openedx_chat/docs/internationalization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,3 @@ a page on the site. Instead of plain English strings, you should see specially-a
like this:

Thé Fütüré øf Ønlïné Édüçätïøn Ⱡσяєм ι# Før änýøné, änýwhéré, änýtïmé Ⱡσяєм #

1 change: 1 addition & 0 deletions src/ol_openedx_chat/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ def plugin_settings(settings):
Populate settings
"""


DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
1 change: 0 additions & 1 deletion src/ol_openedx_chat/static/html/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@

{% endblock extra_js %}
{% endcomment %}

2 changes: 1 addition & 1 deletion src/ol_openedx_chat/static/html/student_view.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div>
<h3>THIS IS STUDENT VIEW</h3>
</div>
</div>
2 changes: 1 addition & 1 deletion src/ol_openedx_chat/static/html/studio_view.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div>
<h3>THIS IS STUDIO VIEW</h3>
</div>
</div>
3 changes: 1 addition & 2 deletions src/ol_openedx_chat/urls.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""
URLs for ol_openedx_chat.
"""
from django.urls import re_path # pylint: disable=unused-import
from django.views.generic import TemplateView # pylint: disable=unused-import


urlpatterns = [
# TODO: Fill in URL patterns and views here.
Expand Down

0 comments on commit 02ae10b

Please sign in to comment.