sublimelsp / LSP-pyright

Python support for Sublime's LSP plugin provided through microsoft/pyright.
MIT License
127 stars 13 forks source link

Finds whitespace errors inside f-strings under Python 3.12 #274

Closed suedunham closed 10 months ago

suedunham commented 11 months ago

After installing Python version 3.12, pyright is finding spurious whitespace errors inside f-strings. For instance, it wants a space after the colon in f'C:\\{some_dir}' like it's a dictionary key. I'm also having trouble with "missing" whitespace after a comma inside an f-string as well.

I've reset the order of the entries in my PATH to put Python 3.11 above 3.12, and there "errors" are no longer flagged.

rchl commented 11 months ago

Try with those settings:

// Settings in here override those in "LSP-pyright/LSP-pyright.sublime-settings"
{
    "settings": {
        "python.analysis.logLevel": "Trace",
    }
}

And check LSP: Log Panel to see what version of Python is being used. You can paste whole logs if you can't figure it out yourself.

jfcherng commented 11 months ago

I can't reproduce this. Python 3.12.0 is the only version installed on my PC.

suedunham commented 10 months ago

Looking again, it doesn't seem to be happening for me either now. I don't know what changed. Perhaps I fingered the wrong linter?

LSP-utils updated in the last few days. I have no idea if that's related, but it is a thing that changed.

I guess I'll call off the dogs.