Skip to content

Commit 63b12a2

Browse files
committed
a different way to monkeypatch Decimal
1 parent de4534c commit 63b12a2

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

jepler_udecimal/utrig.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,5 @@ def acos(x, context=None):
190190
return r
191191

192192

193-
# pylint: disable=using-constant-test
194-
# This stops a doc-building error in autoapi
195-
if 1:
196-
Decimal.tan = tan
197-
Decimal.sin = sin
198-
Decimal.cos = cos
199-
Decimal.atan = atan
200-
Decimal.asin = asin
201-
Decimal.acos = acos
193+
for name in __all__:
194+
setattr(Decimal, name, globals()[name])

0 commit comments

Comments
 (0)