Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/backend/base/langflow/alembic/migration_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
from pathlib import Path
from typing import Any

_PHASE_PATTERN = re.compile(r"Phase:\s*(EXPAND|MIGRATE|CONTRACT)", re.IGNORECASE)


class MigrationPhase(Enum):
EXPAND = "EXPAND"
Expand Down Expand Up @@ -304,13 +306,11 @@ def _extract_phase(self, content: str) -> MigrationPhase:
# TODO: Support phase detection from inline comments and function
# annotations, not just docstrings or top-level comments.
# Look in docstring or comments
phase_pattern = r"Phase:\s*(EXPAND|MIGRATE|CONTRACT)"
match = re.search(phase_pattern, content, re.IGNORECASE)
match = _PHASE_PATTERN.search(content)

if match:
phase_str = match.group(1).upper()
return MigrationPhase[phase_str]

return MigrationPhase.UNKNOWN

def _find_function(self, tree: ast.Module, name: str) -> ast.FunctionDef | None:
Expand Down
2 changes: 1 addition & 1 deletion src/lfx/src/lfx/_assets/component_index.json

Large diffs are not rendered by default.

Loading