(self, filename)
| 59 | return "break" |
| 60 | |
| 61 | def tabnanny(self, filename): |
| 62 | # XXX: tabnanny should work on binary files as well |
| 63 | with tokenize.open(filename) as f: |
| 64 | try: |
| 65 | tabnanny.process_tokens(tokenize.generate_tokens(f.readline)) |
| 66 | except tokenize.TokenError as msg: |
| 67 | msgtxt, (lineno, start) = msg.args |
| 68 | self.editwin.gotoline(lineno) |
| 69 | self.errorbox("Tabnanny Tokenizing Error", |
| 70 | "Token Error: %s" % msgtxt) |
| 71 | return False |
| 72 | except tabnanny.NannyNag as nag: |
| 73 | # The error messages from tabnanny are too confusing... |
| 74 | self.editwin.gotoline(nag.get_lineno()) |
| 75 | self.errorbox("Tab/space error", indent_message) |
| 76 | return False |
| 77 | return True |
| 78 | |
| 79 | def checksyntax(self, filename): |
| 80 | self.shell = shell = self.flist.open_shell() |
no test coverage detected