-
Notifications
You must be signed in to change notification settings - Fork 29
invalid syntax on async keyword #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
ping. Any more information I can provide? I removed all versions of flake8 from my virtualenvs and then installed it only in 3.5.0. I can post |
Is |
Thanks for taking a look!
Here's the smallest sample that should reproduce the error (through STL-flake8; this is still passing from the command line):
I start subl from
From the original console output, it seems to find the correct flake8:
No idea what the |
I'm having the exact same problem. Here's my bug report: Looking in the Sublime console SublimeLinter-flake8 loads the latest version of the underlying
Here's the output that the Sublime console gives. As you can see from the file path below it's the same
When I save the file I get:
The file looks like this: import asyncio
async def hello_world():
print("Hello World!")
... |
I have the same problem, and to my mind problem in outdated version of Any ideas? UPD: UPD2:
For this code:
So I'm going to debug deeper... |
So, bad news guys, I found why we got this error... Problem in Sublime builtin Python version and how pep8 linter works.
Looks good, very good, but let's try to run this code in Sublime console:
Ops.... Why? Because Sublime uses Python 3.3.3...
To my mind we have only one way to fix it — replace builtin Python, but I don't know is it possible or not. I found this issue, in Sublime tracker, but Python 3.5+ drops support for Windows XP and authors doesn't want upgrade Python (yeah that's really crazy)... Any ideas? UPD: I created request to upgrade Python version sublimehq/sublime_text#1163 |
So after seeing the Core#1163 issue play out... Option 1: Option 2: Option 3: Option 4: |
Please excuse my ignorance but aren't like all other linters already doing the linting through an external program already? If so, can't we use the same approach for Python code?
|
So that's option 1. It uses SL's To be honest I haven't looked into this more than opened the file and saw the issue in question. I'll try to give this some dev time tonight. |
I vote for the option 1, this solution should work and it is not depends on SL Python version. |
Alright, understood. Sounds like option 1 is the way to go then. |
* Never use builtin python 3.3 for linting Fixes SublimeLinter#33 * Make `show-code` actually work Fixes SublimeLinter#35 * Add option `executable` so you can point explicitly to a flake8 installation in case SL's which isn't smart enough (which it isn't on Windows)
Should be fixed by #38. |
* Never use builtin python 3.3 for linting Fixes SublimeLinter#33 * Make `show-code` actually work Fixes SublimeLinter#35 * Add option `executable` so you can point explicitly to a flake8 installation in case SL's which isn't smart enough (which it isn't on Windows)
* Never use builtin python 3.3 for linting Fixes SublimeLinter#33 * Make `show-code` actually work Fixes SublimeLinter#35 * Add option `executable` so you can point explicitly to a flake8 installation in case SL's which isn't smart enough (which it isn't on Windows)
* Never use builtin python 3.3 for linting Fixes SublimeLinter#33 * Make `show-code` actually work Fixes SublimeLinter#35 * Add option `executable` so you can point explicitly to a flake8 installation in case SL's which isn't smart enough (which it isn't on Windows)
Hello, this happened to me with spacevim and only install flake8 into me virtuel enviroment for solve. |
You should set |
I had same issue, and solved it add // SublimeLinter Settings - User
{
"paths": {
"linux": [],
"osx": ["~/flake8_env/bin"],
"windows": []
},
} |
When I flake8 the file from the command line everything passes, but I get invalid syntax from the plugin.
I'm using pyenv, but the shims seem to be loading correctly below, since it pulls the path from the global python version.
Output from editor open to file lint (conftest.py)
The text was updated successfully, but these errors were encountered: