Is this project dead? [a.k.a. Internal pylint version check throws exception]
mkielar opened this issue · 4 comments
Python 3.8.3
pylint==2.8.2
pylint-quotes==0.2.1
See pylintrc
in attached pylint_bug.zip
Running this configuration on a file containing:
foo = "bar"
results in an exception:
Traceback (most recent call last):
File "/c/tmp/pylint_bug/venv/bin/pylint", line 10, in <module>
sys.exit(run_pylint())
File "/c/tmp/pylint_bug/venv/lib64/python3.8/site-packages/pylint/__init__.py", line 24, in run_pylint
PylintRun(sys.argv[1:])
File "/c/tmp/pylint_bug/venv/lib64/python3.8/site-packages/pylint/lint/run.py", line 381, in __init__
linter.check(args)
File "/c/tmp/pylint_bug/venv/lib64/python3.8/site-packages/pylint/lint/pylinter.py", line 873, in check
self._check_files(
File "/c/tmp/pylint_bug/venv/lib64/python3.8/site-packages/pylint/lint/pylinter.py", line 907, in _check_files
self._check_file(get_ast, check_astroid_module, name, filepath, modname)
File "/c/tmp/pylint_bug/venv/lib64/python3.8/site-packages/pylint/lint/pylinter.py", line 933, in _check_file
check_astroid_module(ast_node)
File "/c/tmp/pylint_bug/venv/lib64/python3.8/site-packages/pylint/lint/pylinter.py", line 1067, in check_astroid_module
retval = self._check_astroid_module(
File "/c/tmp/pylint_bug/venv/lib64/python3.8/site-packages/pylint/lint/pylinter.py", line 1110, in _check_astroid_module
checker.process_tokens(tokens)
File "/c/tmp/pylint_bug/venv/lib64/python3.8/site-packages/pylint_quotes/checker.py", line 259, in process_tokens
self._process_string_token(token, start_row, start_col)
File "/c/tmp/pylint_bug/venv/lib64/python3.8/site-packages/pylint_quotes/checker.py", line 295, in _process_string_token
self._invalid_string_quote(
File "/c/tmp/pylint_bug/venv/lib64/python3.8/site-packages/pylint_quotes/checker.py", line 341, in _invalid_string_quote
**self.get_offset(col)
File "/c/tmp/pylint_bug/venv/lib64/python3.8/site-packages/pylint_quotes/checker.py", line 360, in get_offset
if (2, 2, 2) < pylint_version:
TypeError: '<' not supported between instances of 'int' and 'str'
Steps to reproduce:
python -m venv venv
. venv/bin/activate
pip install -r requirements.txt
pylint --rcfile pylintrc demo.py
Probable cause:
pylint
seems to have just changed versioning scheme: pylint-dev/pylint@pylint-2.8.1...v2.8.2- Which broke this line: https://github.com/edaniszewski/pylint-quotes/blob/master/pylint_quotes/checker.py#L360
It's broken with pylint 2.8.0 as well, 2.7.4 seems to work
I'm just going to leave this here for anytone looking for a solution:
pylint
promised to reintroduce numeric versions in2.8.3
to keep unmaintained zombies like this project pretend to still be alive. This was 3 weeks ago and2.8.3
is still not out, and there's zero activity on this project to provide any fix.- For anyone interested, there's also
flake8
and itsflake8-quotes
, which will do the same if you wish to introduce another linter or replacepylint
withflake8
. Mind thatflake8-quotes
starts to look a bit likepylint-quotes
with its maintainers stating that work's "halted for now due to lack of time"
We have moved on to using pylint
's built-in check-quote-consistency
. It's more lax, as it does not enforce single quotes everywhere, but it checks for quoting consistency, and that's still something.
To answer the title of the issue, the project is not wholly dead, but similar to the quote in a subsequent comment made by flake8-quotes, I do have a lack of time to maintain this project with any sense of urgency.
While unfortunate, such is the life of an open source maintianer who also works a day job and experiences burn out. I'm working through this and hopefully will have a fix in place for this in within the day.
Okay, just released a 0.2.2 version which should fix this. Sorry again for the delay, but thanks for the extensive write up + providing solutions in the intrim. Closing this out, but if the issue still persists with the 0.2.2 release, feel free to reopen / open a new issue!