Use round instead of int in gradation.py
This commit is contained in:
@ -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