mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-07-04 15:03:01 +02:00
Enable ERA001: fix/rephrase commented-out code
This commit is contained in:
parent
82101ae4e4
commit
7f3ad8511c
@ -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
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -75,6 +75,4 @@ for filename in os.listdir(
|
||||
currentPath + "/" + filename,
|
||||
currentPath + "/" + secondFolderName + "/" + filename,
|
||||
)
|
||||
# else:
|
||||
# print(key)
|
||||
cv2.destroyAllWindows()
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user