build: Move the pylint_django_settings plugin.

When it was located at the root of the project, it was sometimes not
getting loaded correctly since the root of the project is not a python
module, and producing the following error:

```
Command line or configuration file:1:0: E0013: Plugin 'pylint_django_settings' is impossible to load, is it installed ? ('No module named 'pylint_django_settings'') (bad-plugin-value)
```

This led all the pylint tests to fail.

This started happening more as we updated other dependencies via make
upgrade for some reason and led to inconsistent builds.  The move should
hopefully make the loading reliable and consistent.
This commit is contained in:
Feanil Patel
2025-06-02 13:43:10 -04:00
parent 86ded1c552
commit 49158e742c
4 changed files with 12 additions and 7 deletions

View File

@@ -64,7 +64,7 @@
# SERIOUSLY.
#
# ------------------------------
# Generated by edx-lint version: 5.3.0
# Generated by edx-lint version: 5.6.0
# ------------------------------
[*]
end_of_line = lf
@@ -97,4 +97,4 @@ max_line_length = 72
[*.rst]
max_line_length = 79
# eecef7d3f7f334de2348fe1b4b0b48d605f7dcab
# 3eb1e01bd9ba6cdf1e5d0a493581c4ea14404b67

View File

@@ -1,3 +1,8 @@
"""
This is a plugin that helps pylint figure out what DJANGO_SETTINGS_MODULE to use for linting different files. Since the
LMS and CMS files have different expectations about what django settings including which installed apps and settings are
set when the code is run.
"""
import os
import sys
@@ -40,7 +45,7 @@ def register(linter):
"""
Placeholder function to register the plugin with pylint.
"""
pass
return
def load_configuration(linter):

View File

@@ -64,12 +64,12 @@
# SERIOUSLY.
#
# ------------------------------
# Generated by edx-lint version: 5.4.1
# Generated by edx-lint version: 5.6.0
# ------------------------------
[MASTER]
ignore = ,.git,.tox,migrations,node_modules,.pycharm_helpers
persistent = yes
load-plugins = edx_lint.pylint,pylint_django_settings,pylint_django,pylint_celery,pylint_pytest
load-plugins = edx_lint.pylint,openedx.core.tests.pylint_django_settings,pylint_django,pylint_celery,pylint_pytest
[MESSAGES CONTROL]
enable =
@@ -414,4 +414,4 @@ int-import-graph =
[EXCEPTIONS]
overgeneral-exceptions = builtins.Exception
# 5aea7d7fb264005eb373099c856a54cdfa4f311c
# d6e4348dec0a8eb2752fc4fe02315286c298aeff

View File

@@ -1,7 +1,7 @@
# pylintrc tweaks for use with edx_lint.
[MASTER]
ignore+ = ,.git,.tox,migrations,node_modules,.pycharm_helpers
load-plugins = edx_lint.pylint,pylint_django_settings,pylint_django,pylint_celery,pylint_pytest
load-plugins = edx_lint.pylint,openedx.core.tests.pylint_django_settings,pylint_django,pylint_celery,pylint_pytest
[MESSAGES CONTROL]
disable+ =