Skip to content

Commit

Permalink
upgrade: codebase upgrade for plugin compatibility with python 3.12. C…
Browse files Browse the repository at this point in the history
…loses overhangio#72
  • Loading branch information
Abdul-Muqadim-Arbisoft committed Mar 4, 2024
1 parent 9ad65ba commit 62ebc3b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tutorindigo/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import typing as t

import pkg_resources
import importlib_resources
from tutor import hooks
from tutor.__about__ import __version_suffix__

Expand Down Expand Up @@ -39,8 +39,11 @@
}

# Theme templates
hooks.Filters.ENV_TEMPLATE_ROOTS.add_item(
pkg_resources.resource_filename("tutorindigo", "templates")
hooks.Filters.ENV_TEMPLATE_ROOTS.add_items(
[
# Root paths for template files, relative to the project root.
str(importlib_resources.files("tutorindigo") / "templates"),
]
)
# This is where the theme is rendered in the openedx build directory
hooks.Filters.ENV_TEMPLATE_TARGETS.add_items(
Expand All @@ -57,7 +60,7 @@
# init script: set theme automatically
with open(
os.path.join(
pkg_resources.resource_filename("tutorindigo", "templates"),
str(importlib_resources.files("tutorindigo") / "templates"),
"indigo",
"tasks",
"init.sh",
Expand Down

0 comments on commit 62ebc3b

Please sign in to comment.