MCPcopy
hub / github.com/astral-sh/ruff-pre-commit / replace_pyproject_toml

Function replace_pyproject_toml

mirror.py:62–63  ·  view source on GitHub ↗
(content: str)

Source from the content-addressed store, hash-verified

60
61def process_version(version: Version) -> typing.Sequence[str]:
62 def replace_pyproject_toml(content: str) -> str:
63 return re.sub(r'"ruff==.*"', f'"ruff=={version}"', content)
64
65 def replace_readme_md(content: str) -> str:
66 content = re.sub(r"rev: v\d+\.\d+\.\d+", f"rev: v{version}", content)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected