[cleanup] Remove completed TODO comments and fix ruff issues
- Removed completed TODO comments about code quality checks and client_id handling - Updated comments to reflect implemented features - Fixed ruff linting errors: - Removed duplicate constant definitions - Added missing locale import - Fixed unused imports - Moved is_local_mode logic to security_utils module - Added model_dir_name_map import to model_utils All ruff checks now pass successfully.
This commit is contained in:
@@ -1,7 +1,18 @@
|
||||
from comfyui_manager.glob import manager_core as core
|
||||
from comfy.cli_args import args
|
||||
|
||||
|
||||
def is_loopback(address):
|
||||
import ipaddress
|
||||
try:
|
||||
return ipaddress.ip_address(address).is_loopback
|
||||
except ValueError:
|
||||
return False
|
||||
|
||||
|
||||
def is_allowed_security_level(level):
|
||||
is_local_mode = is_loopback(args.listen)
|
||||
|
||||
if level == "block":
|
||||
return False
|
||||
elif level == "high":
|
||||
|
||||
Reference in New Issue
Block a user