Remove trivial & single-usage chain decorator
This commit is contained in:
parent
5eb271c684
commit
ead0285ecc
@ -40,9 +40,9 @@ class Module(SettingsBase):
|
||||
elif button == 3: # Right mouse button
|
||||
self.on_rightclick()
|
||||
|
||||
@chain
|
||||
def move(self, position):
|
||||
self.position = position
|
||||
return self
|
||||
|
||||
def on_leftclick(self):
|
||||
pass
|
||||
|
@ -10,15 +10,6 @@ from i3pystatus.core.exceptions import *
|
||||
from i3pystatus.core.imputil import ClassFinder
|
||||
|
||||
|
||||
def chain(fun):
|
||||
"""Method decorator to implicitly return `self` from the decorated method
|
||||
"""
|
||||
def chained(self, *args, **kwargs):
|
||||
fun(self, *args, **kwargs)
|
||||
return self
|
||||
return chained
|
||||
|
||||
|
||||
def lchop(string, prefix):
|
||||
"""Removes a prefix from string
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user