eric6/Plugins/CheckerPlugins/CodeStyleChecker/Simplify/SimplifyNodeVisitor.py

changeset 8219
013aee248a62
parent 8218
7c09585bd960
child 8241
de2ebf20d822
equal deleted inserted replaced
8218:7c09585bd960 8219:013aee248a62
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

eric ide

mercurial