Closed paul-morenkov closed 3 years ago
The last update on this project is two years old, and the walrus operator was introduced in Python 3.8, which was only released last year. The current autopep8 version should correctly format your code, but since SublimeAutoPEP8 packages its own version of it, installing a correct version in your python environment won't work. I think the only thing to do here is to update the packaged autopep8 and pycodestyle files.
In the meantime you could directly install autopep8 in a 3.8 environment and use it outside of sublime text.
I'm afraid it won't work even after the upgrade. Auto-formatting is running by SublimeText python interpreter, which is locked to version 3.3, and walrus operator is supporter starting python3.8.
The lines
autoformat as:
which is obviously not correct.