GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up|
Now that the tests are actually failing for code related reasons, what is the suggested change for the 2 failing tests? mypy/test-data/unit/fine-grained-blockers.test Lines 27 to 48 in 5d8c0cd The cursor is off by 1 character, though I would think that the new position of the cursor makes more sense. Also, where should I put new tests to check for consistency between tabs and spaces when pretty printing? |
|
Thanks, generally looks good, although I have one question. |
| @@ -451,12 +451,17 @@ def format_messages(self, error_info: List[ErrorInfo], | |||
| # Add source code fragment and a location marker. | |||
| if severity == 'error' and source_lines and line > 0: | |||
| source_line = source_lines[line - 1] | |||
| source_line_expanded = source_line.replace('\t', ' ' * 8) | |||
Why not source_line.expandtabs()? (Also 8 is default for the latter.)
| if column < 0: | ||
| # Something went wrong, take first non-empty column. | ||
| column = len(source_line) - len(source_line.lstrip()) | ||
|
|
||
| # Shifts column after tab expansion | ||
| column = len(source_line[:column].replace('\t', ' ' * 8)) |
This doesn't look important, you can just update the existing tests.
I would put them at the end of |
|
Did not know that |
|
LGTM now. |
dosisod commentedJan 21, 2020
PR for issue #8306.