Open debonte opened 8 months ago
# test.py from typing import Optional class Dependency: pass def func(self, param1: Optional[Dependency]): pass
func
from typing import Optional from test import Dependency def func(self, param1: Optional[Dependency]): pass
from test import Dependency def func(self, param1: Optional[Dependency]): pass
my guess is a bug in pep604 handling in import adder is causing it to skip adding Optional thinking Dependency | None will be used instead of Optional
import adder
Optional
Dependency | None
Environment data
Code Snippet
Repro Steps
func
to another file.Expected behavior
Actual behavior