-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename does not rename methods across classes in hierarchy #813
Comments
Furthermore, docstring of base method is not inherited in child method, even when there is no child method docstring. |
The original issue was about renaming class methods within a hierarchy, which requires some discussion/thought about what we think is the "correct" behavior; we currently have the safer behavior of not trying to modify a bunch of classes due to a rename. That docstring example is a different issue, but I'd be curious to see the example because that would indicate there's a bug in the inheritance code as a whole (as we definitely find docstrings). Do you have a codebase that reproduces this? |
Here I show you a demonstration where
Don't work on my side. In the attached gif, I don't show the renaming, because that is not the root cause of this problem, just a symptom of not finding references. Shall I open another issue based on this gif? |
Hm, I guess I don't see that behavior as "wrong" per se; there are no uses of the child method; finding references to the child method shouldn't be going back to the base class the base class technically doesn't call the child class. Would have to see how this is done in other LSs. RE: docs, I'd be interested in seeing what |
Local refactoring works very well as I've tried it, hoping that in the future, more advanced refactoring options will be possible in Pylance. Thank you for what we already have! |
This issue has been fixed in version 2022.4.1, which we've just released. You can find the changelog here: CHANGELOG.md |
Issue Type: Bug
If I refactor rename an overridden method, it does not rename the base class method, and vice versa. Also, no references are found. Basically, intellisense has no knowledge of polymorhpism, which can cause havoc in a large codebase, if someone does not know about this lack of feature.
I will provide additional info if needed.
Extension version: 2020.12.2
VS Code version: Code 1.52.1 (ea3859d4ba2f3e577a159bc91e3074c5d85c0523, 2020-12-16T16:34:46.910Z)
OS version: Windows_NT x64 10.0.17134
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: