Pycharm type hinting with recursive types in python3.11 is not working as expected

Say I have a recursive type like:

 

ValueTy = str | list["ValueTy"]
v: ValueTy = [1]
 

I expect pycharm to give an error on the second line: as the type is not correct (it's supposed to be a string or a list of-ndepth-lists-of strings.

0

Please sign in to leave a comment.