Unused argument 'root_service'
171 plugin_class.build(root_service)
172
173
174def setupAggregatorProcessor(root_service, settings):175 from carbon.aggregator.processor import AggregationProcessor # NOQA Register the plugin class
176 from carbon.aggregator.rules import RuleManager
177
Description
An unused argument can lead to confusions. It should be removed. If this variable is necessary, name the variable _
or start the name with unused
or _unused
.
Bad practice
def square(x, y=1):
return x * x
class MySubClass(MyClass):
def __init__(self, number):
self.value = 42 # argument `number` remains unused
Preferred:
def square(x):
return x * x
class MySubClass(MyClass):
def __init__(self, _):
self.value = 42