How to fix the Anaconda linter showing errors for f-strings in Sublime Text 3?
Asked Answered
M

1

20

The error shown is simply "[E]" so I'm not sure how to exempt this error in the Anaconda preferences.

e.g. the linter error for print(f"Hello, world!") says "[E] invalid syntax"

Monotype answered 19/9, 2017 at 20:4 Comment(2)
The [E] is for error.Shermy
truly an annoying error....Twospot
A
31

Edit your users preferences of Anaconda and add this:

"python_interpreter": "python3",

I have read somewhere that it was a known bug of python. It's fixed in version 3.6.3, so maybe you have to update your python version also. Mine was 3.6.3, so I don't know if it's necessary to update.

Abdominal answered 4/10, 2017 at 23:51 Comment(3)
for mac using Homebrew, a link to the alias did the trick: "python_interpreter": "/usr/local/bin/python3.6",Twospot
Thanks so much! Was annoying me so much. PS: I had to set mine to "python3.6" because my python3 points to python3.5 for good reasons.Ambrosia
While you're at it, you might also want to set "pep8_ignore": "W503" in order to prevent the (incorrect) complaints about PEP8 line breaks before binary operatorsUndersea

© 2022 - 2024 — McMap. All rights reserved.