MCPcopy Index your code
hub / github.com/Kaliiiiiiiiii-Vinyzu/patchright-python / patch_file

Function patch_file

patch_python_package.py:9–11  ·  view source on GitHub ↗
(file_path: str, patched_tree: ast.AST)

Source from the content-addressed store, hash-verified

7patchright_version = os.environ.get('patchright_release') or os.environ.get('playwright_version')
8
9def patch_file(file_path: str, patched_tree: ast.AST) -> None:
10 with open(file_path, "w") as f:
11 f.write(ast.unparse(ast.fix_missing_locations(patched_tree)))
12
13# Adding _repo_version.py (Might not be intended but fixes the build)
14with open("playwright-python/playwright/_repo_version.py", "w") as f:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected