summaryrefslogtreecommitdiff
path: root/pint/formatting.py
diff options
context:
space:
mode:
authorKeewis <keewis@posteo.de>2021-08-17 16:19:06 +0200
committerKeewis <keewis@posteo.de>2021-08-17 16:19:06 +0200
commit3400a1749a57c3f2f284908c938071283cad25b2 (patch)
tree8f49c2fd142966acd1507a5caf42606c8cb5cbeb /pint/formatting.py
parent7eb55635a74b6e13e6c253110b983360dd72bb36 (diff)
downloadpint-3400a1749a57c3f2f284908c938071283cad25b2.tar.gz
report the conflicting format name
Diffstat (limited to 'pint/formatting.py')
-rw-r--r--pint/formatting.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pint/formatting.py b/pint/formatting.py
index 37f8064..9dbcc41 100644
--- a/pint/formatting.py
+++ b/pint/formatting.py
@@ -152,7 +152,7 @@ def register_unit_format(name):
def wrapper(func):
if name in _FORMATTERS:
- raise ValueError("format already exists") # or warn instead
+ raise ValueError(f"format {name:!r} already exists") # or warn instead
_FORMATTERS[name] = func
return wrapper