You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
felix-hilden
changed the title
Use type hints to link function arguments
Use type hints to link function arguments and annotated assignment
May 11, 2022
Some complications arise from us not executing the parsed code though. VS importable module code, which allows us to resolve string type hints and navigate hints conveniently.
One way we could limit this, would be to only accept single, direct types. Meaning no Optional/Union/List or other generics. But we'd have to recognise these hints somehow, because resolving the complex hints (i.e. taking their instance) leads to warnings down the line when the value is used. Because we don't handle subscripts, though, I think we're in the clear. A hypothetical attempt at resolving Union[A, B]().method would not produce links because the subscript stops our resolving. But I'll have to think about this some more.
We should use function type hints to link argument usage. For example:
I'm 90 % sure this isn't a thing yet.
The text was updated successfully, but these errors were encountered: