Enable ERA001: fix/rephrase commented-out code

This commit is contained in:
Krzysztof kuhy Rudnicki 2025-11-30 15:09:17 +01:00
parent dc34c0f9f3
commit 8a411fd872
4 changed files with 3 additions and 6 deletions

View File

@ -18,7 +18,7 @@ def test_backoff_sleep_increments_and_caps(monkeypatch):
b = backoff_sleep(b, base=0.1, cap=0.3)
assert b >= 1
assert len(slept) == 3
# 0.1, 0.2, 0.3 (capped)
# Expected sleep values: first=0.1, second=0.2, third=0.3 (capped)
assert slept[0] == 0.1
assert slept[1] == 0.2
assert slept[2] == 0.3

View File

@ -178,7 +178,7 @@ def _detect_total_mem_mb() -> int | None:
return int(psutil.virtual_memory().total // (1024 * 1024))
except Exception:
pass
# Fallback: Linux /proc/meminfo
# Fallback approach for Linux systems using proc meminfo.
try:
with open("/proc/meminfo", encoding="utf-8", errors="ignore") as f:
for line in f:
@ -319,7 +319,7 @@ def main():
except Exception:
pass
# Hash (MB)
# Configure hash table size in MB.
if "Hash" in options:
try:
if args.hash_mb is not None:

View File

@ -75,6 +75,4 @@ for filename in os.listdir(
currentPath + "/" + filename,
currentPath + "/" + secondFolderName + "/" + filename,
)
# else:
# print(key)
cv2.destroyAllWindows()

View File

@ -68,7 +68,6 @@ ignore = [
"S310", # suspicious-url-open - acceptable for scripts
"S110", # try-except-pass - common pattern in scripts
"S112", # try-except-continue - acceptable pattern
"ERA001", # commented-out-code - keeping for reference
"B023", # function-uses-loop-variable - common pattern with closures
"DTZ005", # datetime.now without tz - acceptable for local scripts
"E741", # ambiguous-variable-name - sometimes intentional (e.g. l for list)