Skip to content

Commit 3009eb9

Browse files
committed
TOL.format() fail for integer input under IronPython environment
Fixes #1291
1 parent 33e09f5 commit 3009eb9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/compas/tolerance.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from compas.data import Data
1010
from decimal import Decimal
1111

12+
import compas
1213

1314
__all__ = ["Tolerance", "TOL"]
1415

@@ -683,6 +684,9 @@ def format_number(self, number, precision=None):
683684
'12300'
684685
685686
"""
687+
if compas.IPY:
688+
number = float(number)
689+
686690
if not precision:
687691
precision = self.precision
688692

0 commit comments

Comments
 (0)