Skip to content

Rename Method allows rename functions using datamodels function names #833

@jonh-copin

Description

@jonh-copin

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUnexpected or incorrect user-visible behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions