Skip to content

Commit

Permalink
Merge pull request #13 from zauberzeug/comments_in_workspace
Browse files Browse the repository at this point in the history
Allow parsing of code-workspaces which have comments
  • Loading branch information
rodja authored Oct 27, 2023
2 parents 8cda911 + 74d7f4d commit b6acdf6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions livesync/livesync.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env python3
import argparse
import asyncio
import json
import sys
from pathlib import Path
from typing import List

import pyjson5

from livesync import Folder, Mutex, Target


Expand All @@ -29,7 +30,7 @@ async def async_main() -> None:

folders: List[Folder] = []
if source.is_file():
workspace = json.loads(source.read_text())
workspace = pyjson5.decode(source.read_text())
paths = [Path(f['path']) for f in workspace['folders']]
folders = [Folder(p, target) for p in paths if p.is_dir()]
else:
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pathspec
pyjson5
watchfiles
pathspec

0 comments on commit b6acdf6

Please sign in to comment.