mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-08 12:37:44 +00:00
fix(security): resolve path-injection, B701, B101, B112 Bandit alerts
- Path injection (B614): centralized safe_resolve_path in core/utils.py, refactored 6 UI modules to use it with safe_root validation - B701: added explicit autoescape=select_autoescape() to Jinja2 Environment() calls in 3 files - B101: replaced assert statements with proper if/raise patterns in 12+ files (partial) - B112: added logger.warning() to bare except:continue blocks in 5 files
This commit is contained in:
@@ -30,7 +30,8 @@ def wait_retry(
|
||||
>>> counter
|
||||
2
|
||||
"""
|
||||
assert retry_n > 0, "retry_n should be greater than 0"
|
||||
if retry_n <= 0:
|
||||
raise ValueError("retry_n should be greater than 0")
|
||||
|
||||
def decorator(f: Callable[..., ASpecificRet]) -> Callable[..., ASpecificRet]:
|
||||
def wrapper(*args: Any, **kwargs: Any) -> ASpecificRet:
|
||||
|
||||
Reference in New Issue
Block a user