Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py

changeset 6188
5a6ae3be31e6
parent 6048
82ad8ec9548c
child 6264
04a671fa4adb
equal deleted inserted replaced
6187:2cc7e3629784 6188:5a6ae3be31e6
1236 newText = text 1236 newText = text
1237 # determine length of operator 1237 # determine length of operator
1238 tokens = '<>*/=^&|%!+-' 1238 tokens = '<>*/=^&|%!+-'
1239 pos2 = pos 1239 pos2 = pos
1240 token_delimiter = len(tokens) 1240 token_delimiter = len(tokens)
1241 for i in range(3): 1241 for _ in range(3):
1242 if pos2 < len(text) and text[pos2] in tokens[:token_delimiter]: 1242 if pos2 < len(text) and text[pos2] in tokens[:token_delimiter]:
1243 pos2 += 1 1243 pos2 += 1
1244 # only the first five could be repeated 1244 # only the first five could be repeated
1245 token_delimiter = 5 1245 token_delimiter = 5
1246 else: 1246 else:

eric ide

mercurial