mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Add the debugger_protocol.arg packge.
This commit is contained in:
parent
66224aa085
commit
21d1611137
2 changed files with 18 additions and 0 deletions
1
debugger_protocol/arg/__init__.py
Normal file
1
debugger_protocol/arg/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
from ._common import NOT_SET, ANY # noqa
|
||||
17
debugger_protocol/arg/_common.py
Normal file
17
debugger_protocol/arg/_common.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
def sentinel(name):
|
||||
"""Return a named value to use as a sentinel."""
|
||||
class Sentinel(object):
|
||||
def __repr__(self):
|
||||
return name
|
||||
|
||||
return Sentinel()
|
||||
|
||||
|
||||
# NOT_SET indicates that an arg was not provided.
|
||||
NOT_SET = sentinel('NOT_SET')
|
||||
|
||||
# ANY is a datatype surrogate indicating that any value is okay.
|
||||
ANY = sentinel('ANY')
|
||||
|
||||
SIMPLE_TYPES = {None, bool, int, str}
|
||||
Loading…
Add table
Add a link
Reference in a new issue