Plugins/CheckerPlugins/Pep8/pep8.py

branch
5_3_x
changeset 2931
552d5934c6f6
parent 2801
8ccc38b80dc2
child 3084
bb490ec69f98
equal deleted inserted replaced
2924:66c644db24f4 2931:552d5934c6f6
1107 if text.endswith('\n') and not parens: 1107 if text.endswith('\n') and not parens:
1108 # The comment also ends a physical line. This works around 1108 # The comment also ends a physical line. This works around
1109 # Python < 2.6 behaviour, which does not generate NL after 1109 # Python < 2.6 behaviour, which does not generate NL after
1110 # a comment which is on a line by itself. 1110 # a comment which is on a line by itself.
1111 self.tokens = [] 1111 self.tokens = []
1112 except tokenize.TokenError as err: 1112 except (SyntaxError, tokenize.TokenError) as err:
1113 msg, (lnum, pos) = err.args 1113 msg, (lnum, pos) = err.args
1114 self.report_error_args(lnum, pos, "E901", "TokenError", msg) 1114 self.report_error_args(lnum, pos, "E901", "TokenError", msg)
1115 return self.file_errors 1115 return self.file_errors
1116 1116
1117 def report_error(self, line_number, offset, text, check): 1117 def report_error(self, line_number, offset, text, check):

eric ide

mercurial