-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
too many classes in Qt #89
Comments
Ping @ccordoba12 @epatters @rkern @jonathanrocher @jdmarch - do you directly use any of the Qt console |
Certainly, that's one thing where it doesn't make much difference, because all of that will be in one repo post-split. |
Nop, we just use Edit: I think the other classes are there to create more generic interfaces (like a Python only frontend) but given that there haven't been any movement in that direction, I agree with the simplification. |
Yup, definitely appropriate for after the code split. I was just working on the qt code, and it was bugging me, so I opened an issue. There's a chance that it will bug me enough to just merge IPythonWidget and RichIPythonWidget between now and release, since the IPython-aware widget that doesn't understand anything but plain text intermediate doesn't make a lot of sense. But I don't think any of this is needed for 3.0. |
Based on my understanding, I would probably do the following:
That would bring the situation from 6 classes down to 3 or even 2, which I think would be a lot more manageable. One of the most confusing parts of working on the Qt code is the |
@minrk opened ipython/ipython#7325
We have too many classes and subclasses in the qtconsole code. Right now, we have:
RichIPythonWidget inherits from IPythonWidget inherits from FrontendWidget inherits from (HistoryConsoleWidget, BaseFrontendMixin) inherits from ConsoleWidget, and RichIPythonWidget is the only class we actually use. None of the intermediate classes serve any use.
I think a lot of this is abstraction for abstraction's sake, and we can get rid of most or all of these classes, leaving the one and only real final IPythonWidget as the implementation of all of these things, especially the BaseFrontendMixin, which is a Mixin only mixed into one class. The ConsoleWidget makes a certain amount of sense, since it contains a lot of generic logic, but I think at least, BaseFrontendMixin, FrontendWidget, IPythonWidget, and RichIPythonWidget should probably be consolidated into a single class.
The text was updated successfully, but these errors were encountered: