Feature or enhancement
Currently regular imports with typos suggest close alternatives, which is helpful:
>>> from os import pth
Traceback (most recent call last):
File "<python-input-3>", line 1, in <module>
from os import pth
ImportError: cannot import name 'pth' from 'os' (/Users/sobolev/Desktop/cpython/Lib/os.py). Did you mean: 'path'?
But, the same is not true for SyntaxError, when you make a typo in __future__ imports:
>>> from __future__ import barry_as_FLUF
File "<python-input-0>", line 1
from __future__ import barry_as_FLUF
^^^^^^^^^^^^^
SyntaxError: future feature barry_as_FLUF is not defined
or
>>> from __future__ import anotations
File "<python-input-2>", line 1
from __future__ import anotations
^^^^^^^^^^
SyntaxError: future feature anotations is not defined
I propose to do the same for names defined in __future__:
```python
>>> from __future__ import anotations
File "<python-input-2>", line 1
from __future__ import anotations
^^^^^^^^^^
SyntaxError: future feature 'anotations' is not defined. Did you mean: 'annotations'?
I am working on a PR for this.
Feature or enhancement
Currently regular imports with typos suggest close alternatives, which is helpful:
But, the same is not true for
SyntaxError, when you make a typo in__future__imports:or
I propose to do the same for names defined in
__future__:I am working on a PR for this.