Open RobFirth opened 1 year ago
Looks like we should migrate over to the new(er) API - https://pylint.pycqa.org/en/v2.16.0/development_guide/api/pylint.html
Expect this to look something like:
from io import StringIO
from pylint.lint import Run
from pylint.reporters.text import TextReporter
pylint_output = StringIO() # Custom open stream
reporter = TextReporter(pylint_output)
Run(args=["autoredactdevelop", "--rcfile='pyproject.toml'", "--output-format=json"], reporter=reporter, exit=False)
print(pylint_output.getvalue()) # Retrieve and print the text report
I've opened an issue on the pylint
repo - https://github.com/PyCQA/pylint/issues/8164
Description
Running the
check-pylint-import-errors
hook throws deprecation error.Details
The following error:
Seems to be linked to v2.16 of
pylint
. https://pylint.pycqa.org/en/latest/whatsnew/2/2.16/index.html, withepylint
migrated to https://github.com/emacsorphanage/pylint.Why are we using the emacs version of pylint anyway?
ah ok, so it's because we can then capture the output:
https://pylint.pycqa.org/en/v2.13.9/user_guide/run.html#:~:text=To%20silently%20run%20Pylint%20on,C0114%27%2C%20return_std%3DTrue