@@ -68,9 +68,9 @@ class ConditionComparison(Condition):
68
68
Attributes:
69
69
condition_type (ConditionTypeEnum): The type of condition.
70
70
left (ConditionValueType): The execution variable, parameter, or
71
- property to use in comparison.
71
+ property to use in the comparison.
72
72
right (Union[ConditionValueType, PrimitiveType]): The execution variable,
73
- parameter, property, or python primitive value to compare to.
73
+ parameter, property, or Python primitive value to compare to.
74
74
"""
75
75
76
76
left : ConditionValueType = attr .ib (default = None )
@@ -91,19 +91,19 @@ class ConditionEquals(ConditionComparison):
91
91
Attributes:
92
92
condition_type (ConditionTypeEnum): A `ConditionTypeEnum.EQ` type of condition.
93
93
left (ConditionValueType): The execution variable, parameter, or
94
- property to use in comparison.
94
+ property to use in the comparison.
95
95
right (Union[ConditionValueType, PrimitiveType]): The execution variable,
96
- parameter, property, or python primitive value to compare to.
96
+ parameter, property, or Python primitive value to compare to.
97
97
"""
98
98
99
99
def __init__ (self , left : ConditionValueType , right : Union [ConditionValueType , PrimitiveType ]):
100
100
"""Constructs an instance of ConditionEquals.
101
101
102
102
Args:
103
103
left (ConditionValueType): The execution variable, parameter,
104
- or property to use in comparison.
104
+ or property to use in the comparison.
105
105
right (Union[ConditionValueType, PrimitiveType]): The execution
106
- variable, parameter, property, or python primitive value to compare to.
106
+ variable, parameter, property, or Python primitive value to compare to.
107
107
"""
108
108
109
109
super (ConditionEquals , self ).__init__ (ConditionTypeEnum .EQ , left , right )
@@ -115,19 +115,19 @@ class ConditionGreaterThan(ConditionComparison):
115
115
Attributes:
116
116
condition_type (ConditionTypeEnum): A `ConditionTypeEnum.GT` type of condition.
117
117
left (ConditionValueType): The execution variable, parameter, or
118
- property to use in comparison.
118
+ property to use in the comparison.
119
119
right (Union[ConditionValueType, PrimitiveType]): The execution variable,
120
- parameter, property, or python primitive value to compare to.
120
+ parameter, property, or Python primitive value to compare to.
121
121
"""
122
122
123
123
def __init__ (self , left : ConditionValueType , right : Union [ConditionValueType , PrimitiveType ]):
124
124
"""Constructs an instance of ConditionGreaterThan.
125
125
126
126
Args:
127
127
left (ConditionValueType): The execution variable, parameter,
128
- or property to use in comparison.
128
+ or property to use in the comparison.
129
129
right (Union[ConditionValueType, PrimitiveType]): The execution
130
- variable, parameter, property, or python primitive value to compare to.
130
+ variable, parameter, property, or Python primitive value to compare to.
131
131
"""
132
132
133
133
super (ConditionGreaterThan , self ).__init__ (ConditionTypeEnum .GT , left , right )
@@ -139,19 +139,19 @@ class ConditionGreaterThanOrEqualTo(ConditionComparison):
139
139
Attributes:
140
140
condition_type (ConditionTypeEnum): A `ConditionTypeEnum.GTE` type of condition.
141
141
left (ConditionValueType): The execution variable, parameter, or
142
- property to use in comparison.
142
+ property to use in the comparison.
143
143
right (Union[ConditionValueType, PrimitiveType]): The execution variable,
144
- parameter, property, or python primitive value to compare to.
144
+ parameter, property, or Python primitive value to compare to.
145
145
"""
146
146
147
147
def __init__ (self , left : ConditionValueType , right : Union [ConditionValueType , PrimitiveType ]):
148
148
"""Constructs an instance of ConditionGreaterThanOrEqualTo.
149
149
150
150
Args:
151
151
left (ConditionValueType): The execution variable, parameter,
152
- or property to use in comparison.
152
+ or property to use in the comparison.
153
153
right (Union[ConditionValueType, PrimitiveType]): The execution
154
- variable, parameter, property, or python primitive value to compare to.
154
+ variable, parameter, property, or Python primitive value to compare to.
155
155
"""
156
156
157
157
super (ConditionGreaterThanOrEqualTo , self ).__init__ (ConditionTypeEnum .GTE , left , right )
@@ -163,19 +163,19 @@ class ConditionLessThan(ConditionComparison):
163
163
Attributes:
164
164
condition_type (ConditionTypeEnum): A `ConditionTypeEnum.LT` type of condition.
165
165
left (ConditionValueType): The execution variable, parameter, or
166
- property to use in comparison.
166
+ property to use in the comparison.
167
167
right (Union[ConditionValueType, PrimitiveType]): The execution variable,
168
- parameter, property, or python primitive value to compare to.
168
+ parameter, property, or Python primitive value to compare to.
169
169
"""
170
170
171
171
def __init__ (self , left : ConditionValueType , right : Union [ConditionValueType , PrimitiveType ]):
172
172
"""Constructs an instance of ConditionLessThan.
173
173
174
174
Args:
175
175
left (ConditionValueType): The execution variable, parameter,
176
- or property to use in comparison.
176
+ or property to use in the comparison.
177
177
right (Union[ConditionValueType, PrimitiveType]): The execution
178
- variable, parameter, property, or python primitive value to compare to.
178
+ variable, parameter, property, or Python primitive value to compare to.
179
179
"""
180
180
181
181
super (ConditionLessThan , self ).__init__ (ConditionTypeEnum .LT , left , right )
@@ -187,26 +187,26 @@ class ConditionLessThanOrEqualTo(ConditionComparison):
187
187
Attributes:
188
188
condition_type (ConditionTypeEnum): A `ConditionTypeEnum.LTE` type of condition.
189
189
left (ConditionValueType): The execution variable, parameter, or
190
- property to use in comparison.
190
+ property to use in the comparison.
191
191
right (Union[ConditionValueType, PrimitiveType]): The execution variable,
192
- parameter, property, or python primitive value to compare to.
192
+ parameter, property, or Python primitive value to compare to.
193
193
"""
194
194
195
195
def __init__ (self , left : ConditionValueType , right : Union [ConditionValueType , PrimitiveType ]):
196
196
"""Constructs an instance of ConditionLessThanOrEqualTo.
197
197
198
198
Args:
199
199
left (ConditionValueType): The execution variable, parameter,
200
- or property to use in comparison.
200
+ or property to use in the comparison.
201
201
right (Union[ConditionValueType, PrimitiveType]): The execution
202
- variable, parameter, property, or python primitive value to compare to.
202
+ variable, parameter, property, or Python primitive value to compare to.
203
203
"""
204
204
205
205
super (ConditionLessThanOrEqualTo , self ).__init__ (ConditionTypeEnum .LTE , left , right )
206
206
207
207
208
208
class ConditionIn (Condition ):
209
- """An In condition for negating another `Condition` .
209
+ """A condition to check membership .
210
210
211
211
Attributes:
212
212
condition_type (ConditionTypeEnum): A `ConditionTypeEnum.IN` type of condition.
@@ -224,7 +224,7 @@ def __init__(
224
224
value (ConditionValueType): The execution variable,
225
225
parameter, or property to use for the in comparison.
226
226
in_values (List[Union[ConditionValueType, PrimitiveType]]): The list
227
- of values to check the in comparison of .
227
+ of values to check for membership in .
228
228
"""
229
229
super (ConditionIn , self ).__init__ (ConditionTypeEnum .IN )
230
230
self .value = value
@@ -240,7 +240,7 @@ def to_request(self) -> RequestType:
240
240
241
241
242
242
class ConditionNot (Condition ):
243
- """A Not condition for negating another `Condition`.
243
+ """A condition for negating another `Condition`.
244
244
245
245
Attributes:
246
246
condition_type (ConditionTypeEnum): A `ConditionTypeEnum.NOT` type of condition.
@@ -262,11 +262,11 @@ def to_request(self) -> RequestType:
262
262
263
263
264
264
class ConditionOr (Condition ):
265
- """An Or condition for logical OR of a list of `Condition` instances.
265
+ """A condition for taking the logical OR of a list of `Condition` instances.
266
266
267
267
Attributes:
268
268
condition_type (ConditionTypeEnum): A `ConditionTypeEnum.OR` type of condition.
269
- conditions (List[Condition]): A list of `Condition` to logically OR.
269
+ conditions (List[Condition]): A list of `Condition` instances to logically OR.
270
270
"""
271
271
272
272
def __init__ (self , conditions : List [Condition ] = None ):
@@ -292,8 +292,7 @@ def primitive_or_expr(
292
292
"""Provides the expression of the value or leaves the primitive value alone.
293
293
294
294
Args:
295
- value (Union[ConditionValueType, PrimitiveType]): If it is a
296
- PrimitiveType, leave it be. Otherwise, get the expr of the instance.
295
+ value (Union[ConditionValueType, PrimitiveType]): The value to evaluate..
297
296
298
297
Returns:
299
298
Either the expression of the value or the primitive value.
0 commit comments