MCPcopy
hub / github.com/ComposioHQ/composio / _bump_pyproject_toml

Function _bump_pyproject_toml

python/scripts/bump.py:135–157  ·  view source on GitHub ↗
(file: Path, bump_type: t.Optional[str] = None)

Source from the content-addressed store, hash-verified

133
134
135def _bump_pyproject_toml(file: Path, bump_type: t.Optional[str] = None):
136 # Load config
137 content = file.read_text(encoding="utf-8")
138 config = tomli.loads(content)
139 project = t.cast(dict, config["project"])
140
141 # Extract meta
142 package = project["name"]
143 version = project["version"]
144
145 # Bump version
146 next_version = _get_version_update(
147 package=package,
148 version=version,
149 bump_type_selector=bump_type,
150 )
151 if next_version is None:
152 click.echo(f"* Skipping {package}")
153 return
154
155 click.echo(f"* Bumping {package} {version} -> {next_version}")
156 content = content.replace(f'version = "{version}"', f'version = "{next_version}"')
157 file.write_text(content, encoding="utf-8")
158
159
160def _bump_package(file: Path, bump_type: t.Optional[str] = None):

Callers 1

_bump_packageFunction · 0.85

Calls 2

_get_version_updateFunction · 0.85
replaceMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…