I'm trying to use a newer version of pylint with Pants. Even though I've got pylint set to version 2.8.2 in requirements.txt/poetry.lock, it seems that it kept getting built with version >=2.4.4,<2.5. After looking around in the docs, I discovered that that's the default pylint version in Pants. There's apparently an option to set an alternative version in pants.toml, which I'm able to use to lint my codebase using a more recent version of pylint.
However, I'd like to understand:
pylint at all instead of always using the most recent version (or the version specified in e.g. requirements.txt)?pylint version in Pants?Hey @martimlobao, welcome! Good questions.
Why does Pants have a default version of pylint at all
Mostly for stability for users, that we want to avoid the problem of your CI breaking overnight because of a new release. If it's unconstrainted, it's more susceptible to breaking on you.
We periodically update the default version, though, and then indicate that in the changelog as a User API Change.
what, if any, are the risks of using a newer pylint version in Pants?
There shouldn't be :) In fact, we'd love a patch to update the default version of Pylint if you're interested! It's nothing more than updating this line to be >=2.8.2,<2.9
See https://www.pantsbuild.org/docs/contributor-overview for a contributor guide. You could skip the parts about building the rust engine and testing things locally, given that this is a one line change.
(No worries if not interested)
Awesome, I'd love to submit a PR :)
Most helpful comment
Awesome, I'd love to submit a PR :)