Ben Chuanlong Du's Blog

It is never too late to learn.

Tips on Python-Language-Server

pip3 install python-language-server[all]

References

https://github.com/palantir/python-language-server

https://github.com/tomv564/pyls-mypy

https://github.com/paradoxxxzero/pyls-isort

https://github.com/rupert/pyls-black

Format a String in Python

str.format

An exception will be thrown if the value for a key in the string is not specified, which means that you must specify values for all keys. However, it is OK if you specify values for keys that do not exist in the string. That is you can specify values for more keys than needed.