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

Function replace_readme_md

mirror.py:65–68  ·  view source on GitHub ↗
(content: str)

Source from the content-addressed store, hash-verified

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)
67 content = re.sub(r'rev = "v\d+\.\d+\.\d+"', f'rev = "v{version}"', content)
68 return re.sub(r"/ruff/\d+\.\d+\.\d+\.svg", f"/ruff/{version}.svg", content)
69
70 paths = {
71 "pyproject.toml": replace_pyproject_toml,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected