There is a module_0 where it is stored until an undefined variable, for example tk :
tk: 'tk.Tk()' = None There is a module_1 where tk defined:
import module_0 module_0.tk = tk.Tk() There is a module_2 where tk used:
import module_0 module_0.tk.after() # тут не понимает что tk это tk.Tk() PyCharm does not understand that tk.Tk() lies in tk, for example, it does not continue .after , but it continues .StringVar , etc. It doesn’t understand the anotation with custom classes. All the latest versions.
How to change so that refactoring works?