mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 13:44:15 +08:00
Signed-off-by: Edward Z. Yang <ezyangfb.com> Pull Request resolved: https://github.com/pytorch/pytorch/pull/76089 Approved by: https://github.com/albanD
22 lines
480 B
Python
Executable File
22 lines
480 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import json
|
|
from pathlib import Path
|
|
|
|
|
|
def main() -> None:
|
|
folder = Path(".vscode")
|
|
recommended = json.loads((folder / "settings_recommended.json").read_text())
|
|
path = folder / "settings.json"
|
|
try:
|
|
current = json.loads(path.read_text())
|
|
except Exception:
|
|
current = {}
|
|
with open(path, "w") as f:
|
|
json.dump({**current, **recommended}, f, indent=2)
|
|
f.write("\n")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|