-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
as designedNot a bug, working as intendedNot a bug, working as intended
Description
Describe the bug
Pyright report cycle detected in import chain when using the method described in the link.
https://mypy.readthedocs.io/en/stable/common_issues.html#import-cycles
To Reproduce
File foo.py:
from typing import List, TYPE_CHECKING
if TYPE_CHECKING:
import bar
def listify(arg: 'bar.BarClass') -> 'List[bar.BarClass]':
return [arg]File bar.py:
from typing import List
from foo import listify
class BarClass:
def listifyme(self) -> 'List[BarClass]':
return listify(self)Expected behavior
No errors.
VS Code extension or command-line
VS Code extension 1.1.44
Python 3.7.4
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
as designedNot a bug, working as intendedNot a bug, working as intended