mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Make tabnanny recognize IndentationErrors raised by tokenize.
Add a test to test_inspect to make sure indented source is recognized correctly. (fixes #1224621)
This commit is contained in:
parent
26a07b5198
commit
2463f8f831
4 changed files with 18 additions and 1 deletions
|
@ -109,6 +109,10 @@ def check(file):
|
|||
errprint("%r: Token Error: %s" % (file, msg))
|
||||
return
|
||||
|
||||
except IndentationError, msg:
|
||||
errprint("%r: Indentation Error: %s" % (file, msg))
|
||||
return
|
||||
|
||||
except NannyNag, nag:
|
||||
badline = nag.get_lineno()
|
||||
line = nag.get_line()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue