Rename Field refactoring allows you to change the method parameter, causing inconsistent override
researcher175 opened this issue · 0 comments
researcher175 commented
Rename Field refactoring allows you to change the method parameter, causing inconsistent override
It would be nice if Rope sent an alert to prevent the user from changing the overridden method signature
- Steps to reproduce the behavior:
from abc import abstractmethod
class BaseTagger:
@abstractmethod
def tag(self, text, tokenize=True):
return
class PatternTagger(BaseTagger):
def tag(self, text, tokenize=True):
if not isinstance(text, str):
text = text.raw
return [text, tokenize]
- Apply the Rename Field refactoring with the new name 'tag' to the field 'PatternTagger.tag.text'