-
Jean-Sébastien Caux authored68a56f5d
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
helpers.py 357 B
__copyright__ = "Copyright © Stichting SciPost (SciPost Foundation)"
__license__ = "AGPL v3"
import re
from .exceptions import PaperNumberError
def paper_nr_string(nr):
if nr < 10:
return "00" + str(nr)
elif nr < 100:
return "0" + str(nr)
elif nr < 1000:
return str(nr)
else:
raise PaperNumberError(nr)