rope icon indicating copy to clipboard operation
rope copied to clipboard

Rename Method allows rename functions using datamodels function names

Open jonh-copin opened this issue 1 month ago • 0 comments

Rename Method allows rename functions using datamodels function names

Steps to reproduce the behavior:

  1. Code before refactoring:
class Soma:
    def __init__(self, a, b):
        self.a = a
        self.b = b

    def total(self):
        return self.a + self.b

s = Soma(2, 3)
print(s.total())
print(s)
  1. Apply the rename method to Soma.total

  2. Code after refactoring:

class Soma:
    def __init__(self, a, b):
        self.a = a
        self.b = b

    def __str__(self):
        return self.a + self.b

s = Soma(2, 3)
print(s.__str__())
print(s)

jonh-copin avatar Nov 24 '25 19:11 jonh-copin