Skip to content
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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kdmccormick
Copy link
Member

@kdmccormick kdmccormick added the create-sandbox open-craft-grove should create a sandbox environment from this PR label Aug 6, 2024
@kdmccormick kdmccormick closed this Aug 6, 2024
@kdmccormick kdmccormick reopened this Aug 6, 2024
@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@kdmccormick kdmccormick force-pushed the kdmccormick/xblock-types branch 2 times, most recently from a64ad1c to 6c766c7 Compare August 20, 2024 19:10
@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

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
@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-sandbox open-craft-grove should create a sandbox environment from this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants