[issue25677] Syntax error caret confused by indentation

2016-11-07 Thread Michael Layzell
Michael Layzell added the comment: This patch fixes a problem, which is that the caret was not placed where the source location information for the node is, but instead in a random position based on the indentation level. The problem that the caret is not placed under the `=` sign, but

[issue25677] Syntax error caret confused by indentation

2016-11-07 Thread Michael Layzell
Michael Layzell added the comment: Is there something I should be doing to push this patch forward? I am not familiar with the contribution process for cpython unfortunately. -- ___ Python tracker <http://bugs.python.org/issue25

[issue25677] Syntax error caret confused by indentation

2016-01-09 Thread Michael Layzell
Michael Layzell added the comment: Oops. Should be fixed now. -- Added file: http://bugs.python.org/file41559/cpython25677.patch ___ Python tracker <http://bugs.python.org/issue25

[issue25677] Syntax error caret confused by indentation

2016-01-08 Thread Michael Layzell
Michael Layzell added the comment: Sorry for missing the review comments earlier, I didn't notice them (I've not used this bug tracker before - sorry). I've attached an updated patch which should not have the variable problem, and also takes some of the other review commen

[issue25677] Syntax error caret confused by indentation

2015-11-26 Thread Michael Layzell
Michael Layzell added the comment: Martin's solution seemed like the least work, so that's what I ended up using. I also switched over to assertRegex, and I agree that it produces better error messages. I added a comment to explain the use of the ugly multiline regex, and removed s

[issue25677] Syntax error caret confused by indentation

2015-11-25 Thread Michael Layzell
Michael Layzell added the comment: Sorry for the delay, I finally got around to adding a test. I'm mildly concerned about the portability of the check, but it seems to work locally. If people have suggestions about how to make the check more portable, let me know! -- Added file:

[issue25677] Syntax error caret confused by indentation

2015-11-20 Thread Michael Layzell
Michael Layzell added the comment: This should fix the problem. It appears as though the indentation was being stripped from the program text differently depending on how the error was produced. In the case of a syntax error from the parser, the indentation was maintained until it was printed

[issue25677] Syntax error caret confused by indentation

2015-11-19 Thread Michael Layzell
New submission from Michael Layzell: It appears that syntax errors generated by checking the AST will get confused by indentation and place the caret incorrectly. With no indentation: === 1 + 1 = 2 === File "/Users/mlayzell/test.py", line 1 1 + 1 = 2 ^ SyntaxError: can&#