mirror of
https://github.com/python/cpython.git
synced 2024-11-24 18:34:43 +08:00
staying current with python idle fixes
This commit is contained in:
parent
8b0ee24e22
commit
8cf2704a59
@ -138,7 +138,7 @@ class AutoIndent:
|
||||
expand, tabwidth = string.expandtabs, self.tabwidth
|
||||
have = len(expand(chars, tabwidth))
|
||||
assert have > 0
|
||||
want = int((have - 1) / self.indentwidth) * self.indentwidth
|
||||
want = ((have - 1) // self.indentwidth) * self.indentwidth
|
||||
ncharsdeleted = 0
|
||||
while 1:
|
||||
chars = chars[:-1]
|
||||
@ -462,7 +462,7 @@ def classifyws(s, tabwidth):
|
||||
effective = effective + 1
|
||||
elif ch == '\t':
|
||||
raw = raw + 1
|
||||
effective = (int(effective / tabwidth) + 1) * tabwidth
|
||||
effective = (effective // tabwidth + 1) * tabwidth
|
||||
else:
|
||||
break
|
||||
return raw, effective
|
||||
|
Loading…
Reference in New Issue
Block a user