Skip to content

Conversation

@thehrh
Copy link
Contributor

@thehrh thehrh commented Dec 12, 2025

You might have noticed the many warnings emitted when running pylint. These are due to PISA's current pylintrc file, the last changes to which were made nearly seven years ago. At the time, Pylint 2.2.2 was the most recent release, whereas Pylint 4.0.4 was released a couple of weeks ago. The file was originally generated in 83e2832, possibly with Pylint 1.7, and only underwent three minor changes.

As a result, we are

  • specifying options that aren't recognised any longer:
E0015: Unrecognized option found: optimize-ast, files-output, no-space-check, bad-functions, function-name-hint, variable-name-hint, const-name-hint, attr-name-hint, argument-name-hint, class-attribute-name-hint, inlinevar-name-hint, class-name-hint, module-name-hint, method-name-hint (unrecognized-option)
W0012: Unknown option value for '--enable', expected a valid pylint message and got 'old-octal-literal' (unknown-option-value)
W0012: Unknown option value for '--enable', expected a valid pylint message and got 'old-ne-operator' (unknown-option-value)
W0012: Unknown option value for '--enable', expected a valid pylint message and got 'long-suffix' (unknown-option-value)

The new pylintrc in this PR accounts for all the changes to Pylint's configuration options, and has been condensed down to a minimal version, containing only PISA's non-default option values. I produced it by generating a new file from the existing configuration with Pylint 4.0.4 (pylint --generate-rcfile > <filename>), a new file with defaults only (pylint --rcfile="" --generate-rcfile > <filename2>), and comparing the two.

@thehrh
Copy link
Contributor Author

thehrh commented Dec 12, 2025

  • I still need to check whether there are any recent equivalent settings that I need to specify to replace the old unrecognised ones. If this turns out to be too much of an effort, I'd suggest to just ignore them and live with the fact that we've lost certain non-default configuration options.

  • Also, I want to check which minimum Pylint version we should now require in setup.py

@thehrh
Copy link
Contributor Author

thehrh commented Dec 12, 2025

Below are the results of some quick research on the 14 unrecognised options. Their functionality does not seem to be implemented any longer and I doubt anyone here cares about them.

@thehrh
Copy link
Contributor Author

thehrh commented Dec 12, 2025

Concerning the minimum version, the last version below 3.0 does not recognise "use-implicit-booleaness-not-comparison-to-string" and "use-implicit-booleaness-not-comparison-to-zero" option values for the "disable" option. Versions >= 3.0 do not seem to be troubled by the new pylintrc. There is probably no harm in requiring the latest release version though, let's see.

@thehrh
Copy link
Contributor Author

thehrh commented Dec 13, 2025

Local develop install was successful (got python 3.10.19 and pylint 4.0.4)

@thehrh
Copy link
Contributor Author

thehrh commented Dec 18, 2025

Finally, concerning the three unknown option values (W0012) above, they all seem to have been relevant during a Python 2 -> 3 transition, so there's nothing to do with respect to those either.

@thehrh thehrh marked this pull request as ready for review December 18, 2025 17:05
@thehrh thehrh merged commit ec3affe into master Dec 19, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants