This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Rename of class method does nothing if class instance later assigned to None #940
Open
Description
VSCode, LS 0.2.53, Python 3.7 32-bit
Given this code:
class Calculatrice():
def add_numbers(self, first, second):
'''this is help for adding numbers'''
try:
return first + second
except:
return None
def multiply_numbers(self, one, two):
return one + two
calc = Calculatrice()
calc.add_numbers(1, 5)
calc = None
calculator2 = Calculatrice()
calculator2.add_numbers(1,1)
calculator2.multiply_numbers(2, 5)
Double click on add_numbers
on the line calc.add_numbers(1, 5)
and press F2, enter add_values
Result: nothing happens
Delete the calc = None
line
Repeat the rename, now it works