Skip to content

Commit

Permalink
Merge pull request #261 from openedx/farhan/improvements
Browse files Browse the repository at this point in the history
Minor improvement
  • Loading branch information
farhan authored Oct 8, 2024
2 parents 9007307 + adf5c89 commit 77b999c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions done/done.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import uuid

import importlib.resources
from web_fragments.fragment import Fragment
from xblock.core import XBlock
from xblock.fields import Boolean, DateTime, Float, Scope, String
Expand All @@ -25,9 +24,8 @@ def _(text):


def resource_string(path):
"""Handy helper for getting resources from our kit."""
data = importlib.resources.files(__package__).joinpath(path)
return data.read_text(encoding="utf8")
"""Retrieves the contents of a file as a string from the specified path."""
return resource_loader.load_unicode(path)


@XBlock.needs('i18n')
Expand Down

0 comments on commit 77b999c

Please sign in to comment.