microsoft / vscode-black-formatter

Formatting support for Python using the Black formatter
https://marketplace.visualstudio.com/items?itemName=ms-python.black-formatter
MIT License
144 stars 34 forks source link

Do not show commands when extension is not activated #514

Open ulugbekna opened 1 month ago

ulugbekna commented 1 month ago

Type: Bug

Repro:

  1. Have an instance of vscode where the "Black formatter" extension is not activated
  2. Open command palette and search "black formatter: restart server" -- :bug: you can see the command even when the extension is not activated, hence should not be possible to invoke, especially "restarting the server" seems irrelevant when the extension is not activated

Extension version: 2024.3.11371020 VS Code version: Code - Insiders 1.90.0-insider (81c89c4d00663e1718871bab2f9bf2064a060b63, 2024-05-22T09:32:08.138Z) OS version: Darwin arm64 23.4.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 Pro (8 x 2400)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|7, 6, 8| |Memory (System)|32.00GB (0.07GB free)| |Process Argv|--log github.vscode-pull-request-github=debug --crash-reporter-id 3184aec0-4b31-4764-bfb0-162155975430| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805:30301674 vsaa593cf:30376535 py29gd2263:31024238 c4g48928:30535728 vscrp:30624060 962ge761:30841072 pythongtdpath:30726887 welcomedialog:30812478 pythonidxpt:30768918 pythonnoceb:30776497 asynctok:30898717 dsvsc013:30777762 dsvsc014:30777825 dsvsc015:30821418 pythontestfixt:30866404 pythonregdiag2:30926734 pythonmypyd1:30859725 pythoncet0:30859736 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30870582 dsvsc016:30879898 dsvsc017:30880771 dsvsc018:30880772 cppperfnew:30980852 pythonait:30973460 showvideot:31016890 chatpanelt:31014475 01bff139:31013167 a69g1124:31018687 dvdeprecation:31040973 pythonprt:31036556 dwnewjupytercf:31046870 nb_pri_only:31052048 26j00206:31048877 ```
karthiknadig commented 1 month ago

This should probably go in the template itself, this is the same behavior for all extensions built on top of it.