fix: Add releaseStage-aware version comparison logic (#8998)
* ✨ (AccountMenu/index.tsx): Add computeNonPrereleaseVersion function to calculate non-prerelease version for comparing versions 📝 (utils.ts): Add computeNonPrereleaseVersion function to extract non-prerelease version for version comparison in AccountMenu component * refactor: replace computeNonPrereleaseVersion with stripReleaseStageFromVersion for version comparison in AccountMenu component - Updated AccountMenu to utilize stripReleaseStageFromVersion for determining the latest version. - Removed computeNonPrereleaseVersion function from utils and replaced it with stripReleaseStageFromVersion for clarity and consistency in version handling. * ✅ (strip-release-fn.test.ts): add standalone test for stripReleaseStageFromVersion function to avoid dependency issues in test environment * 📝 (strip-release-fn.test.ts): add detailed documentation for the stripReleaseStageFromVersion function to explain its functionality and examples * 🐛 (python_code_structured_tool.py): fix issue with handling default values in function arguments to prevent potential errors * [autofix.ci] apply automated fixes --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
169b687ed0
commit
264681bf32
5 changed files with 358 additions and 157 deletions
|
|
@ -298,7 +298,7 @@ class PythonCodeStructuredTool(LCToolComponent):
|
|||
if isinstance(default, ast.Name):
|
||||
func_arg["default"] = default.id
|
||||
elif isinstance(default, ast.Constant):
|
||||
func_arg["default"] = default.value
|
||||
func_arg["default"] = str(default.value) if default.value is not None else None
|
||||
|
||||
if arg.annotation:
|
||||
annotation_line = lines[arg.annotation.lineno - 1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue