diff options
author | Hernan Grecco <hgrecco@gmail.com> | 2023-04-29 19:44:20 -0300 |
---|---|---|
committer | Hernan Grecco <hgrecco@gmail.com> | 2023-04-29 19:44:20 -0300 |
commit | b63697287ba1e5de7300890ea4c03b8781b04863 (patch) | |
tree | 0eb5db03beef71ddfb5a094521034b9f0b212b5b /pint/pint_convert.py | |
parent | 10f69c4870ef9acda1b5dd21f2bf87f15855d3ea (diff) | |
download | pint-b63697287ba1e5de7300890ea4c03b8781b04863.tar.gz |
Run pyupgrade --py39-plus in all files except _vendor
Diffstat (limited to 'pint/pint_convert.py')
-rwxr-xr-x | pint/pint_convert.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pint/pint_convert.py b/pint/pint_convert.py index d8d60e8..86d8a7a 100755 --- a/pint/pint_convert.py +++ b/pint/pint_convert.py @@ -160,7 +160,7 @@ if args.unc: def convert(u_from, u_to=None, unc=None, factor=None): q = ureg.Quantity(u_from) - fmt = ".{}g".format(args.prec) + fmt = f".{args.prec}g" if unc: q = q.plus_minus(unc) if u_to: @@ -172,7 +172,7 @@ def convert(u_from, u_to=None, unc=None, factor=None): nq *= ureg.Quantity(factor).to_base_units() prec_unc = use_unc(nq.magnitude, fmt, args.prec_unc) if prec_unc > 0: - fmt = ".{}uS".format(prec_unc) + fmt = f".{prec_unc}uS" else: try: nq = nq.magnitude.n * nq.units |