v1.3增加一个简单的越障模式

This commit is contained in:
myperworld committed 2025-11-22 22:52:53 +08:00
1 parent 9d56ba85f1
commit 7a1931cb72
1835 files changed
+475654 -1

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
import os
def cpu_count() -> int:
"""Get the number of CPUs."""
# Force sequential execution if NO_PARALLEL is set
if "GITHUB_ACTIONS" in os.environ:
return 1
no_parallel = os.environ.get("NO_PARALLEL", "0") in ["1", "true", "True"]
if no_parallel:
return 1
return os.cpu_count() or 1