feat: Improved typing, exception if neither step nor decimals is set

This commit is contained in:
Matthias
2025-05-09 06:34:59 +02:00
parent d0d40f4fce
commit a6d3995013
2 changed files with 6 additions and 1 deletions

View File

@@ -1197,6 +1197,9 @@ def test_SKDecimal():
with pytest.raises(ValueError):
SKDecimal(1, 2, step=5, decimals=0.2)
with pytest.raises(ValueError):
SKDecimal(1, 2, step=None, decimals=None)
s = SKDecimal(1, 2, step=0.1, decimals=None)
assert s.step == 0.1
assert s._contains(1.1)