refactor: hoist annotations for common settings with differing values #37800
+39
−33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Hoist annotations for annotated settings with a type definition of the setting. There turned out to be four such settings that had differing values between the CMS and LMS common.py modules:
ENABLE_DISCUSSION_HOME_PANELENABLE_MAX_FAILED_LOGIN_ATTEMPTSMAINTENANCE_BANNER_TEXTSTUDIO_NAME(
EVENT_BUS_PRODUCER_CONFIGis another but the annotation will be brought up to the common module in #37746).Supporting information
Closes #37281.
Testing instructions
In addition to
mypyand unit tests, I ranmake docsand verified the settings rendered correctly indocs/_build/html/references/settings.htmlanddocs/_build/html/references/featuretoggles.html.Deadline
None
Other information
ADR 0022 - Simplify Django Settings