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

feat!: annotate types #761

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

Conversation

kdmccormick
Copy link
Member

@kdmccormick kdmccormick commented Jun 10, 2024

WIP. Will supersede #713

Test sandbox: openedx/edx-platform#35236

@kdmccormick kdmccormick mentioned this pull request Jun 10, 2024
@kdmccormick kdmccormick force-pushed the kdmccormick/types2 branch 5 times, most recently from 343f88d to 414973e Compare June 14, 2024 20:25
@kdmccormick kdmccormick changed the title feat: annotate types feat!: annotate types Jun 14, 2024
@kdmccormick kdmccormick force-pushed the kdmccormick/types2 branch 2 times, most recently from 0dbf212 to c091774 Compare August 20, 2024 17:06
@kdmccormick kdmccormick force-pushed the kdmccormick/types2 branch 2 times, most recently from 7103af6 to 0330c66 Compare August 27, 2024 16:08
_AutoNamedFieldsMetaclass was a hand-rolled way of capturing each
Field's name as it is defined on an XBlock. Since Python 3.6,
__set_name__ is part of the built-in Descriptor interface, providing
a more elegant way of achieving the same thing.
Without --keep-going, 'make html' showed a single error at a time.
With --keep-going, 'make html' shows them all in one big list.
(Either way, the build would fail if there are any warnings, as desired.)
WIP: annotate xblock/runtime.py
WIP: remove XBlock mixin from hierarchy, just use asserts, for backcompat?
WIP: DEPR non-string usage and definition keys?

BREAKING CHANGE: [Developers only]
Type-checked Python code using the XBlock API will likely need to be
updated in order to continue passing type-checking, since XBlock's
new annotations will trigger mypy (et al) to behave much more strictly.

NO BREAKING CHANGES for site operators, authors, learners, etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant