Skip to content

Commit 313dd7a

Browse files
committed
appease black
1 parent 575b025 commit 313dd7a

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

examples/test_udecimal.py

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1+
# SPDX-FileCopyrightText: 2020 Jeff Epler <https://unpythonic.net>
2+
#
3+
# SPDX-License-Identifier: Unlicense
14
from jepler_udecimal import *
5+
26
setcontext(ExtendedContext)
37
print(Decimal(0))
4-
print(Decimal('1'))
5-
print(Decimal('-.0123'))
8+
print(Decimal("1"))
9+
print(Decimal("-.0123"))
610
print(Decimal(123456))
7-
print(Decimal('123.45e12345678'))
8-
print(Decimal('1.33') + Decimal('1.27'))
9-
print(Decimal('12.34') + Decimal('3.87') - Decimal('18.41'))
11+
print(Decimal("123.45e12345678"))
12+
print(Decimal("1.33") + Decimal("1.27"))
13+
print(Decimal("12.34") + Decimal("3.87") - Decimal("18.41"))
1014
dig = Decimal(1)
1115
print(dig / Decimal(3))
1216
getcontext().prec = 18
@@ -52,9 +56,10 @@
5256
print(c.flags[InvalidOperation])
5357
import jepler_udecimal.utrig
5458
from jepler_udecimal import Decimal
55-
print(Decimal('.7').atan())
56-
print(Decimal('.1').acos())
57-
print(Decimal('-.1').asin())
58-
print(Decimal('.4').tan())
59-
print(Decimal('.5').cos())
60-
print(Decimal('.6').sin())
59+
60+
print(Decimal(".7").atan())
61+
print(Decimal(".1").acos())
62+
print(Decimal("-.1").asin())
63+
print(Decimal(".4").tan())
64+
print(Decimal(".5").cos())
65+
print(Decimal(".6").sin())

jepler_udecimal/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5301,9 +5301,7 @@ def _convert_for_comparison(self, other, equality_op=False):
53015301
# Comparison with an integer (we don't have rationals)
53025302
if isinstance(other, int):
53035303
if not self._is_special:
5304-
self = _dec_from_triple(
5305-
self._sign, str(_int(self._int)), self._exp
5306-
)
5304+
self = _dec_from_triple(self._sign, str(_int(self._int)), self._exp)
53075305
return self, Decimal(other)
53085306

53095307
# Comparisons with float types. == and != comparisons

0 commit comments

Comments
 (0)