MCPcopy Create free account
hub / github.com/apache/fory / _update_rust_version

Function _update_rust_version

ci/release.py:730–755  ·  view source on GitHub ↗
(lines, v)

Source from the content-addressed store, hash-verified

728
729
730def _update_rust_version(lines, v):
731 in_workspace_package = False
732 in_workspace_dependencies = False
733 for index, line in enumerate(lines):
734 stripped = line.strip()
735 if stripped == "[workspace.package]":
736 in_workspace_package = True
737 in_workspace_dependencies = False
738 continue
739 if stripped == "[workspace.dependencies]":
740 in_workspace_dependencies = True
741 in_workspace_package = False
742 continue
743 if stripped.startswith("[") and stripped.endswith("]"):
744 in_workspace_package = False
745 in_workspace_dependencies = False
746 if in_workspace_package and stripped.startswith("version = "):
747 lines[index] = f'version = "{v}"\n'
748 continue
749 if in_workspace_dependencies and re.match(r"\s*fory(-core|-derive)?\s*=", line):
750 lines[index] = re.sub(
751 r'(version\s*=\s*")([^"]+)(")',
752 r"\g<1>" + v + r"\3",
753 line,
754 )
755 return lines
756
757
758def _update_python_version(lines, v: str):

Callers

nothing calls this directly

Calls 2

matchMethod · 0.45
subMethod · 0.45

Tested by

no test coverage detected