Skip to content

Commit 494a70b

Browse files
authored
Patch in correct demorgan in Rate validator
Patch in correct demorgan in Rate validator
2 parents 676dd21 + af3ed53 commit 494a70b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/penn_chime/parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def __init__(
6767
recovered: int = 0,
6868
region: Optional[Regions] = None,
6969
):
70-
self.current_hospitalized = StrictlyPositive(value=current_hospitalized)
70+
self.current_hospitalized = Positive(value=current_hospitalized)
7171
self.relative_contact_rate = Rate(value=relative_contact_rate)
7272

7373
Rate(value=hospitalized.rate), Rate(value=icu.rate), Rate(value=ventilated.rate)

src/penn_chime/validators/validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __init__(self) -> None:
4747
pass
4848

4949
def validate(self, value):
50-
if 0 >= value or value >= 1:
50+
if 0 > value or value > 1:
5151
raise ValueError(f"{value} needs to be a rate (i.e. in [0,1]).")
5252

5353
class Date(Validator):

0 commit comments

Comments
 (0)