Closed fscali closed 2 years ago
Pylance is correct in reporting an error here. This isn't a legal type annotation. For information about type annotations, please refer to PEP 484.
Please see https://www.python.org/dev/peps/pep-0484/#id28
Using strings as annotations is for forward references of type hints. The content of the string needs to be a valid Python expression.
Environment data
Expected behaviour
When inserting a type annotation like this:
Actual behaviour
Pylance signals two errors:
Logs
Python Language Server Log
Code Snippet / Additional information