You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since #1611, elpy relies on the toml package to read black configuration files, which was a dependency of black at the time.
However, since version 21.7b0, black does not depend on toml anymore (cf psf/black#2301), thus toml is not installed automatically. If toml is not found, the black configuration file is ignored by elpy-black-fix-code.
I stumbled upon this after recreating the RPC venv for elpy, and it took me quite some time to understand why my code was not formatted according to my configuration, so I thought I'd let you know.
Since #1611, elpy relies on the
toml
package to read black configuration files, which was a dependency ofblack
at the time.However, since version 21.7b0,
black
does not depend ontoml
anymore (cf psf/black#2301), thustoml
is not installed automatically. Iftoml
is not found, the black configuration file is ignored byelpy-black-fix-code
.I stumbled upon this after recreating the RPC venv for elpy, and it took me quite some time to understand why my code was not formatted according to my configuration, so I thought I'd let you know.
Workaround
Install
toml
in the elpy RPC venv:Additional notes
Might be relevant: black now uses
tomli
to read toml files for python < 3.11, and the standard moduletomllib
for python >= 3.11.The text was updated successfully, but these errors were encountered: