Following this philosophy, how about removing `parent` parameter to plugin 
constructor and pass it to register_plugin() instead? In this case plugin 
constructor will just provide a placeholder for storing reference to parent 
Spyder window, which is passed to register_plugin() that does all other 
complicated logic like calling SpyderPluginMixin.initilialize_plugin() etc.

The benefit of that:
 - discourage users from doing too much stuff in __init__() (obviously they 
can't do much without a reference to Spyder's main window)
 - add ability to control if plugin failed to register by checking return 
code of register_plugin() function

-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/spyderlib/-/3VRUGnI0s24J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/spyderlib?hl=en.

Reply via email to