Use round instead of int in gradation.py
This commit is contained in:
1 parent
f23d0ad3fb
commit
7d8604c9d8
1 file changed
+1
-1
+1
-1
@@ -9,7 +9,7 @@ class Gradation:
|
|||||||
mg_per_liter: int
|
mg_per_liter: int
|
||||||
|
|
||||||
def __init__(self, grams_per_liter: Union[float, int]):
|
def __init__(self, grams_per_liter: Union[float, int]):
|
||||||
self.mg_per_liter = int(grams_per_liter * 1000)
|
self.mg_per_liter = round(grams_per_liter * 1000)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def grams_per_liter(self) -> float:
|
def grams_per_liter(self) -> float:
|
||||||
|
|||||||
Reference in new issue
Block a user