Quick fix action to create class, method etc.
See original GitHub issueEnvironment data
- VS Code version: 1.27.2
- Extension version (available under the Extensions sidebar): 2018.8.0
- OS and version: Arch Linux
- Python version (& distribution if applicable, e.g. Anaconda): 3.6.6
- Type of virtual environment used: venv
Actual behavior
Pops up with “No code actions available”.
Expected behavior
Equivalent behaviour to IntelliJ IDEA: suggest creating a method bar
in class Foo
. Based on the property reference string this could then be extended to create other properties:
Foo.bar
would suggest creating a field (or possibly @property method).Foo.Bar
would suggest creating an inner class.
Steps to reproduce:
-
Create a Python file:
class Foo: pass Foo.bar()
-
Focus
bar
on line 5 -
Press Ctrl-.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:21
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Quick-Fixes and Context Actions | ReSharper Platform SDK
Quick -fixes are possible modifications that appear associated with a particular highlighting (i.e., a warning or an error). These typically ...
Read more >Common Quick Actions - Visual Studio - Microsoft Learn
This Quick Action allows you to convert block bodies into expression-bodied members for methods, constructors, operators, properties, indexers, ...
Read more >Quick Fix - IBM
Quick Fix · Create new method for references to methods that can not be resolved · Rename to a similar method for references...
Read more >How To Construct Classes and Define Objects in Python 3
In this tutorial, we'll go through creating classes, instantiating objects, initializing attributes with the constructor method, and working ...
Read more >Visual Studio Code Quick Constructor for Dart not working
if installed then try Ctrl + . within class and select Generate constructor. you can follow below numbers to quick fix the.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any news on this? The auto imports and imports cleaning are working fine but the “create class/function/property” quick actions for unresolved reference are still missing. As @emmanueld said, this really disrupts the workflow when switching from pyCharm to vscode.
I recently switched from pyCharm to VSCode, and this is a feature I was using a lot to fix error/warning in the code.
Is there any ETA for this function to work ?
Thanks