mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Remove debugpy.compat, custom !j formatter for JSON, and related helpers.
This commit is contained in:
parent
1965b47034
commit
0f428178b0
31 changed files with 240 additions and 408 deletions
|
|
@ -8,8 +8,6 @@
|
|||
import py.path
|
||||
import re
|
||||
|
||||
from debugpy.common import compat
|
||||
|
||||
_marked_line_numbers_cache = {}
|
||||
|
||||
|
||||
|
|
@ -34,13 +32,13 @@ def get_marked_line_numbers(path):
|
|||
except KeyError:
|
||||
pass
|
||||
|
||||
# Read as bytes, to avoid decoding errors on Python 3.
|
||||
# Read as bytes to avoid decoding errors.
|
||||
with open(path, "rb") as f:
|
||||
lines = {}
|
||||
for i, line in enumerate(f):
|
||||
match = re.search(br"#\s*@(.+?)\s*$", line)
|
||||
if match:
|
||||
markers = compat.force_unicode(match.group(1), "ascii")
|
||||
markers = match.group(1).decode("ascii")
|
||||
for marker in markers.split(","):
|
||||
lines[marker] = i + 1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue