diff options
author | Keewis <keewis@posteo.de> | 2021-08-17 16:19:06 +0200 |
---|---|---|
committer | Keewis <keewis@posteo.de> | 2021-08-17 16:19:06 +0200 |
commit | 3400a1749a57c3f2f284908c938071283cad25b2 (patch) | |
tree | 8f49c2fd142966acd1507a5caf42606c8cb5cbeb /pint/formatting.py | |
parent | 7eb55635a74b6e13e6c253110b983360dd72bb36 (diff) | |
download | pint-3400a1749a57c3f2f284908c938071283cad25b2.tar.gz |
report the conflicting format name
Diffstat (limited to 'pint/formatting.py')
-rw-r--r-- | pint/formatting.py | 2 |
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 |