Visual Studio Code is never able to populate the 'Quick Fix' contextual drop down, only displaying 'No Code Actions Available'
Python extension is installed, along with python3.7.3 and flake8, pep8.
To launch the Define Keybinding widget, press Ctrl+K Ctrl+K. The widget listens for key presses and renders the serialized JSON representation in the text box and below it, the keys that VS Code has detected under your current keyboard layout.
You can define a keyboard shortcut for any task. From the Command Palette (Ctrl+Shift+P), select Preferences: Open Keyboard Shortcuts File, bind the desired shortcut to the workbench.
The Python extension for VS Code currently doesn't offer any quick fixes.
Python extension started to support Quick Fix. First, function adding imports is supported.
Python in Visual Studio Code – November 2019 Release | Python
Python extension ver.2020.1.58038
and 2020.1.57204
have bug that it doesn't display Quick Fix.
If you haven't install Python extension, install it once.
2.Install ver.2019.11.50794
or 2019.11.49689
by following steps in below answer.
vs code - rollback extension/install specific extension version - Stack Overflow
Install Visual Studio Code - Insiders.
Download Visual Studio Code Insiders
2.Install Python extension once, then click [Reload Required] button.
3.Open Settings editor. (Ctrl + ,)
4.Search by keyword: "Insiders Channel", then change pulldown to "daily" or "weekly", and save Settings. Then, Visual Studio Code start to download Insider version of Python extension. (Below status bar displays progress)
5.When popup message "Please reload Visual Studio Code to use the insiders build of the Python extension." is displayed, click [Reload] button.
Don't forget that there are two requirement to use Quick Fix feature.
Set python.jediEnabled
to false in your settings.json file.
Open Command Palette. (View > Command Palette... or F1 or Ctrl + Shift + P)
2.Run "Python: Enable Linting" command.
3.Select "On" in the drop-down menu.
cf. Editing Python Code in Visual Studio Code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With