summaryrefslogtreecommitdiff
path: root/pint/unit.py
diff options
context:
space:
mode:
authorGuido Imperiale <crusaderky@gmail.com>2019-12-03 17:40:56 +0000
committerGuido Imperiale <crusaderky@gmail.com>2019-12-03 17:40:56 +0000
commit8f8192919f22baab71e7d2b869a752e7fa72a02d (patch)
treed645f423dff5f5bc615c7549861599034148cd9d /pint/unit.py
parent31a01bf568ec55b9ecd2862ff9daf9dbae703170 (diff)
downloadpint-8f8192919f22baab71e7d2b869a752e7fa72a02d.tar.gz
Remove 2.7 support from codebase
Diffstat (limited to 'pint/unit.py')
-rw-r--r--pint/unit.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/pint/unit.py b/pint/unit.py
index 5d194a5..a18ed81 100644
--- a/pint/unit.py
+++ b/pint/unit.py
@@ -76,12 +76,8 @@ class Unit(PrettyIPython, SharedRegistryObject):
def __format__(self, spec):
spec = spec or self.default_format
# special cases
- if 'Lx' in spec: # the LaTeX siunitx code
- opts = ''
- ustr = siunitx_format_unit(self)
- ret = r'\si[%s]{%s}'%( opts, ustr )
- return ret
-
+ if 'Lx' in spec: # the LaTeX siunitx code
+ return r'\si[]{%s}' % siunitx_format_unit(self)
if '~' in spec:
if not self._units: