The KernelPlugin.from_directory method says (emphasis mine): A .py file is parsed and a plugin created, the functions within as [sic] then combined with any other functions found. The python file ...