1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 03:12:20 +01:00

Use default format to render FloatLiteral (#717)

Fixes https://github.com/esphome/issues/issues/557
This commit is contained in:
Fritz Mueller
2019-09-04 02:06:18 -07:00
committed by Otto Winter
parent fd1dc24ac6
commit 1d5f8d5a52

View File

@@ -250,7 +250,7 @@ class FloatLiteral(Literal):
def __str__(self):
if math.isnan(self.float_):
return u"NAN"
return u"{:f}f".format(self.float_)
return u"{}f".format(self.float_)
# pylint: disable=bad-continuation