Skip to content

Commit

Permalink
Add felis.constrained.float.portion
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeeeT committed Jun 11, 2024
1 parent d176f69 commit bd3c539
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/felis/constrained/float.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,20 @@
import felis.predicate.float
from felis.constrained import smart_constructor

__all__ = ["Negative", "negative", "NonPositive", "non_positive", "NonZero", "non_zero", "NonNegative", "non_negative", "Positive", "positive"]
__all__ = [
"Negative",
"negative",
"NonPositive",
"non_positive",
"NonZero",
"non_zero",
"NonNegative",
"non_negative",
"Positive",
"positive",
"Portion",
"portion",
]


Negative = NewType("Negative", float)
Expand All @@ -29,3 +42,8 @@
Positive = NewType("Positive", float)

positive = smart_constructor(Positive)(felis.predicate.float.positive)


Portion = NewType("Portion", float)

portion = smart_constructor(Portion)(felis.predicate.float.portion)

0 comments on commit bd3c539

Please sign in to comment.