Unused argument 'width'
55 text.create_text()
56
57 def complex_button_content(
58 self, name: str, x: int, y: int, width: int, height: int 59 ) -> None:
60 # Draw the content of the complex button
61 if name == "btnSettings":
Unused argument 'text'
50 y: int,
51 width: int,
52 height: int,
53 text: str, 54 text_center: bool,
55 text_margin: list[int],
56 background_color: str,
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