jedi
jedi copied to clipboard
[FeatureRequest] `F2` rename import typing, should result changes in function annotations
Actual
Change type from pre
to post
Pre:
if typing.TYPE_CHECKING:
from custom_types import pre
def parse_args() -> 'pre':
return foobar
Post:
Error: Name "pre" is not defined
if typing.TYPE_CHECKING:
from custom_types import post
def parse_args() -> 'pre':
return foobar
Expected
Change type from pre
to post
Pre:
if typing.TYPE_CHECKING:
from custom_types import pre
def parse_args() -> 'pre':
return foobar
Post:
if typing.TYPE_CHECKING:
from custom_types import post
def parse_args() -> 'post':
return foobar
https://github.com/microsoft/vscode-python/issues/18366
I'm quite confident that this is not going to get fixed, because it just does not have a high priority. But I'm very happy to accept pull requests. In the meantime I can recommend using from __future__ import annotations
and not using string literals as annotations.