Feature or enhancement
Keyword typo suggestions won't work for most realistically big source files, because
- we have a cap of 1024 characters of the source we recompile for probing
- most Python source files in practice are rather bigger
My idea is to try to shrink the source being recompiled for probing keyword typos by cutting the smallest possible window of the full source. The center of the window would be in the SyntaxError reported line and offset. The window would be bounded by empty lines (most people do format code this way) and the window would have to start with a line that does not have an indent as the first token.
As a result, keyword typo suggestions could have way further reach for realistic cases.
I might include more illustrations later. cc @pablogsal
Feature or enhancement
Keyword typo suggestions won't work for most realistically big source files, because
My idea is to try to shrink the source being recompiled for probing keyword typos by cutting the smallest possible window of the full source. The center of the window would be in the SyntaxError reported line and offset. The window would be bounded by empty lines (most people do format code this way) and the window would have to start with a line that does not have an indent as the first token.
As a result, keyword typo suggestions could have way further reach for realistic cases.
I might include more illustrations later. cc @pablogsal