-
Notifications
You must be signed in to change notification settings - Fork 173
Open
Labels
bugUnexpected or incorrect user-visible behaviorUnexpected or incorrect user-visible behavior
Description
The Inline Method refactoring does not inline all the attributes, causing 'NameError'
Steps to reproduce the behavior:
- Code before refactoring:
_registry = {}
def get_registry():
return _registry
def register(name, format_class):
get_registry()[name] = format_class
def usa_register():
print("antes:", get_registry())
register("redis", "MockRedisFormat")
print("depois:", get_registry())
usa_register()-
Apply the inline method to
StringlikeMixin.find -
Code after refactoring:
_registry = {}
def get_registry():
return _registry
def usa_register():
print("antes:", get_registry())
get_registry()[name] = "MockRedisFormat"
print("depois:", get_registry())
usa_register()Metadata
Metadata
Assignees
Labels
bugUnexpected or incorrect user-visible behaviorUnexpected or incorrect user-visible behavior