chore: add ty + pre-commit hook and repeal even more ruff rules (#9504)
* auto fixes * auto fix pt2 and transitive deps and undefined var checking locals() * manual fixes (ignored or letta-code fixed) * fix circular import * remove all ignores, add FastAPI rules and Ruff rules * add ty and precommit * ruff stuff * ty check fixes * ty check fixes pt 2 * error on invalid
This commit is contained in:
@@ -225,7 +225,7 @@ def setup_signal_handlers():
|
||||
# Enable fault handler with file output
|
||||
try:
|
||||
faulthandler.enable(file=sys.stderr, all_threads=True)
|
||||
except:
|
||||
except Exception:
|
||||
pass # Faulthandler might not be available
|
||||
|
||||
# Set resource limits to prevent runaway processes
|
||||
@@ -234,7 +234,7 @@ def setup_signal_handlers():
|
||||
resource.setrlimit(resource.RLIMIT_AS, (1024 * 1024 * 1024, 1024 * 1024 * 1024))
|
||||
# Limit stack size to 8MB (default is often unlimited)
|
||||
resource.setrlimit(resource.RLIMIT_STACK, (8 * 1024 * 1024, 8 * 1024 * 1024))
|
||||
except:
|
||||
except Exception:
|
||||
pass # Resource limits might not be available
|
||||
|
||||
# Set environment variables
|
||||
|
||||
Reference in New Issue
Block a user