Closed de-ranit closed 9 months ago
What is the version of black that you have in your terminal? can you update it to match the latest from the extension. also the equivalent way of launching it is this:
cat path/to/code/my_code.py | path/to/dir/miniconda3/envs/my_env/bin/python -m black --stdin-filename path/to/code/my_code.py -
Thank you very much. The version of black, I had in terminal is black, 23.9.1 (compiled: yes) Python (CPython) 3.10.13
. Updating black to 24.1.1 solved my issue.
The problem is back again after I restarted VS Code the next day. In terminal, now I also have black, 24.1.1 (compiled: yes) Python (CPython) 3.10.13
I am also having this issue. No formatter is working in vscode for python files specifically.
I am also facing this issue. I have been using this extension for a while without ever installing the black python package in the virtual environment. Installing the latest version of this package did not resolve the issue.
Of course, running black my_code.py
does work, but the extension does not. I have tried resetting the black formatter extension settings to default and restarting the black server (through the Command Palette CTRL+SHIFT+P
> Black Formatter: Restart Server
) to no avail.
I downgraded the black formatter extension to the previous version (v2023.6.0) and it solved the issue.
Just to verify in you run the following command do you see the formatted output?
cat path/to/code/my_code.py | path/to/env/bin/python -m black --stdin-filename path/to/code/my_code.py -
Which command or short cut are you using to trigger formatting:
Would it be possible to capture a gif or provide a minimal repro.
The main difference between 2023.6.0 and 2024.0.0 is the version of black that is shipped by default, and support for selection formatting.
This message:
comes from black itself. https://github.com/psf/black/blob/e026c93888f91a47a9c9f4e029f3eb07d96375e6/src/black/__init__.py#L680-L686
This is looking like a bug in the latest version of black
. If we can find a minimal repo, or pattern it would be useful when filing this on black.
Just to verify in you run the following command do you see the formatted output?
cat path/to/code/my_code.py | path/to/env/bin/python -m black --stdin-filename path/to/code/my_code.py -
Yes, it works and I get the formatted output
Which command or short cut are you using to trigger formatting:
Would it be possible to capture a gif or provide a minimal repro.
The main difference between 2023.6.0 and 2024.0.0 is the version of black that is shipped by default, and support for selection formatting.
Unfortunately I am not able to repro this locally:
Can you provide more detail on the environment you are using like version of python, packages installed etc.
None of the formatters are working. Not sure what else to try.
After update to 1.86.0, this extension stopped working with non-bundled black version.
In local environment, I have black 22.6.0
, extension description says it needs a minimum of 22.3.0
- so it should be ok.
But I've also tried to update to 24.1.1.
This is what I see in Output
=>Black Formatter
:
The log above is for black 22.6.0
. For 24.1.1
it is the same. However, the moment I switch black-formatter.importStrategy
from fromEnvironment
to useBundled
it is all fixed, with this output in the log:
And we can't easily switch project to the latest black version, unfortunately. Any help would be appreciated.
Unfortunately I am not able to repro this locally:
formatting_with_black_latest.mp4 Can you provide more detail on the environment you are using like version of python, packages installed etc.
OS:
VS Code running on Mac (M1 chip) OS Somona 14.2.1 (23C71)
The codes are on a remote server connected using Remote - SSH v0.108.0
OS on the remote server is CentOS Linux 8
.
VS Code:
Version: 1.86.0 (Universal)
Commit: 05047486b6df5eb8d44b2ecd70ea3bdf775fd937
Date: 2024-01-31T10:29:15.765Z
Electron: 27.2.3
ElectronBuildId: 26495564
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Darwin arm64 23.2.0
VS Code extensions installed on remote server
In user settings.json
"python.defaultInterpreterPath": "/path/to/miniconda3/envs/default_env/bin/python",
"terminal.integrated.inheritEnv": false,
"python.formatting.provider": "black",
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
},
Conda environment and packages
name: my_env
channels:
- anaconda
- conda-forge
- defaults
dependencies:
- _libgcc_mutex=0.1=main
- _openmp_mutex=5.1=1_gnu
- abseil-cpp=20211102.0=hd4dd3e8_0
- archspec=0.2.1=pyhd3eb1b0_0
- arrow-cpp=11.0.0=h374c478_2
- asciitree=0.3.3=py_2
- astroid=2.14.2=py310h06a4308_0
- asttokens=2.0.5=pyhd3eb1b0_0
- aws-c-common=0.6.8=h5eee18b_1
- aws-c-event-stream=0.1.6=h6a678d5_6
- aws-checksums=0.1.11=h5eee18b_2
- aws-sdk-cpp=1.8.185=h721c034_1
- backcall=0.2.0=pyhd3eb1b0_0
- blas=1.0=mkl
- blosc=1.21.3=h6a678d5_0
- bokeh=3.3.0=py310h2f386ee_0
- boltons=23.0.0=py310h06a4308_0
- boost-cpp=1.82.0=hdb19cb5_2
- bottleneck=1.3.5=py310ha9d4c09_0
- branca=0.7.1=pyhd8ed1ab_0
- brotli=1.0.9=h5eee18b_7
- brotli-bin=1.0.9=h5eee18b_7
- brotli-python=1.0.9=py310h6a678d5_7
- bzip2=1.0.8=h7b6447c_0
- c-ares=1.19.1=h5eee18b_0
- ca-certificates=2024.2.2=hbcca054_0
- cairo=1.16.0=hb05425b_5
- cffi=1.16.0=py310h5eee18b_0
- cfitsio=3.470=hb418390_7
- cftime=1.6.2=py310ha9d4c09_0
- click=8.1.7=py310h06a4308_0
- click-plugins=1.1.1=py_0
- cligj=0.7.2=pyhd8ed1ab_1
- cloudpickle=2.2.1=py310h06a4308_0
- cmcrameri=1.8=pyhd8ed1ab_0
- colorama=0.4.6=py310h06a4308_0
- comm=0.1.2=py310h06a4308_0
- conda=24.1.0=py310h06a4308_0
- conda-libmamba-solver=24.1.0=pyhd3eb1b0_0
- conda-package-handling=2.2.0=py310h06a4308_0
- conda-package-streaming=0.9.0=py310h06a4308_0
- contourpy=1.2.0=py310hdb19cb5_0
- cryptography=41.0.7=py310hdda0065_0
- cycler=0.11.0=pyhd3eb1b0_0
- cyrus-sasl=2.1.28=h52b45da_1
- cytoolz=0.12.2=py310h5eee18b_0
- dask=2023.9.3=pyhd8ed1ab_0
- dask-core=2023.9.3=pyhd8ed1ab_0
- dbus=1.13.18=hb2f20db_0
- debugpy=1.6.7=py310h6a678d5_0
- decorator=5.1.1=pyhd3eb1b0_0
- dill=0.3.7=py310h06a4308_0
- distributed=2023.9.3=pyhd8ed1ab_0
- distro=1.8.0=py310h06a4308_0
- entrypoints=0.4=py310h06a4308_0
- exceptiongroup=1.0.4=py310h06a4308_0
- executing=0.8.3=pyhd3eb1b0_0
- expat=2.5.0=h6a678d5_0
- fasteners=0.16.3=pyhd3eb1b0_0
- fiona=1.9.5=py310h1128e8f_0
- fmt=9.1.0=hdb19cb5_0
- folium=0.15.1=pyhd8ed1ab_0
- fontconfig=2.14.1=h4c34cd2_2
- fonttools=4.25.0=pyhd3eb1b0_0
- freetype=2.12.1=h4a9f257_0
- freexl=2.0.0=hf309648_0
- fsspec=2023.10.0=py310h06a4308_0
- gdal=3.6.2=py310h0daa840_4
- geopandas=0.14.3=pyhd8ed1ab_0
- geopandas-base=0.14.3=pyha770c72_0
- geos=3.8.0=he1b5a44_1
- geotiff=1.7.0=h2a26cda_3
- gflags=2.2.2=he6710b0_0
- giflib=5.2.1=h5eee18b_3
- glib=2.69.1=he621ea3_2
- glog=0.5.0=h2531618_0
- grpc-cpp=1.48.2=he1ff14a_1
- gst-plugins-base=1.14.1=h6a678d5_1
- gstreamer=1.14.1=h5eee18b_1
- hdf4=4.2.13=h3ca952b_2
- hdf5=1.12.1=h2b7332f_3
- heapdict=1.0.1=pyhd3eb1b0_0
- icu=73.1=h6a678d5_0
- idna=3.4=py310h06a4308_0
- importlib-metadata=6.0.0=py310h06a4308_0
- importlib_metadata=6.0.0=hd3eb1b0_0
- intel-openmp=2023.1.0=hdb19cb5_46306
- ipykernel=6.25.0=py310h2f386ee_0
- ipython=8.15.0=py310h06a4308_0
- ipywidgets=8.0.4=py310h06a4308_0
- isort=5.9.3=pyhd3eb1b0_0
- jedi=0.18.1=py310h06a4308_1
- jinja2=3.1.2=py310h06a4308_0
- joblib=1.2.0=py310h06a4308_0
- jpeg=9e=h5eee18b_1
- json-c=0.16=hc379101_0
- jsonpatch=1.32=pyhd3eb1b0_0
- jsonpointer=2.1=pyhd3eb1b0_0
- jupyter_client=8.6.0=py310h06a4308_0
- jupyter_core=5.5.0=py310h06a4308_0
- jupyterlab_widgets=3.0.9=py310h06a4308_0
- kealib=1.5.0=hd940352_1
- kiwisolver=1.4.4=py310h6a678d5_0
- krb5=1.20.1=h143b758_1
- lazy-object-proxy=1.6.0=py310h7f8727e_0
- lcms2=2.12=h3be6417_0
- ld_impl_linux-64=2.38=h1181459_1
- lerc=3.0=h295c915_0
- libarchive=3.6.2=h6ac8c49_2
- libboost=1.82.0=h109eef0_2
- libbrotlicommon=1.0.9=h5eee18b_7
- libbrotlidec=1.0.9=h5eee18b_7
- libbrotlienc=1.0.9=h5eee18b_7
- libclang=14.0.6=default_hc6dbbc7_1
- libclang13=14.0.6=default_he11475f_1
- libcups=2.4.2=h2d74bed_1
- libcurl=8.4.0=h251f7ec_1
- libdeflate=1.17=h5eee18b_1
- libedit=3.1.20230828=h5eee18b_0
- libev=4.33=h7f8727e_1
- libevent=2.1.12=hdbd6064_1
- libffi=3.4.4=h6a678d5_0
- libgcc-ng=11.2.0=h1234567_1
- libgdal=3.6.2=heb138ec_4
- libgfortran-ng=11.2.0=h00389a5_1
- libgfortran5=11.2.0=h1234567_1
- libgomp=11.2.0=h1234567_1
- libiconv=1.17=h166bdaf_0
- libkml=1.3.0=h096b73e_7
- libllvm14=14.0.6=hdb19cb5_3
- libmamba=1.5.6=haf1ee3a_0
- libmambapy=1.5.6=py310h2dafd23_0
- libnetcdf=4.8.1=h14805e7_4
- libnghttp2=1.57.0=h2d74bed_0
- libpng=1.6.39=h5eee18b_0
- libpq=12.15=hdbd6064_1
- libprotobuf=3.20.3=he621ea3_0
- libsodium=1.0.18=h7b6447c_0
- libsolv=0.7.24=he621ea3_0
- libspatialindex=1.9.3=h9c3ff4c_4
- libspatialite=5.1.0=h01e95a1_0
- libssh2=1.10.0=hdbd6064_2
- libstdcxx-ng=11.2.0=h1234567_1
- libthrift=0.15.0=h1795dd8_2
- libtiff=4.5.1=h6a678d5_0
- libuuid=1.41.5=h5eee18b_0
- libwebp=1.3.2=h11a3e52_0
- libwebp-base=1.3.2=h5eee18b_0
- libxcb=1.15=h7f8727e_0
- libxkbcommon=1.0.1=h5eee18b_1
- libxml2=2.10.4=hf1b16e4_1
- libzip=1.8.0=h6ac8c49_1
- llvmlite=0.41.0=py310he621ea3_0
- locket=1.0.0=py310h06a4308_0
- lz4=4.3.2=py310h5eee18b_0
- lz4-c=1.9.4=h6a678d5_0
- mapclassify=2.6.1=pyhd8ed1ab_0
- markupsafe=2.1.1=py310h7f8727e_0
- matplotlib=3.7.2=py310h06a4308_0
- matplotlib-base=3.7.2=py310h1128e8f_0
- matplotlib-inline=0.1.6=py310h06a4308_0
- mccabe=0.7.0=pyhd3eb1b0_0
- menuinst=2.0.2=py310h06a4308_0
- minizip=4.0.3=hf59b114_0
- mizani=0.9.2=py310h06a4308_0
- mkl=2023.1.0=h213fc3f_46344
- mkl-service=2.4.0=py310h5eee18b_1
- mkl_fft=1.3.8=py310h5eee18b_0
- mkl_random=1.2.4=py310hdb19cb5_0
- mpi=1.0=mpich
- mpi4py=3.1.4=py310hfc96bbd_0
- mpich=3.3.2=external_0
- msgpack-python=1.0.3=py310hd09550d_0
- munkres=1.1.4=py_0
- mysql=5.7.24=h721c034_2
- ncurses=6.4=h6a678d5_0
- nest-asyncio=1.5.6=py310h06a4308_0
- netcdf4=1.6.2=py310h6d89c78_0
- networkx=3.2.1=pyhd8ed1ab_0
- nspr=4.35=h6a678d5_0
- nss=3.89.1=h6a678d5_0
- numba=0.58.0=py310h1128e8f_0
- numcodecs=0.11.0=py310h6a678d5_0
- numexpr=2.8.7=py310h85018f9_0
- numpy=1.25.2=py310h5f9d8c6_0
- numpy-base=1.25.2=py310hb5e798b_0
- openjpeg=2.4.0=h3ad879b_0
- openssl=3.0.12=h7f8727e_0
- orc=1.7.4=hb3bc3d3_1
- packaging=23.1=py310h06a4308_0
- pandas=2.0.3=py310h1128e8f_0
- parso=0.8.3=pyhd3eb1b0_0
- partd=1.4.1=py310h06a4308_0
- patsy=0.5.3=py310h06a4308_0
- pcre=8.45=h295c915_0
- pcre2=10.42=hebb0a14_0
- pexpect=4.8.0=pyhd3eb1b0_3
- pickleshare=0.7.5=pyhd3eb1b0_1003
- pillow=10.0.1=py310ha6cbd5a_0
- pip=23.3.1=py310h06a4308_0
- pixman=0.40.0=h36c2ea0_0
- platformdirs=3.10.0=py310h06a4308_0
- plotnine=0.12.3=pyhd8ed1ab_0
- pluggy=1.0.0=py310h06a4308_1
- ply=3.11=py310h06a4308_0
- poppler=22.12.0=h9614445_3
- poppler-data=0.4.12=hd8ed1ab_0
- proj=9.3.1=he5811b7_0
- prompt-toolkit=3.0.36=py310h06a4308_0
- psutil=5.9.0=py310h5eee18b_0
- ptyprocess=0.7.0=pyhd3eb1b0_2
- pure_eval=0.2.2=pyhd3eb1b0_0
- pyarrow=11.0.0=py310h468efa6_1
- pybind11-abi=4=hd3eb1b0_1
- pycosat=0.6.6=py310h5eee18b_0
- pycparser=2.21=pyhd3eb1b0_0
- pygments=2.15.1=py310h06a4308_1
- pylint=2.16.2=py310h06a4308_0
- pyopenssl=23.2.0=py310h06a4308_0
- pyparsing=3.0.9=py310h06a4308_0
- pyproj=3.6.1=py310h6370d16_0
- pyqt=5.15.10=py310h6a678d5_0
- pyqt5-sip=12.13.0=py310h5eee18b_0
- pysocks=1.7.1=py310h06a4308_0
- python=3.10.13=h955ad1f_0
- python-dateutil=2.8.2=pyhd3eb1b0_0
- python-lmdb=1.4.1=py310h6a678d5_0
- python-tzdata=2023.3=pyhd3eb1b0_0
- python_abi=3.10=2_cp310
- pytz=2023.3.post1=py310h06a4308_0
- pyyaml=6.0.1=py310h5eee18b_0
- pyzmq=25.1.0=py310h6a678d5_0
- qhull=2020.2=h4bd325d_2
- qt-main=5.15.2=h53bd1ea_10
- re2=2022.04.01=h295c915_0
- readline=8.2=h5eee18b_0
- reproc=14.2.4=h295c915_1
- reproc-cpp=14.2.4=h295c915_1
- requests=2.31.0=py310h06a4308_0
- rtree=1.2.0=py310hbdcdc62_0
- ruamel.yaml=0.17.21=py310h5eee18b_0
- ruamel.yaml.clib=0.2.6=py310h5eee18b_1
- scikit-learn=1.3.0=py310h1128e8f_0
- scipy=1.11.3=py310h5f9d8c6_0
- seaborn=0.13.1=hd8ed1ab_0
- seaborn-base=0.13.1=pyhd8ed1ab_0
- setuptools=68.2.2=py310h06a4308_0
- sip=6.7.12=py310h6a678d5_0
- six=1.16.0=pyhd3eb1b0_1
- snappy=1.1.10=h6a678d5_1
- sortedcontainers=2.4.0=pyhd3eb1b0_0
- sqlite=3.41.2=h5eee18b_0
- stack_data=0.2.0=pyhd3eb1b0_0
- statsmodels=0.14.0=py310ha9d4c09_0
- tbb=2021.8.0=hdb19cb5_0
- tblib=1.7.0=pyhd3eb1b0_0
- threadpoolctl=2.2.0=pyh0d69192_0
- tiledb=2.3.3=h77177df_3
- tk=8.6.12=h1ccaba5_0
- tomli=2.0.1=py310h06a4308_0
- tomlkit=0.11.1=py310h06a4308_0
- toolz=0.12.0=py310h06a4308_0
- tornado=6.3.3=py310h5eee18b_0
- tqdm=4.65.0=py310h2f386ee_0
- traitlets=5.7.1=py310h06a4308_0
- truststore=0.8.0=py310h06a4308_0
- typing-extensions=4.7.1=py310h06a4308_0
- typing_extensions=4.7.1=py310h06a4308_0
- tzdata=2023c=h04d1e81_0
- uriparser=0.9.7=h5eee18b_0
- urllib3=1.26.18=py310h06a4308_0
- utf8proc=2.6.1=h27cfd23_0
- wcwidth=0.2.5=pyhd3eb1b0_0
- wheel=0.41.2=py310h06a4308_0
- widgetsnbextension=4.0.5=py310h06a4308_0
- wrapt=1.14.1=py310h5eee18b_0
- xarray=2023.9.0=pyhd8ed1ab_0
- xerces-c=3.2.4=h6a678d5_1
- xyzservices=2022.9.0=py310h06a4308_1
- xz=5.4.5=h5eee18b_0
- yaml=0.2.5=h7b6447c_0
- yaml-cpp=0.8.0=h6a678d5_0
- zarr=2.16.1=pyhd8ed1ab_0
- zeromq=4.3.4=h2531618_0
- zict=3.0.0=py310h06a4308_0
- zipp=3.11.0=py310h06a4308_0
- zlib=1.2.13=h5eee18b_0
- zstandard=0.19.0=py310h5eee18b_0
- zstd=1.5.5=hc292b87_0
- pip:
- aiosignal==1.3.1
- attrs==23.1.0
- black==24.1.1
- brokenaxes==0.5.0
- cartopy==0.22.0
- certifi==2023.7.22
- charset-normalizer==3.3.0
- cma==3.3.0.1
- cython==3.0.7
- dacite==1.8.1
- et-xmlfile==1.1.0
- filelock==3.13.1
- frozenlist==1.4.1
- gprof2dot==2022.7.29
- icoscp-core==0.3.0
- ipdb==0.13.13
- jsonschema==4.20.0
- jsonschema-specifications==2023.11.2
- matplotlib-scalebar==0.8.1
- moarchiving==0.6.0
- mycolorpy==1.5.1
- mypy-extensions==1.0.0
- openpyxl==3.1.2
- patchworklib==0.6.2
- pathspec==0.11.2
- permetrics==1.5.0
- protobuf==4.25.1
- pyshp==2.3.1
- ray==2.8.1
- referencing==0.32.0
- remote-plot==1.2.1
- rpds-py==0.15.2
- shapely==2.0.2
- snakeviz==2.2.0
- tuna==0.5.11
prefix: /path/to/miniconda3/envs/my_env
Another thing, I noticed just now is I have the issue of black formatter not working when /path/to/my_code.py follows a symlink. Black formatter is working if I open my code in VS Code without following a symlink.
Same issue here, no formatting anymore on VSC 1.86.0 with Black... Tried all the tips above, plus screwed up my settings here and there, no success. But... thanks to this note from @de-ranit, it is now "working" again! :
Black formatter is working if I open my code in VS Code without following a symlink.
So without using the mapped drive created with subst, I can still continue to work. I would strongly prefer to keep using the symlink though...
@werwack The symlink issue is with black itself, it was fixed in version 24.0.0.
@side2k If you have dependency on specific version of black then I recommend doing this:
"black-formatter.importStrategy": "useBundled",
"black-formatter.path": ["${interpreter}", "-m", "black"],
The above settings will make the extension use the bundled libs for communication, but black from your environment.
@karthiknadig any suggestions for me ? I've tried all of the above but still am not able to get it to work.
@stefmf Can you open your Output > Black Formatter logs and see what it says?
never mind i see the issue. it works but stops, if there is syntax issues.
The symlink issue is with black itself, it was fixed in version 24.0.0
I have black, 24.1.1 in terminal which works fine. Is the black shipped with the VS Code extension > =black, 24.0.0? If yes, why is it still not working in a path with symlink?
@de-ranit It might have to do with how black
is seeing the file. Because all we do in the extension is launch black
in the following form. This extension is a wrapper around black, all we do is transform the responses from black in a way VS Code understands.
cat <your script path> | python -m black --stdin-filename <your script path> -
The only think I can think of is that there is some mismatch due to which directory is used for cwd
. This should be in the logs. I suspect we might be using the resolved symlink directory but using the symlink path. You should be able to replicate this behaviro in terminal by cd-ing to the symlink target directory and then using the symlink script path.
> cd <symlink target workspace>
> cat <symlink script path> | python -m black --stdin-filename <symlink script path> -
Can confirm that cat <path> | python -m black --stdin-filename <path> -
works using the real paths, but not if they contain symlinks, so it seems to be an issue with black itself. Tested with latest black version 24.1.1
.
I also tried black --verbose /path/with/symlink/my_script.py
. It also produced /path/with/symlink/my_script.py ignored: is a symbolic link that points outside /actual/path/to/script No Python files are present to be formatted. Nothing to do 😴
. An issue (https://github.com/psf/black/issues/4205) has already been created in the black repository.
Leaving this issue open to update bundled black
after https://github.com/psf/black/issues/4205 is addressed upstream and released
Black released 24.2.0, hopefully that fixes issues here
In case this ever comes back in the future, I wrote the following script for debugging this before realizing that it had already been reported and fixed (note that a previous version of black had problems with symlinks only in the presence of pyproject.toml):
#!/usr/bin/env bash
verbose=""
if [ "$1" == "-v" ] || [ "$1" == "--verbose" ]; then
verbose=1
set -x
fi
if [ -z "$PYTHON" ]; then
PYTHON=python
fi
"$PYTHON" -m black --version
uname -a
testdir="$(mktemp -d)"
trap "rm -rf $testdir" EXIT
cd "$testdir"
subdir="."
mkdir -p "directory/$subdir"
ln -s directory symlink
cd "directory/$subdir"
runtest() {
for cwd in "directory" "symlink"; do
for usedir in "directory" "symlink"; do
cd "$testdir/$cwd/$subdir"
usefile="$testdir/$usedir/$subdir/test.py"
echo "import numpy as np# foo" > test.py
printf "%s in %s using %s..." "$1" "$cwd" "$usedir"
if [ -n "$verbose" ]; then
printf "\n"
echo "import numpy as np# foo" | "$PYTHON" -m black --stdin-filename "$usefile" -
printf "=====================================\n"
else
result="$(echo "import numpy as np# foo" | "$PYTHON" -m black --stdin-filename "$usefile" - 2>&1)"
if printf -- "$result" | grep -q "1 file reformatted."; then
printf "pass\n"
else
printf "fail\n"
fi
fi
done
done
}
runtest "without pyproject.toml"
touch pyproject.toml
runtest "with pyproject.toml"
@JasonGross you should recommend this as a smoke test to black
itself.
Today, my VS Code got updated to the following version: Version: 1.86.0 (Universal) Commit: 05047486b6df5eb8d44b2ecd70ea3bdf775fd937 Date: 2024-01-31T10:29:15.765Z Electron: 27.2.3 ElectronBuildId: 26495564 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Darwin arm64 23.2.0
I have Black Foramatter v2024.0.0.
I am not able to format my Python code after the VS Code update. The output log is following:
But running
black my_code.py
works perfectly fine. It doesn't work only when I right click on my code and select format document with -> black formatter. Black formatter used to work perfectly before the VS Code update.