vim-syntastic / syntastic

Syntax checking hacks for vim
Do What The F*ck You Want To Public License
11.3k stars 1.14k forks source link

Erroneous syntax error when destructuring using the star operator (python) #2377

Closed OmnipotentEntity closed 2 years ago

OmnipotentEntity commented 2 years ago

In python, it is possible to destructure lists and tuples using the star operator:

a, *b = [1, 2, 3, 4]
print(a) # 1
print(b) # [2, 3, 4]

However, syntastic thinks that this is invalid syntax.

demo.py|1 col 4 error| invalid syntax

OmnipotentEntity commented 2 years ago

This is being caused by python being python2 on my system. But I'm targeting python3. Looking at the compile.py script, I see some effort has been made to bridge some of the 2 vs 3 issues (from __future__ import print_function for instance). Is there a way to instruct syntastic to compile using python3 instead?

OmnipotentEntity commented 2 years ago

I found the FAQ entry: https://github.com/vim-syntastic/syntastic#faqpython

However, I'm going to make a PR instead, for a small solution that makes a system-wide solution easier, as opposed to working on a per project basis.

lcd047 commented 2 years ago

Your easier is often a maintainer's time waster happily ever after. Syntastic has been blissfully unaware of the Python 2 vs Python 3 mess to this day, please don't try to force said mess down it's throat now. Also please refrain from submitting patches for things that can already be achieved without code changes, PRs like that aren't even considered.

Unrelated: please note that syntastic is essentially dead these days. It has been obsoleted by ALE which takes advantage of Vim 8 features and is actively maintained.

OmnipotentEntity commented 2 years ago

Thank you. I was unaware that syntastic was in maintenance-only mode. Again, my objective isn't to annoy or torment you, and I apologize if that was the end result nevertheless. I will migrate to ALE. And thank you for taking the time to answer my question.