Skip to content

Commit

Permalink
Merge #504
Browse files Browse the repository at this point in the history
504: Trivial indentation reformat. r=hgrecco
This does not affect semantic of the code block.
  • Loading branch information
bors[bot] committed May 3, 2017
2 parents c89c51c + 0002e94 commit 4c5b373
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions pint/measurement.py
Expand Up @@ -74,17 +74,17 @@ def __str__(self):
def __format__(self, spec):
# special cases
if 'Lx' in spec: # the LaTeX siunitx code
# the uncertainties module supports formatting
# numbers in value(unc) notation (i.e. 1.23(45) instead of 1.23 +/- 0.45),
# which siunitx actually accepts as input. we just need to give the 'S'
# formatting option for the uncertainties module.
spec = spec.replace('Lx','S')
# todo: add support for extracting options
opts = 'separate-uncertainty=true'
mstr = format( self.magnitude, spec )
ustr = siunitx_format_unit(self.units)
ret = r'\SI[%s]{%s}{%s}'%( opts, mstr, ustr )
return ret
# the uncertainties module supports formatting
# numbers in value(unc) notation (i.e. 1.23(45) instead of 1.23 +/- 0.45),
# which siunitx actually accepts as input. we just need to give the 'S'
# formatting option for the uncertainties module.
spec = spec.replace('Lx','S')
# todo: add support for extracting options
opts = 'separate-uncertainty=true'
mstr = format( self.magnitude, spec )
ustr = siunitx_format_unit(self.units)
ret = r'\SI[%s]{%s}{%s}'%( opts, mstr, ustr )
return ret


# standard cases
Expand Down

0 comments on commit 4c5b373

Please sign in to comment.