I am not sure if this is a bokeh bug, or I am confusing something, but I get the following warning from Pylance, when using this very minimal code:
Argument of type “Model” cannot be assigned to parameter “obj” of type “UIElement | Application | ModifyDoc” in function “show”
Type “Model” cannot be assigned to type “UIElement | Application | ModifyDoc”
“Model” is incompatible with “UIElement”
“Model” is incompatible with “Application”
Type “Model” cannot be assigned to type “ModifyDoc”
from bokeh.plotting import figure, show
p = figure()
show(p)
if I change the second line to p: figure = figure() I don’t get a warning in the last line, but a warning in the second line:
Expression of type “Model” cannot be assigned to declared type “figure”
“Model” is incompatible with “figure”
Any thoughts on this?

