Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
class _IntComparison(_RichComparison):
"""
Compares true if other number passes all rich comparison cases given.
"""
def __init__(self, lt=None, le=None, eq=None, ne=None, ge=None, gt=None):
super().__init__(int, lt=lt, le=le, eq=eq, ne=ne, ge=ge, gt=gt)
# Ints
class AnyInt(_IntComparison):
def __init__(self):
super().__init__()
class NotThisInt(_IntComparison):
def __init__(self, ne: int):
super().__init__(ne=ne)
class IntBetween(_IntComparison):
def __init__(self, lower: int, upper: int):
super().__init__(ge=lower, le=upper)
class IntGreaterThan(_IntComparison):
def __init__(self, gt: int):
super().__init__(gt=gt)
class IntGreaterOrEquals(_IntComparison):
def __init__(self, ge: int):
def __init__(self, lt=None, le=None, eq=None, ne=None, ge=None, gt=None):
super().__init__(int, lt=lt, le=le, eq=eq, ne=ne, ge=ge, gt=gt)
# Ints
class AnyInt(_IntComparison):
def __init__(self):
super().__init__()
class NotThisInt(_IntComparison):
def __init__(self, ne: int):
super().__init__(ne=ne)
class IntBetween(_IntComparison):
def __init__(self, lower: int, upper: int):
super().__init__(ge=lower, le=upper)
class IntGreaterThan(_IntComparison):
def __init__(self, gt: int):
super().__init__(gt=gt)
class IntGreaterOrEquals(_IntComparison):
def __init__(self, ge: int):
super().__init__(ge=ge)
class IntLessThan(_IntComparison):
def __init__(self, lt):
class AnyInt(_IntComparison):
def __init__(self):
super().__init__()
class NotThisInt(_IntComparison):
def __init__(self, ne: int):
super().__init__(ne=ne)
class IntBetween(_IntComparison):
def __init__(self, lower: int, upper: int):
super().__init__(ge=lower, le=upper)
class IntGreaterThan(_IntComparison):
def __init__(self, gt: int):
super().__init__(gt=gt)
class IntGreaterOrEquals(_IntComparison):
def __init__(self, ge: int):
super().__init__(ge=ge)
class IntLessThan(_IntComparison):
def __init__(self, lt):
super().__init__(lt=lt)
class IntLessOrEquals(_IntComparison):
def __init__(self, le):
class IntBetween(_IntComparison):
def __init__(self, lower: int, upper: int):
super().__init__(ge=lower, le=upper)
class IntGreaterThan(_IntComparison):
def __init__(self, gt: int):
super().__init__(gt=gt)
class IntGreaterOrEquals(_IntComparison):
def __init__(self, ge: int):
super().__init__(ge=ge)
class IntLessThan(_IntComparison):
def __init__(self, lt):
super().__init__(lt=lt)
class IntLessOrEquals(_IntComparison):
def __init__(self, le):
super().__init__(le=le)
# floats
class AnyFloat(_FloatComparison):
def __init__(self):
super().__init__()
class NotThisFloat(_FloatComparison):
class NotThisInt(_IntComparison):
def __init__(self, ne: int):
super().__init__(ne=ne)
class IntBetween(_IntComparison):
def __init__(self, lower: int, upper: int):
super().__init__(ge=lower, le=upper)
class IntGreaterThan(_IntComparison):
def __init__(self, gt: int):
super().__init__(gt=gt)
class IntGreaterOrEquals(_IntComparison):
def __init__(self, ge: int):
super().__init__(ge=ge)
class IntLessThan(_IntComparison):
def __init__(self, lt):
super().__init__(lt=lt)
class IntLessOrEquals(_IntComparison):
def __init__(self, le):
super().__init__(le=le)
# floats
class AnyFloat(_FloatComparison):
def __init__(self, lt=None, le=None, eq=None, ne=None, ge=None, gt=None):
super().__init__(float, lt=lt, le=le, eq=eq, ne=ne, ge=ge, gt=gt)
class _IntComparison(_RichComparison):
"""
Compares true if other number passes all rich comparison cases given.
"""
def __init__(self, lt=None, le=None, eq=None, ne=None, ge=None, gt=None):
super().__init__(int, lt=lt, le=le, eq=eq, ne=ne, ge=ge, gt=gt)
# Ints
class AnyInt(_IntComparison):
def __init__(self):
super().__init__()
class NotThisInt(_IntComparison):
def __init__(self, ne: int):
super().__init__(ne=ne)
class IntBetween(_IntComparison):
def __init__(self, lower: int, upper: int):
super().__init__(ge=lower, le=upper)
class IntGreaterThan(_IntComparison):
def __init__(self, gt: int):
class IntGreaterThan(_IntComparison):
def __init__(self, gt: int):
super().__init__(gt=gt)
class IntGreaterOrEquals(_IntComparison):
def __init__(self, ge: int):
super().__init__(ge=ge)
class IntLessThan(_IntComparison):
def __init__(self, lt):
super().__init__(lt=lt)
class IntLessOrEquals(_IntComparison):
def __init__(self, le):
super().__init__(le=le)
# floats
class AnyFloat(_FloatComparison):
def __init__(self):
super().__init__()
class NotThisFloat(_FloatComparison):
def __init__(self, ne: float):
super().__init__(ne=ne)
class FloatBetween(_FloatComparison):