273 @type ast.AugAssign |
273 @type ast.AugAssign |
274 @return flag indicating a constant increase |
274 @return flag indicating a constant increase |
275 @rtype bool |
275 @rtype bool |
276 """ |
276 """ |
277 return ( |
277 return ( |
278 isinstance(expression.op, ast.Add) and |
278 isinstance(expression.op, ast.Add) and ( |
279 isinstance(expression.value, (ast.Constant, ast.Num)) |
279 (isinstance(expression.value, ast.Constant) and |
|
280 isinstance(expression.value.value, int)) or |
|
281 isinstance(expression.value, ast.Num) |
|
282 ) |
280 ) |
283 ) |
281 |
284 |
282 def __getIfBodyPairs(self, node): |
285 def __getIfBodyPairs(self, node): |
283 """ |
286 """ |
284 Private method to extract a list of pairs of test and body for an |
287 Private method to extract a list of pairs of test and body for an |