pylint-django icon indicating copy to clipboard operation
pylint-django copied to clipboard

Values object has no attribute `good_names`

Open jdrew82 opened this issue 7 months ago • 1 comments

I updated my development environment to the latest version of pylint-django (2.5.5) and started getting this error when trying to run pylint tests:

Traceback (most recent call last):
  File "/usr/local/bin/pylint", line 8, in <module>
    sys.exit(run_pylint())
             ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pylint/__init__.py", line 22, in run_pylint
    PylintRun(argv or sys.argv[1:])
  File "/usr/local/lib/python3.11/site-packages/pylint/lint/run.py", line 330, in __init__
    args = _config_initialization(linter, args, reporter, verbose_mode=self.verbose)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pylint/config/config_initialization.py", line 44, in _config_initialization
    linter.load_plugin_modules(plugins)
  File "/usr/local/lib/python3.11/site-packages/pylint/lint/pylinter.py", line 645, in load_plugin_modules
    module.register(self)
  File "/usr/local/lib/python3.11/site-packages/pylint_django/plugin.py", line 48, in register
    load_configuration(linter)
  File "/usr/local/lib/python3.11/site-packages/pylint_django/plugin.py", line 13, in load_configuration
    linter.config.good_names += (
    ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Values' object has no attribute 'good_names'

When I pin the version back to 2.5.3 the error goes away so seems to be something changed in 2.5.4/2.5.5.

jdrew82 avatar Dec 13 '23 22:12 jdrew82

I had a similar problem, however when I upgraded my pylint package to version 2.17.7 (had 2.12.2 before) it started to work again for me.

In other words the combo:

pylint==2.17.7 pylint-django==2.5.5

seems to works fine.

stefanalfbo avatar Jan 22 '24 09:01 stefanalfbo