mirror of https://github.com/python/cpython
gh-104719: IDLE - delete useless monkeypatch of tokenize (#104726)
This commit is contained in:
parent
ffe47cb623
commit
0c5e79bcdf
|
@ -1643,19 +1643,13 @@ class IndentSearcher:
|
|||
self.finished = 1
|
||||
|
||||
def run(self):
|
||||
save_tabsize = tokenize.tabsize
|
||||
tokenize.tabsize = self.tabwidth
|
||||
try:
|
||||
try:
|
||||
tokens = tokenize.generate_tokens(self.readline)
|
||||
for token in tokens:
|
||||
self.tokeneater(*token)
|
||||
except (tokenize.TokenError, SyntaxError):
|
||||
# since we cut off the tokenizer early, we can trigger
|
||||
# spurious errors
|
||||
# Stopping the tokenizer early can trigger spurious errors.
|
||||
pass
|
||||
finally:
|
||||
tokenize.tabsize = save_tabsize
|
||||
return self.blkopenline, self.indentedline
|
||||
|
||||
### end autoindent code ###
|
||||
|
|
Loading…
Reference in New Issue