Method doesn't use the class instance and could be converted into a static method
13
14
15class TestMetricReceiversHandler(TestCase):
16 def test_build(self): 17 expected_plugins = sorted(['line', 'udp', 'pickle', 'protobuf'])
18
19 # amqp not supported with py3
Method doesn't use the class instance and could be converted into a static method
13 def __init__(self):
14 self.called = []
15
16 def parse_args(self, args): 17 return object(), args
18
19 def print_usage(self):
Description
The method doesn't use its bound instance. Decorate this method with @staticmethod
decorator, so that Python does not have to instantiate a bound method for every instance of this class thereby saving memory and computation. Read more about staticmethods here.