Comments (13)
I consider Move Refactorings (and Changing Signature) a fundamental functionality for every developer working on any non-trivial codebase. I've been a long term PyCharm user but I always give a try to VS Code once in a while to see if it is ready to be my primary IDE. Unfortunately lack of this sends me again back to PyCharm.
I'm also not sure if votes on this issue are the right measure of its importance. I think many developers who give VS Code a try but then are not able to do basic stuff which they are used to do easily in other IDEs like PyCharm just give up and go back to their IDE without digging deep into issues on GitHub in multiple different repos. It took me quite a while to land on this page.
from pylance-release.
I also consider this a very useful feature. I can't really list the use cases of this except for when I realize that a method/function that is already working properly would be better suited residing in another class/module, but changing all of its usages in the code would be really tedious and error-prone.
Right now I do it by using the Ctrl + Shift + H
functionality (Replace in Project), but having a foolproof, automated way would be awesome.
from pylance-release.
@bjarkemoensted we started doing incremental rollout for module rename refactoring. member move is being worked on. still require more work.
from pylance-release.
I believe people at Microsoft don't use VSCode at all... It is just impossible to be productive without refactorings, good auto complete, real auto import, and many other things. If you work without that stuff, dude.... download some pro tools and try them off to get inspired!
from pylance-release.
For auto-import completions from symbols in your workspace, that is explicitly #1055; I would comment there. It's expected at the moment for auto-imports from the workspace to work only on quick fixes, though we'd like to change that, which is what #1055 is all about.
This thread is about refactorings; I'd rather we continue conversations about auto imports in the right issue.
from pylance-release.
Thank you for the suggestion! We have marked this issue as "needs decision" to make sure we have a conversation about your idea. We plan to leave this feature request open for at least a month to see how many 👍 votes the opening comment gets to help us make our decision.
from pylance-release.
I believe people at Microsoft don't use VSCode at all... It is just impossible to be productive without refactorings, good auto complete, real auto import, and many other things. If you work without that stuff, dude.... download some pro tools and try them off to get inspired!
not sure what you're on about, but Pylance has most of the stuff you mentioned
from pylance-release.
Hi @disrupted, do you call this real auto import?
CleanShot.2021-10-13.at.12.32.34.mp4
It works in some cases where related stuff gets indexed, other way it won't work.
from pylance-release.
Can you please try enabling indexing with this?
"python.analysis.indexing": true
For user code, see also #1055.
from pylance-release.
@jakebailey I'm experiencing the same behavior as @cperezabo and I have enabled the indexing option long time ago (although when I checked it now, it says Unknow Configuration Setting
).
When I use some object from my workspace, at first I have to use Go to symbol in workspace
for this new symbol and wait until it shows the symbol in dropdown menu, which probably updates the index, then wait a few seconds and then it usually works. But in total this procedure takes longer than if I just wrote the import statement myself :(.
from pylance-release.
Can you please try enabling indexing with this?
"python.analysis.indexing": true
For user code, see also #1055.
@jakebailey, that doesn't work, I already tried it some time ago, at least not in the expected way.
from pylance-release.
Any updates on this? Not being able to refactor is a huge obstacle.
from pylance-release.
@cperezabo @hmoravec if you can open your own issue with issues you are having, it would be easier for us to track and address the issues. and leave this issue for the refactoring.
from pylance-release.
Related Issues (20)
- python HOT 1
- Syntax highlighting breaks down if you line break at curly bracket in f-strings
- Can pylance hint the add-to-builtiins vars and libs ? HOT 3
- support type checking in the vscode web extension HOT 1
- How to explicitly specify that Pylance only scans specific a few directories in a large multi-root workspace HOT 5
- Python Intellisense Fails after Forced VS Code Update HOT 5
- notebook cells sometimes get cycle.
- How to set pylance memory max limitation? HOT 6
- Imports refactoring on MOVE/RENAME of the entire package HOT 1
- How to remove unused imports from ALL files as a one-off task
- Protocol subtyping check fails for Protocol-typed argument of Protocol-typed function, provided as argument of another function HOT 6
- Import resolve failures are hard to figure out
- Add imports don't show up on first quick fix HOT 7
- Rename of a derived method renames the base method even if not an override HOT 3
- Symlinking a directory does not cause a reresolve of imports
- parse error on magic statement on ipython mode. HOT 9
- In a virtual workspace find all references ends up with duplicates
- Semantic colorization for quoted type annotations is inconsistent HOT 8
- Virtual workspace has duplicates for show call hierarchy
- Setting `python.analysis.nodeExecutable` in the user settings affects how pylance gets launched on VSCode remote HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pylance-release.