Skip to content

Commit

Permalink
test: add data.py to acceptable isolated app imports
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ormsbee committed Oct 17, 2024
1 parent 0967728 commit 2ba2a77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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.*).
Expand Down

0 comments on commit 2ba2a77

Please sign in to comment.