test: add data.py to acceptable isolated app imports

Per OEP-49, both api.py and data.py are allowed to be imported into
other apps:

https://open-edx-proposals.readthedocs.io/en/latest/best-practices/oep-0049-django-app-patterns.html#api-py
This commit is contained in:
David Ormsbee
2024-10-17 12:08:01 -04:00
parent 451012460d
commit 23c4276ec6

View File

@@ -183,9 +183,10 @@ isolated_apps =
openedx.core.djangoapps.xblock
openedx.core.lib.xblock_serializer
allowed_modules =
# Only imports from api.py are allowed elsewhere in the code
# Only imports from api.py and data.py are allowed elsewhere in the code
# See https://open-edx-proposals.readthedocs.io/en/latest/best-practices/oep-0049-django-app-patterns.html#api-py
api
data
[importlinter:contract:3]
name = Do not import apps from openedx-learning (only import from openedx_learning.api.* and openedx_learning.lib.*).