Extract variables and reindent to remove long lines.
@@ -462,9 +462,14 @@ class Toolbox(object):
tool._setup()
def register(self, point, **kwargs):
- """Return a decorator which registers the function at the given hook point."""
+ """
+ Return a decorator which registers the function
+ at the given hook point.
+ """
def decorator(func):
- setattr(self, kwargs.get('name', func.__name__), Tool(point, func, **kwargs))
+ attr_name = kwargs.get('name', func.__name__)
+ tool = Tool(point, func, **kwargs)
+ setattr(self, attr_name, tool)
return func
return decorator
