diff options
author | Hernan Grecco <hgrecco@gmail.com> | 2023-04-29 22:44:43 -0300 |
---|---|---|
committer | Hernan Grecco <hgrecco@gmail.com> | 2023-04-29 22:44:43 -0300 |
commit | 5d3d6299c9cfef5b62366482590edd3c241d9944 (patch) | |
tree | d064ef65d0f7fbcb78852296c87317bea2e261b8 /pint/facets | |
parent | d4b3a7aee551f789cdb1528fc2ff66069a58f3eb (diff) | |
download | pint-5d3d6299c9cfef5b62366482590edd3c241d9944.tar.gz |
Run pyupgrade --py39-plus in all files except _vendor (again)
Diffstat (limited to 'pint/facets')
-rw-r--r-- | pint/facets/measurement/objects.py | 2 | ||||
-rw-r--r-- | pint/facets/plain/registry.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pint/facets/measurement/objects.py b/pint/facets/measurement/objects.py index 6fa860c..aaf5750 100644 --- a/pint/facets/measurement/objects.py +++ b/pint/facets/measurement/objects.py @@ -133,7 +133,7 @@ class Measurement(PlainQuantity): # scientific notation ('e' or 'E' and sometimes 'g' or 'G'). mstr = mstr.replace("(", "").replace(")", " ") ustr = siunitx_format_unit(self.units._units, self._REGISTRY) - return r"\SI{}{{{}}}{{{}}}".format(opts, mstr, ustr) + return rf"\SI{opts}{{{mstr}}}{{{ustr}}}" # standard cases if "L" in spec: diff --git a/pint/facets/plain/registry.py b/pint/facets/plain/registry.py index 035d151..a35e508 100644 --- a/pint/facets/plain/registry.py +++ b/pint/facets/plain/registry.py @@ -464,7 +464,7 @@ class PlainRegistry(metaclass=RegistryMeta): if self._on_redefinition == "raise": raise RedefinitionError(key, type(value)) elif self._on_redefinition == "warn": - logger.warning("Redefining '{}' ({})".format(key, type(value))) + logger.warning(f"Redefining '{key}' ({type(value)})") target_dict[key] = value if casei_target_dict is not None: |