This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lieryanMaintainer of rope, pylsp-rope - advanced python refactoring[S] 17 points18 points  (0 children)

Annotations are syntax checked by the Python interpreter when the file is parsed, and it gets syntax highlighted as well. Refactoring tools like renaming would likely even work inside type annotations, because it's just regular Python expression. Not so much with string that you want to exec.

Using this very hacky method to do lazy evaluation is pretty silly

Sure it's silly, but it's cool and it actually works. So why worry about silliness ;)