mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Use new_dap_id in the IDMap
This commit is contained in:
parent
a7d9ad0345
commit
bd852710be
1 changed files with 3 additions and 3 deletions
|
|
@ -2,13 +2,13 @@
|
|||
# Licensed under the MIT License. See LICENSE in the project root
|
||||
# for license information.
|
||||
|
||||
from functools import partial
|
||||
import inspect
|
||||
import itertools
|
||||
import os
|
||||
import sys
|
||||
from types import CodeType
|
||||
|
||||
from debugpy.server import new_dap_id
|
||||
|
||||
|
||||
def evaluate(code, path=__file__, mode="eval"):
|
||||
# Setting file path here to avoid breaking here if users have set
|
||||
|
|
@ -173,7 +173,7 @@ class IDMap(object):
|
|||
def __init__(self):
|
||||
self._value_to_key = {}
|
||||
self._key_to_value = {}
|
||||
self._next_id = partial(next, itertools.count(0))
|
||||
self._next_id = new_dap_id
|
||||
|
||||
def obtain_value(self, key):
|
||||
return self._key_to_value[key]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue