I often need to identify when a method is renamed.
For example, in the following codes, we have two versions of the Sample class.
#version 1
class Sample:
def m3(self):
print("any")
We can see that there were two changes to this commit.
On line 3, print("added") was added and, on line 2, the m3 method was renamed to m5.
#version 2
class Sample:
def m5(self):
print("added")
print("any")
When we iterate over the commits, we can use the changed_methods method (class ModifiedFile) to identify the list of methods that were changed.
However, in the previous code snippets the m5 method is identified as a new method.
Is there a way to identify that the method has been renamed?
I often need to identify when a method is renamed.
For example, in the following codes, we have two versions of the
Sample
class.We can see that there were two changes to this commit. On line 3,
print("added")
was added and, on line 2, them3
method was renamed tom5
.When we iterate over the commits, we can use the
changed_methods
method (class ModifiedFile) to identify the list of methods that were changed. However, in the previous code snippets them5
method is identified as a new method.Is there a way to identify that the method has been renamed?