mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-06-05 12:29:39 +02:00
Moved mod_str function from forms.py back to stats.py, and black formatting.
This commit is contained in:
@@ -30,6 +30,11 @@ from dungeonsheets.features import (
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def mod_str(modifier):
|
||||
"""Converts a modifier to a string, eg 2 -> '+2'."""
|
||||
return "{:+d}".format(modifier)
|
||||
|
||||
|
||||
AbilityScore = namedtuple("AbilityScore", ("value", "modifier", "saving_throw"))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user