mirror of
https://github.com/katanemo/plano.git
synced 2026-05-30 14:25:15 +02:00
Update black hook for Python 3.14 (#857)
* Update pre-commit black to latest release * Reformat Python files for new black version
This commit is contained in:
parent
f019f05738
commit
82f34f82f2
13 changed files with 38 additions and 34 deletions
|
|
@ -19,7 +19,6 @@ from planoai.docker_cli import (
|
|||
stream_gateway_logs,
|
||||
)
|
||||
|
||||
|
||||
log = getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -189,26 +189,26 @@ def get_function_parameters(node: ast.FunctionDef, tree: ast.AST) -> list:
|
|||
if isinstance(
|
||||
arg.annotation.value, ast.Name
|
||||
) and arg.annotation.value.id in ["list", "tuple", "set", "dict"]:
|
||||
param_info[
|
||||
"type"
|
||||
] = f"{arg.annotation.value.id}" # e.g., "List", "Tuple", etc.
|
||||
param_info["type"] = (
|
||||
f"{arg.annotation.value.id}" # e.g., "List", "Tuple", etc.
|
||||
)
|
||||
else:
|
||||
param_info["type"] = "[UNKNOWN - PLEASE FIX]"
|
||||
|
||||
# Default for unknown types
|
||||
else:
|
||||
param_info[
|
||||
"type"
|
||||
] = "[UNKNOWN - PLEASE FIX]" # If unable to detect type
|
||||
param_info["type"] = (
|
||||
"[UNKNOWN - PLEASE FIX]" # If unable to detect type
|
||||
)
|
||||
|
||||
# Handle default values
|
||||
if default is not None:
|
||||
if isinstance(default, ast.Constant) or isinstance(
|
||||
default, ast.NameConstant
|
||||
):
|
||||
param_info[
|
||||
"default"
|
||||
] = default.value # Use the default value directly
|
||||
param_info["default"] = (
|
||||
default.value
|
||||
) # Use the default value directly
|
||||
else:
|
||||
param_info["default"] = "[UNKNOWN DEFAULT]" # Unknown default type
|
||||
param_info["required"] = False # Optional since it has a default value
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import yaml
|
|||
import logging
|
||||
from planoai.consts import PLANO_DOCKER_NAME
|
||||
|
||||
|
||||
# Standard env var for log level across all Plano components
|
||||
LOG_LEVEL_ENV = "LOG_LEVEL"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue