Closed ryancausey closed 8 months ago
@ryancausey That check also ensures that the server can run successfully. We cannot remove that check, however, there is a way to run older black versions. To use a older black version: set black-formatter.interpreter
to a compatible version of python, set importStrategy
to useBundled
, but set black-interpreter.path
to black from the environment. this will run the server using the compatible version of python, but use black from your environment.
Another option is to pin the extension to a older version which supported python 3.7.
I ran into an issue in one of my older python 3.7 environments where the installed version of
black
,23.3.0
, would be able to format files but the extension would refuse to start because of thecheckVersion
function returnedfalse
.I believe that if the
black-formatter.importStrategy
is set tofromEnvironment
, this version check should not apply under the assumption that the installedblack
version in the environment works with the python version used for that environment.