File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -188,21 +188,21 @@ def indent_level(self, tabsize):
188188 # count, il = self.norm
189189 # for i in range(len(count)):
190190 # if count[i]:
191- # il = il + (i/tabsize + 1)*tabsize * count[i]
191+ # il = il + (i// tabsize + 1)*tabsize * count[i]
192192 # return il
193193
194194 # quicker:
195- # il = trailing + sum (i/ts + 1)*ts*count[i] =
196- # trailing + ts * sum (i/ts + 1)*count[i] =
197- # trailing + ts * sum i/ts*count[i] + count[i] =
198- # trailing + ts * [(sum i/ts*count[i]) + (sum count[i])] =
199- # trailing + ts * [(sum i/ts*count[i]) + num_tabs]
200- # and note that i/ts*count[i] is 0 when i < ts
195+ # il = trailing + sum (i// ts + 1)*ts*count[i] =
196+ # trailing + ts * sum (i// ts + 1)*count[i] =
197+ # trailing + ts * sum i// ts*count[i] + count[i] =
198+ # trailing + ts * [(sum i// ts*count[i]) + (sum count[i])] =
199+ # trailing + ts * [(sum i// ts*count[i]) + num_tabs]
200+ # and note that i// ts*count[i] is 0 when i < ts
201201
202202 count , trailing = self .norm
203203 il = 0
204204 for i in range (tabsize , len (count )):
205- il = il + i / tabsize * count [i ]
205+ il = il + i // tabsize * count [i ]
206206 return trailing + tabsize * (il + self .nt )
207207
208208 # return true iff self.indent_level(t) == other.indent_level(t)
You can’t perform that action at this time.
0 commit comments