266 def load_key(self, key: bytes) -> None:
267 i: int
268 j: int
269 t: int270 padding_size = int((len(key) + 3) / 4) * 4 - len(key)
271 key = key + (b"\ " * padding_size) + struct.pack("<I", len(key))
272 for i in range(0, len(key), 4):
265
266 def load_key(self, key: bytes) -> None:
267 i: int
268 j: int269 t: int
270 padding_size = int((len(key) + 3) / 4) * 4 - len(key)
271 key = key + (b"\ " * padding_size) + struct.pack("<I", len(key))
258
259 def run(self):
260 while not self.__should_stop:
261 __socket, address = self.__socket.accept()262
263 def anonymous():
264 self.__handle(__socket)
An unused variable takes up space in the code, and can lead to confusion, and it should be removed. If this variable is necessary, name the variable _
to indicate that it will be unused, or start the name with unused
or _unused
.
def update():
for i in range(10): # Usused variable `i`
time.sleep(0.01)
display_result()
def update():
for _ in range(10):
time.sleep(0.01)
display_result()