Files
edx-platform/mypy.ini
Kyle McCormick 32275662b0 feat!: A Better API for Derived Settings (#36192)
The Python API for declaring derived settings was confusing to the uninitiated
reader, and also prone to spelling mistakes. This replaces the API with one
that is more readable and more concise, and updates the implementation of
`derive_settings` to properly derive settings declared using the new API.

BREAKING CHANGE: The `derived` and `derived_collection_entry` function are
replaced with the `Derived` class. We do not expect those functions to have
been used outside of edx-platform, but if they are, this commit will cause them
to loudly ImportError.

Note that there should be NO change in behavior to the `derive_settings`
function, which we DO know to be used by some external edx-platform plugins.

Part of: https://github.com/openedx/edx-platform/issues/36215
2025-02-04 14:57:43 -05:00

68 lines
1.9 KiB
INI

[mypy]
follow_imports = silent
ignore_missing_imports = True
allow_untyped_globals = True
plugins =
mypy_django_plugin.main,
mypy_drf_plugin.main
files =
cms/lib/xblock/upstream_sync.py,
cms/djangoapps/contentstore/rest_api/v2/views/downstreams.py,
openedx/core/djangoapps/content/learning_sequences,
openedx/core/djangoapps/content_staging,
openedx/core/djangoapps/content_libraries,
openedx/core/djangoapps/xblock,
openedx/core/lib/derived.py,
openedx/core/types,
openedx/core/djangoapps/content_tagging,
xmodule/util/keys.py,
xmodule/item_bank_block.py
[mypy.plugins.django-stubs]
# content_staging only works with CMS; others work with either, so we run mypy with CMS settings.
django_settings_module = "cms.envs.test"
# Selectively ignore packages known to be lacking type hints
[mypy-bridgekeeper.*]
ignore_missing_imports = True
[mypy-celery.*]
ignore_missing_imports = True
[mypy-celery_utils.*]
ignore_missing_imports = True
[mypy-completion.*]
ignore_missing_imports = True
[mypy-crum.*]
ignore_missing_imports = True
[mypy-ddt.*]
ignore_missing_imports = True
[mypy-edx_api_doc_tools.*]
ignore_missing_imports = True
[mypy-edx_django_utils.*]
ignore_missing_imports = True
[mypy-edx_proctoring.*]
ignore_missing_imports = True
[mypy-edx_rest_api_client.*]
ignore_missing_imports = True
[mypy-edx_rest_framework_extensions.*]
ignore_missing_imports = True
[mypy-eventtracking.*]
ignore_missing_imports = True
[mypy-fs.*]
ignore_missing_imports = True
[mypy-model_utils.*]
ignore_missing_imports = True
[mypy-openedx_events.*]
ignore_missing_imports = True
[mypy-organizations.*]
ignore_missing_imports = True
[mypy-search.*]
ignore_missing_imports = True
[mypy-rules.*]
ignore_missing_imports = True
[mypy-web_fragments.*]
ignore_missing_imports = True
[mypy-webob.*]
ignore_missing_imports = True
[mypy-xblock.*]
ignore_missing_imports = True