Skip to content

Commit

Permalink
make imports in numbasobject relative
Browse files Browse the repository at this point in the history
and fixes a syntax error in a regexp in examparser
  • Loading branch information
christianp committed Sep 25, 2024
1 parent b1d306d commit a139936
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/examparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def strcons_fix(data):
out = '%i' % int(data)
elif is_number(data):
out = '%.14f' % float(data)
out = re.sub(r'(\.\d*[1-9])0*$','\g<1>',out)
out = re.sub(r'(\.\d*[1-9])0*$',r'\g<1>',out)
else:
out=data
return strcons(out)
Expand Down
4 changes: 2 additions & 2 deletions bin/numbasobject.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# load an exam from a source file, migrating it to the latest version if necessary
from examparser import ExamParser
from migrations import migrations
from .examparser import ExamParser
from .migrations import migrations
import json

NUMBAS_FILE_PREFIX = '// Numbas version: '
Expand Down

0 comments on commit a139936

Please sign in to comment.