-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
temp: test XBlock==6, which adds type annotations #35236
base: master
Are you sure you want to change the base?
Conversation
Sandbox deployment successful 🚀 |
Sandbox deployment successful 🚀 |
Sandbox deployment successful 🚀 |
53a7516
to
1790dfb
Compare
Sandbox deployment successful 🚀 |
1790dfb
to
3cb9afe
Compare
Sandbox deployment successful 🚀 |
a64ad1c
to
6c766c7
Compare
Sandbox deployment successful 🚀 |
In order to get typechecking to pass in XBlock, we needed to make ScorableXBlockMixin a subclass of XBlockMixin. This change, while sensible, creates an ambiguous method resolution order in the ProblemBlock, stemming from the fact that XModuleMixin inherits directly from XBlock. The fix is to simply make XModuleMixin inherit from XBlockMixin instead-- this makes sense because XModuleMixin is a helper mixin, not an XBlock itself. We then must add XBlock as an explicit subclass to all blocks which inherit from XBlock. This should have no functional impact, but *should* help us add type hints to the xmodule/ folder in the future. Using ProblemBlock as an example... before (XBlock < 6.0.0) we have: ProblemBlock <- ScorableXBlockMixin <- XModuleMixin <- XBlock <- Blocklike after (XBlock >= 6.0.0) we have: ProblemBlock <- ScorableXBlockMixin <- XBlockMixin <- Blocklike <- XModuleMixin <- XBlockMixin <- Blocklike <- XBlock <- Blocklike
6c766c7
to
c1ac6e1
Compare
Sandbox deployment successful 🚀 |
Sandbox deployment successful 🚀 |
Testing openedx/XBlock#761