96 may_fail=True,
97 ).stdout.decode().splitlines():
98 try:
99 pname, prop, value, source = line.split()100 pool_status[prop.strip()] = value.strip()
101 except (IndexError, ValueError):
102 continue
96 may_fail=True,
97 ).stdout.decode().splitlines():
98 try:
99 pname, prop, value, source = line.split()100 pool_status[prop.strip()] = value.strip()
101 except (IndexError, ValueError):
102 continue
218 made.
219 """
220 for bundle in bundles:
221 for tag, attrs in bundle.bundle_attrs.get('tags', {}).items():222 if not tuple(resolve_selector(f"tag:{tag}", items)):
223 items.add(TagFillerItem(bundle, tag, {'tags': {tag}}))
224
186 is_start = True
187
188 if digits > 0:
189 for i in range(digits):190 pwd += str(next(prng) % 10)
191 else:
192 # Strip trailing dash which is always added by the routine
80 self.failed = 0
81 self.total = 0
82
83 for item_id, result, duration in item_results: 84 self.total += 1
85 if result == Item.STATUS_ACTION_SUCCEEDED:
86 self.correct += 1
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()