How data types are identified in new Python editor?

Hello, what’s the trick to make this work?
I understand that the variable’s data types are determined at run-time, so auto-complete should be technically impossible. At least, it was not possible in the old Python editor in Rhino 7.

image
image

Use type hinting in python 3:

line : Rhino.Geometry.Line = Rhino.Geometry.Line(....

This tells which data type is line for the autocompletion