diff --git a/python/helpers/debugpy/_vendored/pydevd/__init__.py b/python/helpers/debugpy/_vendored/pydevd/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py index e2672a3e9c5c..69147c163866 100644 --- a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py @@ -96,11 +96,11 @@ def load_schema_data(): return json_schema_data -def load_custom_schema_data(): +def load_custom_schema_data(filename_in_current_dir): import os.path import json - json_file = os.path.join(os.path.dirname(__file__), "debugProtocolCustom.json") + json_file = os.path.join(os.path.dirname(__file__), filename_in_current_dir) with open(json_file, "rb") as json_contents: json_schema_data = json.loads(json_contents.read()) @@ -542,7 +542,9 @@ def gen_debugger_protocol(): raise AssertionError("Must be run with Python 3.6 onwards (to keep dict order).") classes_to_generate = create_classes_to_generate_structure(load_schema_data()) - classes_to_generate.update(create_classes_to_generate_structure(load_custom_schema_data())) + classes_to_generate.update(create_classes_to_generate_structure(load_custom_schema_data("debugProtocolCustom.json"))) + classes_to_generate.update(create_classes_to_generate_structure(load_custom_schema_data("debugProtocolCustomPyCharm.json"))) + class_to_generate = fill_properties_and_required_from_base(classes_to_generate) diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocolCustomPyCharm.json b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocolCustomPyCharm.json new file mode 100644 index 000000000000..334a0b56c547 --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocolCustomPyCharm.json @@ -0,0 +1,242 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Custom Debug Adapter Protocol", + "description": "Extension to the DAP to support additional features.", + "type": "object", + "definitions": { + "GetTableRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "Retrieve tabular data (e.g., DataFrame, numpy array, polars) from a variable/expression in the debuggee. Proxies to pydevd InternalTableCommand.", + "properties": { + "command": { + "type": "string", + "enum": [ + "getTable" + ] + }, + "arguments": { + "$ref": "#/definitions/GetTableArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "GetTableArguments": { + "type": "object", + "description": [ + "Arguments for 'getTable' request.", + "Values are evaluated in the context of the given thread/frame.", + "The 'command' (initCommand in server) is a Python expression that evaluates to a supported table-like object.", + "The 'commandType' selects the operation (DF_INFO, DF_DESCRIBE, VISUALIZATION_DATA, SLICE, SLICE_CSV)." + ], + "properties": { + "threadId": { + "type": [ + "string", + "integer" + ], + "description": "Thread identifier where the frame/expression should be evaluated." + }, + "frameId": { + "type": [ + "string", + "integer" + ], + "description": "Frame identifier within the given thread." + }, + "command": { + "type": "string", + "description": "Python expression that evaluates to the table-like object (e.g., variable name or expression)." + }, + "commandType": { + "type": "string", + "enum": [ + "DF_INFO", + "SLICE", + "SLICE_CSV", + "DF_DESCRIBE", + "VISUALIZATION_DATA", + "IMAGE_START_CHUNK_LOAD", + "IMAGE_CHUNK_LOAD", + "INSPECTIONS" + ] + }, + "start": { + "type": [ + "integer", + "null" + ], + "description": "Optional start row index (inclusive) for slice operations." + }, + "end": { + "type": [ + "integer", + "null" + ], + "description": "Optional end row index (exclusive) for slice operations." + }, + "format": { + "type": [ + "string", + "null" + ], + "description": "Optional backend-specific format hint (e.g., 'json', 'csv', dtype/precision hints)." + } + }, + "required": [ + "threadId", + "frameId", + "commandType" + ] + }, + "GetTableResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'getTable' request.", + "properties": { + "command": { + "type": "string", + "enum": [ + "getTable" + ] + }, + "body": { + "type": "object", + "properties": { + "result": { + "type": "string", + "description": "Opaque string payload with the result of the getTable operation." + } + } + } + }, + "required": [ + "body" + ] + } + ] + }, + "GetArrayRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "Retrieve array data from a variable/expression in the debuggee. Proxies to pydevd InternalArrayCommand.", + "properties": { + "command": { + "type": "string", + "enum": [ + "getArray" + ] + }, + "arguments": { + "$ref": "#/definitions/GetArrayArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "GetArrayArguments": { + "type": "object", + "description": "Arguments for 'getArray' request.", + "properties": { + "threadId": { + "type": [ + "string", + "integer" + ], + "description": "Thread identifier where the frame/expression should be evaluated." + }, + "frameId": { + "type": [ + "string", + "integer" + ], + "description": "Frame identifier within the given thread." + }, + "rowOffset": { + "type": "integer", + "description": "Row offset" + }, + "colOffset": { + "type": "integer", + "description": "Col offset" + }, + "rows": { + "type": "integer", + "description": "Rows" + }, + "cols": { + "type": "integer", + "description": "Columns" + }, + "format": { + "type": [ + "string", + "null" + ], + "description": "Optional backend-specific format hint (e.g., 'json', 'csv', dtype/precision hints)." + }, + "variableName": { + "type": "string", + "description": "Array variable name" + } + }, + "required": [ + "threadId", + "frameId", + "commandType" + ] + }, + "GetArrayResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'getTable' request.", + "properties": { + "command": { + "type": "string", + "enum": [ + "getArray" + ] + }, + "body": { + "type": "object", + "properties": { + "result": { + "type": "string", + "description": "Opaque string payload with the result of the requested operation." + } + } + } + }, + "required": [ + "body" + ] + } + ] + } + } +} \ No newline at end of file diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py index bdb66e121ccc..49d50669a82b 100644 --- a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py @@ -16,13 +16,21 @@ class ProtocolMessage(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "description": "Message type.", "_enum": ["request", "response", "event"]}, + "type": { + "type": "string", + "description": "Message type.", + "_enum": [ + "request", + "response", + "event" + ] + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, type, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -33,12 +41,13 @@ class ProtocolMessage(BaseSchema): self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) seq = self.seq dct = { - "type": type, - "seq": seq, + 'type': type, + 'seq': seq, } dct.update(self.kwargs) return dct @@ -55,44 +64,61 @@ class Request(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "description": "The command to execute." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "description": "The command to execute."}, "arguments": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Object containing arguments for the command.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Object containing arguments for the command." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, command, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param string command: The command to execute. :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] arguments: Object containing arguments for the command. """ - self.type = "request" + self.type = 'request' self.command = command self.seq = seq self.arguments = arguments self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command seq = self.seq arguments = self.arguments dct = { - "type": type, - "command": command, - "seq": seq, + 'type': type, + 'command': command, + 'seq': seq, } if arguments is not None: - dct["arguments"] = arguments + dct['arguments'] = arguments dct.update(self.kwargs) return dct @@ -108,44 +134,61 @@ class Event(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "description": "Type of event." }, - "type": {"type": "string", "enum": ["event"]}, - "event": {"type": "string", "description": "Type of event."}, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Event-specific information.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Event-specific information." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, event, seq=-1, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param string event: Type of event. :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Event-specific information. """ - self.type = "event" + self.type = 'event' self.event = event self.seq = seq self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) event = self.event seq = self.seq body = self.body dct = { - "type": type, - "event": event, - "seq": seq, + 'type': type, + 'event': event, + 'seq': seq, } if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct @@ -161,33 +204,58 @@ class Response(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -199,7 +267,7 @@ class Response(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -208,6 +276,7 @@ class Response(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -217,21 +286,21 @@ class Response(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_response("error") +@register_response('error') @register class ErrorResponse(BaseSchema): """ @@ -243,56 +312,79 @@ class ErrorResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", - "properties": {"error": {"$ref": "#/definitions/Message", "description": "A structured error message."}}, - }, + "properties": { + "error": { + "$ref": "#/definitions/Message", + "description": "A structured error message." + } + } + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param ErrorResponseBody body: + :param ErrorResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = ErrorResponseBody() else: - self.body = ErrorResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ErrorResponseBody else body + self.body = ErrorResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ErrorResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -302,48 +394,48 @@ class ErrorResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("cancel") +@register_request('cancel') @register class CancelRequest(BaseSchema): """ The `cancel` request is used by the client in two situations: - + - to indicate that it is no longer interested in the result produced by a specific request issued earlier - + - to cancel a progress sequence. - + Clients should only call this request if the corresponding capability `supportsCancelRequest` is true. - + This request has a hint characteristic: a debug adapter can only be expected to make a 'best effort' in honoring this request but there are no guarantees. - + The `cancel` request may return an error if it could not cancel an operation but a client should refrain from presenting this error to end users. - + The request that got cancelled still needs to send a response back. This can either be a normal result (`success` attribute true) or an error response (`success` attribute false and the `message` set to `cancelled`). - + Returning partial results from a cancelled request is possible but please note that a client has no generic way for detecting that a response is partial or not. - + The progress that got cancelled still needs to send a `progressEnd` event back. - + A client should not assume that progress just got cancelled after sending the `cancel` request. Note: automatically generated code. Do not edit manually. @@ -352,48 +444,57 @@ class CancelRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["cancel"]}, - "arguments": {"type": "CancelArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "cancel" + ] + }, + "arguments": { + "type": "CancelArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: + :param string type: + :param string command: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. - :param CancelArguments arguments: + :param CancelArguments arguments: """ - self.type = "request" - self.command = "cancel" + self.type = 'request' + self.command = 'cancel' self.seq = seq if arguments is None: self.arguments = CancelArguments() else: - self.arguments = ( - CancelArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != CancelArguments - else arguments - ) + self.arguments = CancelArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != CancelArguments else arguments self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command seq = self.seq arguments = self.arguments dct = { - "type": type, - "command": command, - "seq": seq, + 'type': type, + 'command': command, + 'seq': seq, } if arguments is not None: - dct["arguments"] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['arguments'] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct @@ -409,16 +510,16 @@ class CancelArguments(BaseSchema): __props__ = { "requestId": { "type": "integer", - "description": "The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request.", + "description": "The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request." }, "progressId": { "type": "string", - "description": "The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request.", - }, + "description": "The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, requestId=None, progressId=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -431,19 +532,21 @@ class CancelArguments(BaseSchema): self.progressId = progressId self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) requestId = self.requestId progressId = self.progressId - dct = {} + dct = { + } if requestId is not None: - dct["requestId"] = requestId + dct['requestId'] = requestId if progressId is not None: - dct["progressId"] = progressId + dct['progressId'] = progressId dct.update(self.kwargs) return dct -@register_response("cancel") +@register_response('cancel') @register class CancelResponse(BaseSchema): """ @@ -455,33 +558,58 @@ class CancelResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -493,7 +621,7 @@ class CancelResponse(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -502,6 +630,7 @@ class CancelResponse(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -511,44 +640,44 @@ class CancelResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_event("initialized") +@register_event('initialized') @register class InitializedEvent(BaseSchema): """ This event indicates that the debug adapter is ready to accept configuration requests (e.g. `setBreakpoints`, `setExceptionBreakpoints`). - + A debug adapter is expected to send this event when it is ready to accept configuration requests (but not before the `initialize` request has finished). - + The sequence of events/requests is as follows: - + - adapters sends `initialized` event (after the `initialize` request has returned) - + - client sends zero or more `setBreakpoints` requests - + - client sends one `setFunctionBreakpoints` request (if corresponding capability `supportsFunctionBreakpoints` is true) - + - client sends a `setExceptionBreakpoints` request if one or more `exceptionBreakpointFilters` have been defined (or if `supportsConfigurationDoneRequest` is not true) - + - client sends other future configuration requests - + - client sends one `configurationDone` request to indicate the end of the configuration. Note: automatically generated code. Do not edit manually. @@ -557,54 +686,73 @@ class InitializedEvent(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "enum": [ + "initialized" + ] }, - "type": {"type": "string", "enum": ["event"]}, - "event": {"type": "string", "enum": ["initialized"]}, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Event-specific information.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Event-specific information." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, seq=-1, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string event: + :param string type: + :param string event: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Event-specific information. """ - self.type = "event" - self.event = "initialized" + self.type = 'event' + self.event = 'initialized' self.seq = seq self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) event = self.event seq = self.seq body = self.body dct = { - "type": type, - "event": event, - "seq": seq, + 'type': type, + 'event': event, + 'seq': seq, } if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_event("stopped") +@register_event('stopped') @register class StoppedEvent(BaseSchema): """ The event indicates that the execution of the debuggee has stopped due to some condition. - + This can be caused by a breakpoint previously set, a stepping request has completed, by executing a debugger statement etc. @@ -614,10 +762,20 @@ class StoppedEvent(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "enum": [ + "stopped" + ] }, - "type": {"type": "string", "enum": ["event"]}, - "event": {"type": "string", "enum": ["stopped"]}, "body": { "type": "object", "properties": { @@ -633,79 +791,87 @@ class StoppedEvent(BaseSchema): "goto", "function breakpoint", "data breakpoint", - "instruction breakpoint", - ], + "instruction breakpoint" + ] }, "description": { "type": "string", - "description": "The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and can be translated.", + "description": "The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and can be translated." + }, + "threadId": { + "type": "integer", + "description": "The thread which was stopped." }, - "threadId": {"type": "integer", "description": "The thread which was stopped."}, "preserveFocusHint": { "type": "boolean", - "description": "A value of True hints to the client that this event should not change the focus.", + "description": "A value of True hints to the client that this event should not change the focus." }, "text": { "type": "string", - "description": "Additional information. E.g. if reason is `exception`, text contains the exception name. This string is shown in the UI.", + "description": "Additional information. E.g. if reason is `exception`, text contains the exception name. This string is shown in the UI." }, "allThreadsStopped": { "type": "boolean", - "description": "If `allThreadsStopped` is True, a debug adapter can announce that all threads have stopped.\n- The client should use this information to enable that all threads can be expanded to access their stacktraces.\n- If the attribute is missing or false, only the thread with the given `threadId` can be expanded.", + "description": "If `allThreadsStopped` is True, a debug adapter can announce that all threads have stopped.\n- The client should use this information to enable that all threads can be expanded to access their stacktraces.\n- If the attribute is missing or false, only the thread with the given `threadId` can be expanded." }, "hitBreakpointIds": { "type": "array", - "items": {"type": "integer"}, - "description": "Ids of the breakpoints that triggered the event. In most cases there is only a single breakpoint but here are some examples for multiple breakpoints:\n- Different types of breakpoints map to the same location.\n- Multiple source breakpoints get collapsed to the same instruction by the compiler/runtime.\n- Multiple function breakpoints with different function names map to the same location.", - }, + "items": { + "type": "integer" + }, + "description": "Ids of the breakpoints that triggered the event. In most cases there is only a single breakpoint but here are some examples for multiple breakpoints:\n- Different types of breakpoints map to the same location.\n- Multiple source breakpoints get collapsed to the same instruction by the compiler/runtime.\n- Multiple function breakpoints with different function names map to the same location." + } }, - "required": ["reason"], - }, + "required": [ + "reason" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string event: - :param StoppedEventBody body: + :param string type: + :param string event: + :param StoppedEventBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "event" - self.event = "stopped" + self.type = 'event' + self.event = 'stopped' if body is None: self.body = StoppedEventBody() else: - self.body = StoppedEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != StoppedEventBody else body + self.body = StoppedEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != StoppedEventBody else body self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) event = self.event body = self.body seq = self.seq dct = { - "type": type, - "event": event, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'event': event, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct -@register_event("continued") +@register_event('continued') @register class ContinuedEvent(BaseSchema): """ The event indicates that the execution of the debuggee has continued. - + Please note: a debug adapter is not expected to send this event in response to a request that implies that execution continues, e.g. `launch` or `continue`. - + It is only necessary to send a `continued` event if there was no previous request that implied this. Note: automatically generated code. Do not edit manually. @@ -714,60 +880,74 @@ class ContinuedEvent(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "enum": [ + "continued" + ] }, - "type": {"type": "string", "enum": ["event"]}, - "event": {"type": "string", "enum": ["continued"]}, "body": { "type": "object", "properties": { - "threadId": {"type": "integer", "description": "The thread which was continued."}, + "threadId": { + "type": "integer", + "description": "The thread which was continued." + }, "allThreadsContinued": { "type": "boolean", - "description": "If `allThreadsContinued` is True, a debug adapter can announce that all threads have continued.", - }, + "description": "If `allThreadsContinued` is True, a debug adapter can announce that all threads have continued." + } }, - "required": ["threadId"], - }, + "required": [ + "threadId" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string event: - :param ContinuedEventBody body: + :param string type: + :param string event: + :param ContinuedEventBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "event" - self.event = "continued" + self.type = 'event' + self.event = 'continued' if body is None: self.body = ContinuedEventBody() else: - self.body = ( - ContinuedEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ContinuedEventBody else body - ) + self.body = ContinuedEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ContinuedEventBody else body self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) event = self.event body = self.body seq = self.seq dct = { - "type": type, - "event": event, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'event': event, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct -@register_event("exited") +@register_event('exited') @register class ExitedEvent(BaseSchema): """ @@ -779,52 +959,70 @@ class ExitedEvent(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "enum": [ + "exited" + ] }, - "type": {"type": "string", "enum": ["event"]}, - "event": {"type": "string", "enum": ["exited"]}, "body": { "type": "object", - "properties": {"exitCode": {"type": "integer", "description": "The exit code returned from the debuggee."}}, - "required": ["exitCode"], - }, + "properties": { + "exitCode": { + "type": "integer", + "description": "The exit code returned from the debuggee." + } + }, + "required": [ + "exitCode" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string event: - :param ExitedEventBody body: + :param string type: + :param string event: + :param ExitedEventBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "event" - self.event = "exited" + self.type = 'event' + self.event = 'exited' if body is None: self.body = ExitedEventBody() else: - self.body = ExitedEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ExitedEventBody else body + self.body = ExitedEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ExitedEventBody else body self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) event = self.event body = self.body seq = self.seq dct = { - "type": type, - "event": event, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'event': event, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct -@register_event("terminated") +@register_event('terminated') @register class TerminatedEvent(BaseSchema): """ @@ -837,59 +1035,76 @@ class TerminatedEvent(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "enum": [ + "terminated" + ] }, - "type": {"type": "string", "enum": ["event"]}, - "event": {"type": "string", "enum": ["terminated"]}, "body": { "type": "object", "properties": { "restart": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "A debug adapter may set `restart` to True (or to an arbitrary object) to request that the client restarts the session.\nThe value is not interpreted by the client and passed unmodified as an attribute `__restart` to the `launch` and `attach` requests.", + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "A debug adapter may set `restart` to True (or to an arbitrary object) to request that the client restarts the session.\nThe value is not interpreted by the client and passed unmodified as an attribute `__restart` to the `launch` and `attach` requests." } - }, - }, + } + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, seq=-1, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string event: + :param string type: + :param string event: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. - :param TerminatedEventBody body: + :param TerminatedEventBody body: """ - self.type = "event" - self.event = "terminated" + self.type = 'event' + self.event = 'terminated' self.seq = seq if body is None: self.body = TerminatedEventBody() else: - self.body = ( - TerminatedEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != TerminatedEventBody else body - ) + self.body = TerminatedEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != TerminatedEventBody else body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) event = self.event seq = self.seq body = self.body dct = { - "type": type, - "event": event, - "seq": seq, + 'type': type, + 'event': event, + 'seq': seq, } if body is not None: - dct["body"] = body.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['body'] = body.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct -@register_event("thread") +@register_event('thread') @register class ThreadEvent(BaseSchema): """ @@ -901,55 +1116,79 @@ class ThreadEvent(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "enum": [ + "thread" + ] }, - "type": {"type": "string", "enum": ["event"]}, - "event": {"type": "string", "enum": ["thread"]}, "body": { "type": "object", "properties": { - "reason": {"type": "string", "description": "The reason for the event.", "_enum": ["started", "exited"]}, - "threadId": {"type": "integer", "description": "The identifier of the thread."}, + "reason": { + "type": "string", + "description": "The reason for the event.", + "_enum": [ + "started", + "exited" + ] + }, + "threadId": { + "type": "integer", + "description": "The identifier of the thread." + } }, - "required": ["reason", "threadId"], - }, + "required": [ + "reason", + "threadId" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string event: - :param ThreadEventBody body: + :param string type: + :param string event: + :param ThreadEventBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "event" - self.event = "thread" + self.type = 'event' + self.event = 'thread' if body is None: self.body = ThreadEventBody() else: - self.body = ThreadEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ThreadEventBody else body + self.body = ThreadEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ThreadEventBody else body self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) event = self.event body = self.body seq = self.seq dct = { - "type": type, - "event": event, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'event': event, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct -@register_event("output") +@register_event('output') @register class OutputEvent(BaseSchema): """ @@ -961,90 +1200,130 @@ class OutputEvent(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "enum": [ + "output" + ] }, - "type": {"type": "string", "enum": ["event"]}, - "event": {"type": "string", "enum": ["output"]}, "body": { "type": "object", "properties": { "category": { "type": "string", "description": "The output category. If not specified or if the category is not understood by the client, `console` is assumed.", - "_enum": ["console", "important", "stdout", "stderr", "telemetry"], + "_enum": [ + "console", + "important", + "stdout", + "stderr", + "telemetry" + ], "enumDescriptions": [ "Show the output in the client's default message UI, e.g. a 'debug console'. This category should only be used for informational output from the debugger (as opposed to the debuggee).", "A hint for the client to show the output in the client's UI for important and highly visible information, e.g. as a popup notification. This category should only be used for important messages from the debugger (as opposed to the debuggee). Since this category value is a hint, clients might ignore the hint and assume the `console` category.", "Show the output as normal program output from the debuggee.", "Show the output as error program output from the debuggee.", - "Send the output to telemetry instead of showing it to the user.", - ], + "Send the output to telemetry instead of showing it to the user." + ] + }, + "output": { + "type": "string", + "description": "The output to report." }, - "output": {"type": "string", "description": "The output to report."}, "group": { "type": "string", "description": "Support for keeping an output log organized by grouping related messages.", - "enum": ["start", "startCollapsed", "end"], + "enum": [ + "start", + "startCollapsed", + "end" + ], "enumDescriptions": [ "Start a new group in expanded mode. Subsequent output events are members of the group and should be shown indented.\nThe `output` attribute becomes the name of the group and is not indented.", "Start a new group in collapsed mode. Subsequent output events are members of the group and should be shown indented (as soon as the group is expanded).\nThe `output` attribute becomes the name of the group and is not indented.", - "End the current group and decrease the indentation of subsequent output events.\nA non-empty `output` attribute is shown as the unindented end of the group.", - ], + "End the current group and decrease the indentation of subsequent output events.\nA non-empty `output` attribute is shown as the unindented end of the group." + ] }, "variablesReference": { "type": "integer", - "description": "If an attribute `variablesReference` exists and its value is > 0, the output contains objects which can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + "description": "If an attribute `variablesReference` exists and its value is > 0, the output contains objects which can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The source location where the output was produced." + }, + "line": { + "type": "integer", + "description": "The source location's line where the output was produced." }, - "source": {"$ref": "#/definitions/Source", "description": "The source location where the output was produced."}, - "line": {"type": "integer", "description": "The source location's line where the output was produced."}, "column": { "type": "integer", - "description": "The position in `line` where the output was produced. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + "description": "The position in `line` where the output was produced. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." }, "data": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Additional data to report. For the `telemetry` category the data is sent to telemetry, for the other categories the data is shown in JSON format.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Additional data to report. For the `telemetry` category the data is sent to telemetry, for the other categories the data is shown in JSON format." + } }, - "required": ["output"], - }, + "required": [ + "output" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string event: - :param OutputEventBody body: + :param string type: + :param string event: + :param OutputEventBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "event" - self.event = "output" + self.type = 'event' + self.event = 'output' if body is None: self.body = OutputEventBody() else: - self.body = OutputEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != OutputEventBody else body + self.body = OutputEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != OutputEventBody else body self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) event = self.event body = self.body seq = self.seq dct = { - "type": type, - "event": event, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'event': event, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct -@register_event("breakpoint") +@register_event('breakpoint') @register class BreakpointEvent(BaseSchema): """ @@ -1056,60 +1335,80 @@ class BreakpointEvent(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "enum": [ + "breakpoint" + ] }, - "type": {"type": "string", "enum": ["event"]}, - "event": {"type": "string", "enum": ["breakpoint"]}, "body": { "type": "object", "properties": { - "reason": {"type": "string", "description": "The reason for the event.", "_enum": ["changed", "new", "removed"]}, + "reason": { + "type": "string", + "description": "The reason for the event.", + "_enum": [ + "changed", + "new", + "removed" + ] + }, "breakpoint": { "$ref": "#/definitions/Breakpoint", - "description": "The `id` attribute is used to find the target breakpoint, the other attributes are used as the new values.", - }, + "description": "The `id` attribute is used to find the target breakpoint, the other attributes are used as the new values." + } }, - "required": ["reason", "breakpoint"], - }, + "required": [ + "reason", + "breakpoint" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string event: - :param BreakpointEventBody body: + :param string type: + :param string event: + :param BreakpointEventBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "event" - self.event = "breakpoint" + self.type = 'event' + self.event = 'breakpoint' if body is None: self.body = BreakpointEventBody() else: - self.body = ( - BreakpointEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != BreakpointEventBody else body - ) + self.body = BreakpointEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != BreakpointEventBody else body self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) event = self.event body = self.body seq = self.seq dct = { - "type": type, - "event": event, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'event': event, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct -@register_event("module") +@register_event('module') @register class ModuleEvent(BaseSchema): """ @@ -1121,58 +1420,80 @@ class ModuleEvent(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "enum": [ + "module" + ] }, - "type": {"type": "string", "enum": ["event"]}, - "event": {"type": "string", "enum": ["module"]}, "body": { "type": "object", "properties": { - "reason": {"type": "string", "description": "The reason for the event.", "enum": ["new", "changed", "removed"]}, + "reason": { + "type": "string", + "description": "The reason for the event.", + "enum": [ + "new", + "changed", + "removed" + ] + }, "module": { "$ref": "#/definitions/Module", - "description": "The new, changed, or removed module. In case of `removed` only the module id is used.", - }, + "description": "The new, changed, or removed module. In case of `removed` only the module id is used." + } }, - "required": ["reason", "module"], - }, + "required": [ + "reason", + "module" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string event: - :param ModuleEventBody body: + :param string type: + :param string event: + :param ModuleEventBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "event" - self.event = "module" + self.type = 'event' + self.event = 'module' if body is None: self.body = ModuleEventBody() else: - self.body = ModuleEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ModuleEventBody else body + self.body = ModuleEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ModuleEventBody else body self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) event = self.event body = self.body seq = self.seq dct = { - "type": type, - "event": event, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'event': event, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct -@register_event("loadedSource") +@register_event('loadedSource') @register class LoadedSourceEvent(BaseSchema): """ @@ -1185,57 +1506,80 @@ class LoadedSourceEvent(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "enum": [ + "loadedSource" + ] }, - "type": {"type": "string", "enum": ["event"]}, - "event": {"type": "string", "enum": ["loadedSource"]}, "body": { "type": "object", "properties": { - "reason": {"type": "string", "description": "The reason for the event.", "enum": ["new", "changed", "removed"]}, - "source": {"$ref": "#/definitions/Source", "description": "The new, changed, or removed source."}, + "reason": { + "type": "string", + "description": "The reason for the event.", + "enum": [ + "new", + "changed", + "removed" + ] + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The new, changed, or removed source." + } }, - "required": ["reason", "source"], - }, + "required": [ + "reason", + "source" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string event: - :param LoadedSourceEventBody body: + :param string type: + :param string event: + :param LoadedSourceEventBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "event" - self.event = "loadedSource" + self.type = 'event' + self.event = 'loadedSource' if body is None: self.body = LoadedSourceEventBody() else: - self.body = ( - LoadedSourceEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != LoadedSourceEventBody else body - ) + self.body = LoadedSourceEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != LoadedSourceEventBody else body self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) event = self.event body = self.body seq = self.seq dct = { - "type": type, - "event": event, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'event': event, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct -@register_event("process") +@register_event('process') @register class ProcessEvent(BaseSchema): """ @@ -1248,90 +1592,107 @@ class ProcessEvent(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "enum": [ + "process" + ] }, - "type": {"type": "string", "enum": ["event"]}, - "event": {"type": "string", "enum": ["process"]}, "body": { "type": "object", "properties": { "name": { "type": "string", - "description": "The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js.", + "description": "The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js." }, "systemProcessId": { "type": "integer", - "description": "The system process id of the debugged process. This property is missing for non-system processes.", + "description": "The system process id of the debugged process. This property is missing for non-system processes." }, "isLocalProcess": { "type": "boolean", - "description": "If True, the process is running on the same computer as the debug adapter.", + "description": "If True, the process is running on the same computer as the debug adapter." }, "startMethod": { "type": "string", - "enum": ["launch", "attach", "attachForSuspendedLaunch"], + "enum": [ + "launch", + "attach", + "attachForSuspendedLaunch" + ], "description": "Describes how the debug engine started debugging this process.", "enumDescriptions": [ "Process was launched under the debugger.", "Debugger attached to an existing process.", - "A project launcher component has launched a new process in a suspended state and then asked the debugger to attach.", - ], + "A project launcher component has launched a new process in a suspended state and then asked the debugger to attach." + ] }, "pointerSize": { "type": "integer", - "description": "The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display.", - }, + "description": "The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display." + } }, - "required": ["name"], - }, + "required": [ + "name" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string event: - :param ProcessEventBody body: + :param string type: + :param string event: + :param ProcessEventBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "event" - self.event = "process" + self.type = 'event' + self.event = 'process' if body is None: self.body = ProcessEventBody() else: - self.body = ProcessEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ProcessEventBody else body + self.body = ProcessEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ProcessEventBody else body self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) event = self.event body = self.body seq = self.seq dct = { - "type": type, - "event": event, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'event': event, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct -@register_event("capabilities") +@register_event('capabilities') @register class CapabilitiesEvent(BaseSchema): """ The event indicates that one or more capabilities have changed. - + Since the capabilities are dependent on the client and its UI, it might not be possible to change that at random times (or too late). - + Consequently this event has a hint characteristic: a client can only be expected to make a 'best effort' in honoring individual capabilities but there are no guarantees. - + Only changed capabilities need to be included, all other capabilities keep their values. Note: automatically generated code. Do not edit manually. @@ -1340,62 +1701,78 @@ class CapabilitiesEvent(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "enum": [ + "capabilities" + ] }, - "type": {"type": "string", "enum": ["event"]}, - "event": {"type": "string", "enum": ["capabilities"]}, "body": { "type": "object", - "properties": {"capabilities": {"$ref": "#/definitions/Capabilities", "description": "The set of updated capabilities."}}, - "required": ["capabilities"], - }, + "properties": { + "capabilities": { + "$ref": "#/definitions/Capabilities", + "description": "The set of updated capabilities." + } + }, + "required": [ + "capabilities" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string event: - :param CapabilitiesEventBody body: + :param string type: + :param string event: + :param CapabilitiesEventBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "event" - self.event = "capabilities" + self.type = 'event' + self.event = 'capabilities' if body is None: self.body = CapabilitiesEventBody() else: - self.body = ( - CapabilitiesEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != CapabilitiesEventBody else body - ) + self.body = CapabilitiesEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != CapabilitiesEventBody else body self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) event = self.event body = self.body seq = self.seq dct = { - "type": type, - "event": event, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'event': event, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct -@register_event("progressStart") +@register_event('progressStart') @register class ProgressStartEvent(BaseSchema): """ The event signals that a long running operation is about to start and provides additional information for the client to set up a corresponding progress and cancellation UI. - + The client is free to delay the showing of the UI in order to reduce flicker. - + This event should only be sent if the corresponding capability `supportsProgressReporting` is true. Note: automatically generated code. Do not edit manually. @@ -1404,87 +1781,100 @@ class ProgressStartEvent(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "enum": [ + "progressStart" + ] }, - "type": {"type": "string", "enum": ["event"]}, - "event": {"type": "string", "enum": ["progressStart"]}, "body": { "type": "object", "properties": { "progressId": { "type": "string", - "description": "An ID that can be used in subsequent `progressUpdate` and `progressEnd` events to make them refer to the same progress reporting.\nIDs must be unique within a debug session.", + "description": "An ID that can be used in subsequent `progressUpdate` and `progressEnd` events to make them refer to the same progress reporting.\nIDs must be unique within a debug session." }, "title": { "type": "string", - "description": "Short title of the progress reporting. Shown in the UI to describe the long running operation.", + "description": "Short title of the progress reporting. Shown in the UI to describe the long running operation." }, "requestId": { "type": "integer", - "description": "The request ID that this progress report is related to. If specified a debug adapter is expected to emit progress events for the long running request until the request has been either completed or cancelled.\nIf the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter.", + "description": "The request ID that this progress report is related to. If specified a debug adapter is expected to emit progress events for the long running request until the request has been either completed or cancelled.\nIf the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter." }, "cancellable": { "type": "boolean", - "description": "If True, the request that reports progress may be cancelled with a `cancel` request.\nSo this property basically controls whether the client should use UX that supports cancellation.\nClients that don't support cancellation are allowed to ignore the setting.", + "description": "If True, the request that reports progress may be cancelled with a `cancel` request.\nSo this property basically controls whether the client should use UX that supports cancellation.\nClients that don't support cancellation are allowed to ignore the setting." + }, + "message": { + "type": "string", + "description": "More detailed progress message." }, - "message": {"type": "string", "description": "More detailed progress message."}, "percentage": { "type": "number", - "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown.", - }, + "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown." + } }, - "required": ["progressId", "title"], - }, + "required": [ + "progressId", + "title" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string event: - :param ProgressStartEventBody body: + :param string type: + :param string event: + :param ProgressStartEventBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "event" - self.event = "progressStart" + self.type = 'event' + self.event = 'progressStart' if body is None: self.body = ProgressStartEventBody() else: - self.body = ( - ProgressStartEventBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != ProgressStartEventBody - else body - ) + self.body = ProgressStartEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ProgressStartEventBody else body self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) event = self.event body = self.body seq = self.seq dct = { - "type": type, - "event": event, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'event': event, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct -@register_event("progressUpdate") +@register_event('progressUpdate') @register class ProgressUpdateEvent(BaseSchema): """ The event signals that the progress reporting needs to be updated with a new message and/or percentage. - + The client does not have to update the UI immediately, but the clients needs to keep track of the message and/or percentage values. - + This event should only be sent if the corresponding capability `supportsProgressReporting` is true. Note: automatically generated code. Do not edit manually. @@ -1493,71 +1883,83 @@ class ProgressUpdateEvent(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "enum": [ + "progressUpdate" + ] }, - "type": {"type": "string", "enum": ["event"]}, - "event": {"type": "string", "enum": ["progressUpdate"]}, "body": { "type": "object", "properties": { - "progressId": {"type": "string", "description": "The ID that was introduced in the initial `progressStart` event."}, + "progressId": { + "type": "string", + "description": "The ID that was introduced in the initial `progressStart` event." + }, "message": { "type": "string", - "description": "More detailed progress message. If omitted, the previous message (if any) is used.", + "description": "More detailed progress message. If omitted, the previous message (if any) is used." }, "percentage": { "type": "number", - "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown.", - }, + "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown." + } }, - "required": ["progressId"], - }, + "required": [ + "progressId" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string event: - :param ProgressUpdateEventBody body: + :param string type: + :param string event: + :param ProgressUpdateEventBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "event" - self.event = "progressUpdate" + self.type = 'event' + self.event = 'progressUpdate' if body is None: self.body = ProgressUpdateEventBody() else: - self.body = ( - ProgressUpdateEventBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != ProgressUpdateEventBody - else body - ) + self.body = ProgressUpdateEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ProgressUpdateEventBody else body self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) event = self.event body = self.body seq = self.seq dct = { - "type": type, - "event": event, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'event': event, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct -@register_event("progressEnd") +@register_event('progressEnd') @register class ProgressEndEvent(BaseSchema): """ The event signals the end of the progress reporting with a final message. - + This event should only be sent if the corresponding capability `supportsProgressReporting` is true. Note: automatically generated code. Do not edit manually. @@ -1566,70 +1968,84 @@ class ProgressEndEvent(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "enum": [ + "progressEnd" + ] }, - "type": {"type": "string", "enum": ["event"]}, - "event": {"type": "string", "enum": ["progressEnd"]}, "body": { "type": "object", "properties": { - "progressId": {"type": "string", "description": "The ID that was introduced in the initial `ProgressStartEvent`."}, + "progressId": { + "type": "string", + "description": "The ID that was introduced in the initial `ProgressStartEvent`." + }, "message": { "type": "string", - "description": "More detailed progress message. If omitted, the previous message (if any) is used.", - }, + "description": "More detailed progress message. If omitted, the previous message (if any) is used." + } }, - "required": ["progressId"], - }, + "required": [ + "progressId" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string event: - :param ProgressEndEventBody body: + :param string type: + :param string event: + :param ProgressEndEventBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "event" - self.event = "progressEnd" + self.type = 'event' + self.event = 'progressEnd' if body is None: self.body = ProgressEndEventBody() else: - self.body = ( - ProgressEndEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ProgressEndEventBody else body - ) + self.body = ProgressEndEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ProgressEndEventBody else body self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) event = self.event body = self.body seq = self.seq dct = { - "type": type, - "event": event, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'event': event, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct -@register_event("invalidated") +@register_event('invalidated') @register class InvalidatedEvent(BaseSchema): """ This event signals that some state in the debug adapter has changed and requires that the client needs to re-render the data snapshot previously requested. - + Debug adapters do not have to emit this event for runtime changes like stopped or thread events because in that case the client refetches the new state anyway. But the event can be used for example to refresh the UI after rendering formatting has changed in the debug adapter. - + This event should only be sent if the corresponding capability `supportsInvalidatedEvent` is true. Note: automatically generated code. Do not edit manually. @@ -1638,78 +2054,89 @@ class InvalidatedEvent(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "enum": [ + "invalidated" + ] }, - "type": {"type": "string", "enum": ["event"]}, - "event": {"type": "string", "enum": ["invalidated"]}, "body": { "type": "object", "properties": { "areas": { "type": "array", "description": "Set of logical areas that got invalidated. This property has a hint characteristic: a client can only be expected to make a 'best effort' in honoring the areas but there are no guarantees. If this property is missing, empty, or if values are not understood, the client should assume a single value `all`.", - "items": {"$ref": "#/definitions/InvalidatedAreas"}, + "items": { + "$ref": "#/definitions/InvalidatedAreas" + } }, "threadId": { "type": "integer", - "description": "If specified, the client only needs to refetch data related to this thread.", + "description": "If specified, the client only needs to refetch data related to this thread." }, "stackFrameId": { "type": "integer", - "description": "If specified, the client only needs to refetch data related to this stack frame (and the `threadId` is ignored).", - }, - }, - }, + "description": "If specified, the client only needs to refetch data related to this stack frame (and the `threadId` is ignored)." + } + } + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string event: - :param InvalidatedEventBody body: + :param string type: + :param string event: + :param InvalidatedEventBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "event" - self.event = "invalidated" + self.type = 'event' + self.event = 'invalidated' if body is None: self.body = InvalidatedEventBody() else: - self.body = ( - InvalidatedEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != InvalidatedEventBody else body - ) + self.body = InvalidatedEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != InvalidatedEventBody else body self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) event = self.event body = self.body seq = self.seq dct = { - "type": type, - "event": event, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'event': event, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct -@register_event("memory") +@register_event('memory') @register class MemoryEvent(BaseSchema): """ This event indicates that some memory range has been updated. It should only be sent if the corresponding capability `supportsMemoryEvent` is true. - + Clients typically react to the event by re-issuing a `readMemory` request if they show the memory identified by the `memoryReference` and if the updated memory range overlaps the displayed range. Clients should not make assumptions how individual memory references relate to each other, so they should not assume that they are part of a single continuous address range and might overlap. - + Debug adapters can use this event to indicate that the contents of a memory range has changed due to some other request like `setVariable` or `setExpression`. Debug adapters are not expected to emit this event for each and every memory change of a running program, because that information is @@ -1721,72 +2148,96 @@ class MemoryEvent(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "enum": [ + "memory" + ] }, - "type": {"type": "string", "enum": ["event"]}, - "event": {"type": "string", "enum": ["memory"]}, "body": { "type": "object", "properties": { - "memoryReference": {"type": "string", "description": "Memory reference of a memory range that has been updated."}, - "offset": {"type": "integer", "description": "Starting offset in bytes where memory has been updated. Can be negative."}, - "count": {"type": "integer", "description": "Number of bytes updated."}, + "memoryReference": { + "type": "string", + "description": "Memory reference of a memory range that has been updated." + }, + "offset": { + "type": "integer", + "description": "Starting offset in bytes where memory has been updated. Can be negative." + }, + "count": { + "type": "integer", + "description": "Number of bytes updated." + } }, - "required": ["memoryReference", "offset", "count"], - }, + "required": [ + "memoryReference", + "offset", + "count" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string event: - :param MemoryEventBody body: + :param string type: + :param string event: + :param MemoryEventBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "event" - self.event = "memory" + self.type = 'event' + self.event = 'memory' if body is None: self.body = MemoryEventBody() else: - self.body = MemoryEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != MemoryEventBody else body + self.body = MemoryEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != MemoryEventBody else body self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) event = self.event body = self.body seq = self.seq dct = { - "type": type, - "event": event, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'event': event, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct -@register_request("runInTerminal") +@register_request('runInTerminal') @register class RunInTerminalRequest(BaseSchema): """ This request is sent from the debug adapter to the client to run a command in a terminal. - + This is typically used to launch the debuggee in a terminal provided by the client. - + This request should only be called if the corresponding client capability `supportsRunInTerminalRequest` is true. - + Client implementations of `runInTerminal` are free to run the command however they choose including issuing the command to a command line interpreter (aka 'shell'). Argument strings passed to the `runInTerminal` request must arrive verbatim in the command to be run. As a consequence, clients which use a shell are responsible for escaping any special shell characters in the argument strings to prevent them from being interpreted (and modified) by the shell. - + Some users may wish to take advantage of shell processing in the argument strings. For clients which implement `runInTerminal` using an intermediary shell, the `argsCanBeInterpretedByShell` property can be set to true. In this case the client is requested not to escape any special shell characters @@ -1798,46 +2249,55 @@ class RunInTerminalRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["runInTerminal"]}, - "arguments": {"type": "RunInTerminalRequestArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "runInTerminal" + ] + }, + "arguments": { + "type": "RunInTerminalRequestArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param RunInTerminalRequestArguments arguments: + :param string type: + :param string command: + :param RunInTerminalRequestArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "runInTerminal" + self.type = 'request' + self.command = 'runInTerminal' if arguments is None: self.arguments = RunInTerminalRequestArguments() else: - self.arguments = ( - RunInTerminalRequestArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != RunInTerminalRequestArguments - else arguments - ) + self.arguments = RunInTerminalRequestArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != RunInTerminalRequestArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -1854,35 +2314,46 @@ class RunInTerminalRequestArguments(BaseSchema): __props__ = { "kind": { "type": "string", - "enum": ["integrated", "external"], - "description": "What kind of terminal to launch. Defaults to `integrated` if not specified.", + "enum": [ + "integrated", + "external" + ], + "description": "What kind of terminal to launch. Defaults to `integrated` if not specified." + }, + "title": { + "type": "string", + "description": "Title of the terminal." }, - "title": {"type": "string", "description": "Title of the terminal."}, "cwd": { "type": "string", - "description": "Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command.", + "description": "Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command." }, "args": { "type": "array", - "items": {"type": "string"}, - "description": "List of arguments. The first argument is the command to run.", + "items": { + "type": "string" + }, + "description": "List of arguments. The first argument is the command to run." }, "env": { "type": "object", "description": "Environment key-value pairs that are added to or removed from the default environment.", "additionalProperties": { - "type": ["string", "null"], - "description": "A string is a proper value for an environment variable. The value `null` removes the variable from the environment.", - }, + "type": [ + "string", + "null" + ], + "description": "A string is a proper value for an environment variable. The value `null` removes the variable from the environment." + } }, "argsCanBeInterpretedByShell": { "type": "boolean", - "description": "This property should only be set if the corresponding capability `supportsArgsCanBeInterpretedByShell` is True. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells.", - }, + "description": "This property should only be set if the corresponding capability `supportsArgsCanBeInterpretedByShell` is True. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells." + } } - __refs__ = set(["env"]) + __refs__ = set(['env']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, cwd, args, kind=None, title=None, env=None, argsCanBeInterpretedByShell=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -1900,14 +2371,11 @@ class RunInTerminalRequestArguments(BaseSchema): if env is None: self.env = RunInTerminalRequestArgumentsEnv() else: - self.env = ( - RunInTerminalRequestArgumentsEnv(update_ids_from_dap=update_ids_from_dap, **env) - if env.__class__ != RunInTerminalRequestArgumentsEnv - else env - ) + self.env = RunInTerminalRequestArgumentsEnv(update_ids_from_dap=update_ids_from_dap, **env) if env.__class__ != RunInTerminalRequestArgumentsEnv else env self.argsCanBeInterpretedByShell = argsCanBeInterpretedByShell self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) cwd = self.cwd args = self.args @@ -1918,22 +2386,22 @@ class RunInTerminalRequestArguments(BaseSchema): env = self.env argsCanBeInterpretedByShell = self.argsCanBeInterpretedByShell dct = { - "cwd": cwd, - "args": args, + 'cwd': cwd, + 'args': args, } if kind is not None: - dct["kind"] = kind + dct['kind'] = kind if title is not None: - dct["title"] = title + dct['title'] = title if env is not None: - dct["env"] = env.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['env'] = env.to_dict(update_ids_to_dap=update_ids_to_dap) if argsCanBeInterpretedByShell is not None: - dct["argsCanBeInterpretedByShell"] = argsCanBeInterpretedByShell + dct['argsCanBeInterpretedByShell'] = argsCanBeInterpretedByShell dct.update(self.kwargs) return dct -@register_response("runInTerminal") +@register_response('runInTerminal') @register class RunInTerminalResponse(BaseSchema): """ @@ -1945,69 +2413,83 @@ class RunInTerminalResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { "processId": { "type": "integer", - "description": "The process ID. The value should be less than or equal to 2147483647 (2^31-1).", + "description": "The process ID. The value should be less than or equal to 2147483647 (2^31-1)." }, "shellProcessId": { "type": "integer", - "description": "The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1).", - }, - }, - }, + "description": "The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1)." + } + } + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param RunInTerminalResponseBody body: + :param RunInTerminalResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = RunInTerminalResponseBody() else: - self.body = ( - RunInTerminalResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != RunInTerminalResponseBody - else body - ) + self.body = RunInTerminalResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != RunInTerminalResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -2017,29 +2499,29 @@ class RunInTerminalResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("startDebugging") +@register_request('startDebugging') @register class StartDebuggingRequest(BaseSchema): """ This request is sent from the debug adapter to the client to start a new debug session of the same type as the caller. - + This request should only be sent if the corresponding client capability `supportsStartDebuggingRequest` is true. - + A client implementation of `startDebugging` should start a new debug session (of the same type as the caller) in the same way that the caller's session was started. If the client supports hierarchical debug sessions, the newly created session can be treated as a child of the caller @@ -2051,46 +2533,55 @@ class StartDebuggingRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["startDebugging"]}, - "arguments": {"type": "StartDebuggingRequestArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "startDebugging" + ] + }, + "arguments": { + "type": "StartDebuggingRequestArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param StartDebuggingRequestArguments arguments: + :param string type: + :param string command: + :param StartDebuggingRequestArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "startDebugging" + self.type = 'request' + self.command = 'startDebugging' if arguments is None: self.arguments = StartDebuggingRequestArguments() else: - self.arguments = ( - StartDebuggingRequestArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != StartDebuggingRequestArguments - else arguments - ) + self.arguments = StartDebuggingRequestArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != StartDebuggingRequestArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -2108,17 +2599,20 @@ class StartDebuggingRequestArguments(BaseSchema): "configuration": { "type": "object", "additionalProperties": True, - "description": "Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables').", + "description": "Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables')." }, "request": { "type": "string", - "enum": ["launch", "attach"], - "description": "Indicates whether the new debug session should be started with a `launch` or `attach` request.", - }, + "enum": [ + "launch", + "attach" + ], + "description": "Indicates whether the new debug session should be started with a `launch` or `attach` request." + } } - __refs__ = set(["configuration"]) + __refs__ = set(['configuration']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, configuration, request, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -2128,26 +2622,23 @@ class StartDebuggingRequestArguments(BaseSchema): if configuration is None: self.configuration = StartDebuggingRequestArgumentsConfiguration() else: - self.configuration = ( - StartDebuggingRequestArgumentsConfiguration(update_ids_from_dap=update_ids_from_dap, **configuration) - if configuration.__class__ != StartDebuggingRequestArgumentsConfiguration - else configuration - ) + self.configuration = StartDebuggingRequestArgumentsConfiguration(update_ids_from_dap=update_ids_from_dap, **configuration) if configuration.__class__ != StartDebuggingRequestArgumentsConfiguration else configuration self.request = request self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) configuration = self.configuration request = self.request dct = { - "configuration": configuration.to_dict(update_ids_to_dap=update_ids_to_dap), - "request": request, + 'configuration': configuration.to_dict(update_ids_to_dap=update_ids_to_dap), + 'request': request, } dct.update(self.kwargs) return dct -@register_response("startDebugging") +@register_response('startDebugging') @register class StartDebuggingResponse(BaseSchema): """ @@ -2159,33 +2650,58 @@ class StartDebuggingResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -2197,7 +2713,7 @@ class StartDebuggingResponse(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -2206,6 +2722,7 @@ class StartDebuggingResponse(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -2215,33 +2732,33 @@ class StartDebuggingResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_request("initialize") +@register_request('initialize') @register class InitializeRequest(BaseSchema): """ The `initialize` request is sent as the first request from the client to the debug adapter in order to configure it with client capabilities and to retrieve capabilities from the debug adapter. - + Until the debug adapter has responded with an `initialize` response, the client must not send any additional requests or events to the debug adapter. - + In addition the debug adapter is not allowed to send any requests or events to the client until it has responded with an `initialize` response. - + The `initialize` request may only be sent once. Note: automatically generated code. Do not edit manually. @@ -2250,46 +2767,55 @@ class InitializeRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["initialize"]}, - "arguments": {"type": "InitializeRequestArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "initialize" + ] + }, + "arguments": { + "type": "InitializeRequestArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param InitializeRequestArguments arguments: + :param string type: + :param string command: + :param InitializeRequestArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "initialize" + self.type = 'request' + self.command = 'initialize' if arguments is None: self.arguments = InitializeRequestArguments() else: - self.arguments = ( - InitializeRequestArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != InitializeRequestArguments - else arguments - ) + self.arguments = InitializeRequestArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != InitializeRequestArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -2304,55 +2830,80 @@ class InitializeRequestArguments(BaseSchema): """ __props__ = { - "clientID": {"type": "string", "description": "The ID of the client using this adapter."}, - "clientName": {"type": "string", "description": "The human-readable name of the client using this adapter."}, - "adapterID": {"type": "string", "description": "The ID of the debug adapter."}, - "locale": {"type": "string", "description": "The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH."}, - "linesStartAt1": {"type": "boolean", "description": "If True all line numbers are 1-based (default)."}, - "columnsStartAt1": {"type": "boolean", "description": "If True all column numbers are 1-based (default)."}, + "clientID": { + "type": "string", + "description": "The ID of the client using this adapter." + }, + "clientName": { + "type": "string", + "description": "The human-readable name of the client using this adapter." + }, + "adapterID": { + "type": "string", + "description": "The ID of the debug adapter." + }, + "locale": { + "type": "string", + "description": "The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH." + }, + "linesStartAt1": { + "type": "boolean", + "description": "If True all line numbers are 1-based (default)." + }, + "columnsStartAt1": { + "type": "boolean", + "description": "If True all column numbers are 1-based (default)." + }, "pathFormat": { "type": "string", - "_enum": ["path", "uri"], - "description": "Determines in what format paths are specified. The default is `path`, which is the native format.", + "_enum": [ + "path", + "uri" + ], + "description": "Determines in what format paths are specified. The default is `path`, which is the native format." + }, + "supportsVariableType": { + "type": "boolean", + "description": "Client supports the `type` attribute for variables." + }, + "supportsVariablePaging": { + "type": "boolean", + "description": "Client supports the paging of variables." + }, + "supportsRunInTerminalRequest": { + "type": "boolean", + "description": "Client supports the `runInTerminal` request." + }, + "supportsMemoryReferences": { + "type": "boolean", + "description": "Client supports memory references." + }, + "supportsProgressReporting": { + "type": "boolean", + "description": "Client supports progress reporting." + }, + "supportsInvalidatedEvent": { + "type": "boolean", + "description": "Client supports the `invalidated` event." + }, + "supportsMemoryEvent": { + "type": "boolean", + "description": "Client supports the `memory` event." }, - "supportsVariableType": {"type": "boolean", "description": "Client supports the `type` attribute for variables."}, - "supportsVariablePaging": {"type": "boolean", "description": "Client supports the paging of variables."}, - "supportsRunInTerminalRequest": {"type": "boolean", "description": "Client supports the `runInTerminal` request."}, - "supportsMemoryReferences": {"type": "boolean", "description": "Client supports memory references."}, - "supportsProgressReporting": {"type": "boolean", "description": "Client supports progress reporting."}, - "supportsInvalidatedEvent": {"type": "boolean", "description": "Client supports the `invalidated` event."}, - "supportsMemoryEvent": {"type": "boolean", "description": "Client supports the `memory` event."}, "supportsArgsCanBeInterpretedByShell": { "type": "boolean", - "description": "Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request.", + "description": "Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request." }, - "supportsStartDebuggingRequest": {"type": "boolean", "description": "Client supports the `startDebugging` request."}, + "supportsStartDebuggingRequest": { + "type": "boolean", + "description": "Client supports the `startDebugging` request." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - adapterID, - clientID=None, - clientName=None, - locale=None, - linesStartAt1=None, - columnsStartAt1=None, - pathFormat=None, - supportsVariableType=None, - supportsVariablePaging=None, - supportsRunInTerminalRequest=None, - supportsMemoryReferences=None, - supportsProgressReporting=None, - supportsInvalidatedEvent=None, - supportsMemoryEvent=None, - supportsArgsCanBeInterpretedByShell=None, - supportsStartDebuggingRequest=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, adapterID, clientID=None, clientName=None, locale=None, linesStartAt1=None, columnsStartAt1=None, pathFormat=None, supportsVariableType=None, supportsVariablePaging=None, supportsRunInTerminalRequest=None, supportsMemoryReferences=None, supportsProgressReporting=None, supportsInvalidatedEvent=None, supportsMemoryEvent=None, supportsArgsCanBeInterpretedByShell=None, supportsStartDebuggingRequest=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string adapterID: The ID of the debug adapter. :param string clientID: The ID of the client using this adapter. @@ -2389,6 +2940,7 @@ class InitializeRequestArguments(BaseSchema): self.supportsStartDebuggingRequest = supportsStartDebuggingRequest self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) adapterID = self.adapterID clientID = self.clientID @@ -2407,43 +2959,43 @@ class InitializeRequestArguments(BaseSchema): supportsArgsCanBeInterpretedByShell = self.supportsArgsCanBeInterpretedByShell supportsStartDebuggingRequest = self.supportsStartDebuggingRequest dct = { - "adapterID": adapterID, + 'adapterID': adapterID, } if clientID is not None: - dct["clientID"] = clientID + dct['clientID'] = clientID if clientName is not None: - dct["clientName"] = clientName + dct['clientName'] = clientName if locale is not None: - dct["locale"] = locale + dct['locale'] = locale if linesStartAt1 is not None: - dct["linesStartAt1"] = linesStartAt1 + dct['linesStartAt1'] = linesStartAt1 if columnsStartAt1 is not None: - dct["columnsStartAt1"] = columnsStartAt1 + dct['columnsStartAt1'] = columnsStartAt1 if pathFormat is not None: - dct["pathFormat"] = pathFormat + dct['pathFormat'] = pathFormat if supportsVariableType is not None: - dct["supportsVariableType"] = supportsVariableType + dct['supportsVariableType'] = supportsVariableType if supportsVariablePaging is not None: - dct["supportsVariablePaging"] = supportsVariablePaging + dct['supportsVariablePaging'] = supportsVariablePaging if supportsRunInTerminalRequest is not None: - dct["supportsRunInTerminalRequest"] = supportsRunInTerminalRequest + dct['supportsRunInTerminalRequest'] = supportsRunInTerminalRequest if supportsMemoryReferences is not None: - dct["supportsMemoryReferences"] = supportsMemoryReferences + dct['supportsMemoryReferences'] = supportsMemoryReferences if supportsProgressReporting is not None: - dct["supportsProgressReporting"] = supportsProgressReporting + dct['supportsProgressReporting'] = supportsProgressReporting if supportsInvalidatedEvent is not None: - dct["supportsInvalidatedEvent"] = supportsInvalidatedEvent + dct['supportsInvalidatedEvent'] = supportsInvalidatedEvent if supportsMemoryEvent is not None: - dct["supportsMemoryEvent"] = supportsMemoryEvent + dct['supportsMemoryEvent'] = supportsMemoryEvent if supportsArgsCanBeInterpretedByShell is not None: - dct["supportsArgsCanBeInterpretedByShell"] = supportsArgsCanBeInterpretedByShell + dct['supportsArgsCanBeInterpretedByShell'] = supportsArgsCanBeInterpretedByShell if supportsStartDebuggingRequest is not None: - dct["supportsStartDebuggingRequest"] = supportsStartDebuggingRequest + dct['supportsStartDebuggingRequest'] = supportsStartDebuggingRequest dct.update(self.kwargs) return dct -@register_response("initialize") +@register_response('initialize') @register class InitializeResponse(BaseSchema): """ @@ -2455,30 +3007,50 @@ class InitializeResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, - "body": {"description": "The capabilities of this debug adapter.", "type": "Capabilities"}, + "body": { + "description": "The capabilities of this debug adapter.", + "type": "Capabilities" + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -2490,7 +3062,7 @@ class InitializeResponse(BaseSchema): Some predefined values exist. :param Capabilities body: The capabilities of this debug adapter. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -2499,9 +3071,10 @@ class InitializeResponse(BaseSchema): if body is None: self.body = Capabilities() else: - self.body = Capabilities(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != Capabilities else body + self.body = Capabilities(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != Capabilities else body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -2511,29 +3084,29 @@ class InitializeResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['body'] = body.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct -@register_request("configurationDone") +@register_request('configurationDone') @register class ConfigurationDoneRequest(BaseSchema): """ This request indicates that the client has finished initialization of the debug adapter. - + So it is the last request in the sequence of configuration requests (which was started by the `initialized` event). - + Clients should only call this request if the corresponding capability `supportsConfigurationDoneRequest` is true. @@ -2543,48 +3116,57 @@ class ConfigurationDoneRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["configurationDone"]}, - "arguments": {"type": "ConfigurationDoneArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "configurationDone" + ] + }, + "arguments": { + "type": "ConfigurationDoneArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: + :param string type: + :param string command: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. - :param ConfigurationDoneArguments arguments: + :param ConfigurationDoneArguments arguments: """ - self.type = "request" - self.command = "configurationDone" + self.type = 'request' + self.command = 'configurationDone' self.seq = seq if arguments is None: self.arguments = ConfigurationDoneArguments() else: - self.arguments = ( - ConfigurationDoneArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != ConfigurationDoneArguments - else arguments - ) + self.arguments = ConfigurationDoneArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != ConfigurationDoneArguments else arguments self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command seq = self.seq arguments = self.arguments dct = { - "type": type, - "command": command, - "seq": seq, + 'type': type, + 'command': command, + 'seq': seq, } if arguments is not None: - dct["arguments"] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['arguments'] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct @@ -2600,20 +3182,24 @@ class ConfigurationDoneArguments(BaseSchema): __props__ = {} __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) - """ """ - + """ + + """ + self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) - dct = {} + dct = { + } dct.update(self.kwargs) return dct -@register_response("configurationDone") +@register_response('configurationDone') @register class ConfigurationDoneResponse(BaseSchema): """ @@ -2626,33 +3212,58 @@ class ConfigurationDoneResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -2664,7 +3275,7 @@ class ConfigurationDoneResponse(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -2673,6 +3284,7 @@ class ConfigurationDoneResponse(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -2682,27 +3294,27 @@ class ConfigurationDoneResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_request("launch") +@register_request('launch') @register class LaunchRequest(BaseSchema): """ This launch request is sent from the client to the debug adapter to start the debuggee with or without debugging (if `noDebug` is true). - + Since launching is debugger/runtime specific, the arguments for this request are not part of this specification. @@ -2712,46 +3324,55 @@ class LaunchRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["launch"]}, - "arguments": {"type": "LaunchRequestArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "launch" + ] + }, + "arguments": { + "type": "LaunchRequestArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param LaunchRequestArguments arguments: + :param string type: + :param string command: + :param LaunchRequestArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "launch" + self.type = 'request' + self.command = 'launch' if arguments is None: self.arguments = LaunchRequestArguments() else: - self.arguments = ( - LaunchRequestArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != LaunchRequestArguments - else arguments - ) + self.arguments = LaunchRequestArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != LaunchRequestArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -2766,15 +3387,26 @@ class LaunchRequestArguments(BaseSchema): """ __props__ = { - "noDebug": {"type": "boolean", "description": "If True, the launch request should launch the program without enabling debugging."}, - "__restart": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact.", + "noDebug": { + "type": "boolean", + "description": "If True, the launch request should launch the program without enabling debugging." }, + "__restart": { + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, noDebug=None, __restart=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -2787,19 +3419,21 @@ class LaunchRequestArguments(BaseSchema): self.__restart = __restart self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) noDebug = self.noDebug __restart = self.__restart - dct = {} + dct = { + } if noDebug is not None: - dct["noDebug"] = noDebug + dct['noDebug'] = noDebug if __restart is not None: - dct["__restart"] = __restart + dct['__restart'] = __restart dct.update(self.kwargs) return dct -@register_response("launch") +@register_response('launch') @register class LaunchResponse(BaseSchema): """ @@ -2811,33 +3445,58 @@ class LaunchResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -2849,7 +3508,7 @@ class LaunchResponse(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -2858,6 +3517,7 @@ class LaunchResponse(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -2867,27 +3527,27 @@ class LaunchResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_request("attach") +@register_request('attach') @register class AttachRequest(BaseSchema): """ The `attach` request is sent from the client to the debug adapter to attach to a debuggee that is already running. - + Since attaching is debugger/runtime specific, the arguments for this request are not part of this specification. @@ -2897,46 +3557,55 @@ class AttachRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["attach"]}, - "arguments": {"type": "AttachRequestArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "attach" + ] + }, + "arguments": { + "type": "AttachRequestArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param AttachRequestArguments arguments: + :param string type: + :param string command: + :param AttachRequestArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "attach" + self.type = 'request' + self.command = 'attach' if arguments is None: self.arguments = AttachRequestArguments() else: - self.arguments = ( - AttachRequestArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != AttachRequestArguments - else arguments - ) + self.arguments = AttachRequestArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != AttachRequestArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -2952,13 +3621,21 @@ class AttachRequestArguments(BaseSchema): __props__ = { "__restart": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact.", + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, __restart=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -2969,16 +3646,18 @@ class AttachRequestArguments(BaseSchema): self.__restart = __restart self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) __restart = self.__restart - dct = {} + dct = { + } if __restart is not None: - dct["__restart"] = __restart + dct['__restart'] = __restart dct.update(self.kwargs) return dct -@register_response("attach") +@register_response('attach') @register class AttachResponse(BaseSchema): """ @@ -2990,33 +3669,58 @@ class AttachResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -3028,7 +3732,7 @@ class AttachResponse(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -3037,6 +3741,7 @@ class AttachResponse(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -3046,27 +3751,27 @@ class AttachResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_request("restart") +@register_request('restart') @register class RestartRequest(BaseSchema): """ Restarts a debug session. Clients should only call this request if the corresponding capability `supportsRestartRequest` is true. - + If the capability is missing or has the value false, a typical client emulates `restart` by terminating the debug adapter first and then launching it anew. @@ -3076,48 +3781,57 @@ class RestartRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["restart"]}, - "arguments": {"type": "RestartArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "restart" + ] + }, + "arguments": { + "type": "RestartArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: + :param string type: + :param string command: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. - :param RestartArguments arguments: + :param RestartArguments arguments: """ - self.type = "request" - self.command = "restart" + self.type = 'request' + self.command = 'restart' self.seq = seq if arguments is None: self.arguments = RestartArguments() else: - self.arguments = ( - RestartArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != RestartArguments - else arguments - ) + self.arguments = RestartArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != RestartArguments else arguments self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command seq = self.seq arguments = self.arguments dct = { - "type": type, - "command": command, - "seq": seq, + 'type': type, + 'command': command, + 'seq': seq, } if arguments is not None: - dct["arguments"] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['arguments'] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct @@ -3132,13 +3846,20 @@ class RestartArguments(BaseSchema): __props__ = { "arguments": { - "oneOf": [{"$ref": "#/definitions/LaunchRequestArguments"}, {"$ref": "#/definitions/AttachRequestArguments"}], - "description": "The latest version of the `launch` or `attach` configuration.", + "oneOf": [ + { + "$ref": "#/definitions/LaunchRequestArguments" + }, + { + "$ref": "#/definitions/AttachRequestArguments" + } + ], + "description": "The latest version of the `launch` or `attach` configuration." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -3147,16 +3868,18 @@ class RestartArguments(BaseSchema): self.arguments = arguments self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) arguments = self.arguments - dct = {} + dct = { + } if arguments is not None: - dct["arguments"] = arguments + dct['arguments'] = arguments dct.update(self.kwargs) return dct -@register_response("restart") +@register_response('restart') @register class RestartResponse(BaseSchema): """ @@ -3168,33 +3891,58 @@ class RestartResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -3206,7 +3954,7 @@ class RestartResponse(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -3215,6 +3963,7 @@ class RestartResponse(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -3224,31 +3973,31 @@ class RestartResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_request("disconnect") +@register_request('disconnect') @register class DisconnectRequest(BaseSchema): """ The `disconnect` request asks the debug adapter to disconnect from the debuggee (thus ending the debug session) and then to shut down itself (the debug adapter). - + In addition, the debug adapter must terminate the debuggee if it was started with the `launch` request. If an `attach` request was used to connect to the debuggee, then the debug adapter must not terminate the debuggee. - + This implicit behavior of when to terminate the debuggee can be overridden with the `terminateDebuggee` argument (which is only supported by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true). @@ -3259,48 +4008,57 @@ class DisconnectRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["disconnect"]}, - "arguments": {"type": "DisconnectArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "disconnect" + ] + }, + "arguments": { + "type": "DisconnectArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: + :param string type: + :param string command: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. - :param DisconnectArguments arguments: + :param DisconnectArguments arguments: """ - self.type = "request" - self.command = "disconnect" + self.type = 'request' + self.command = 'disconnect' self.seq = seq if arguments is None: self.arguments = DisconnectArguments() else: - self.arguments = ( - DisconnectArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != DisconnectArguments - else arguments - ) + self.arguments = DisconnectArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != DisconnectArguments else arguments self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command seq = self.seq arguments = self.arguments dct = { - "type": type, - "command": command, - "seq": seq, + 'type': type, + 'command': command, + 'seq': seq, } if arguments is not None: - dct["arguments"] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['arguments'] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct @@ -3316,20 +4074,20 @@ class DisconnectArguments(BaseSchema): __props__ = { "restart": { "type": "boolean", - "description": "A value of True indicates that this `disconnect` request is part of a restart sequence.", + "description": "A value of True indicates that this `disconnect` request is part of a restart sequence." }, "terminateDebuggee": { "type": "boolean", - "description": "Indicates whether the debuggee should be terminated when the debugger is disconnected.\nIf unspecified, the debug adapter is free to do whatever it thinks is best.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportTerminateDebuggee` is True.", + "description": "Indicates whether the debuggee should be terminated when the debugger is disconnected.\nIf unspecified, the debug adapter is free to do whatever it thinks is best.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportTerminateDebuggee` is True." }, "suspendDebuggee": { "type": "boolean", - "description": "Indicates whether the debuggee should stay suspended when the debugger is disconnected.\nIf unspecified, the debuggee should resume execution.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportSuspendDebuggee` is True.", - }, + "description": "Indicates whether the debuggee should stay suspended when the debugger is disconnected.\nIf unspecified, the debuggee should resume execution.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportSuspendDebuggee` is True." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, restart=None, terminateDebuggee=None, suspendDebuggee=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -3346,22 +4104,24 @@ class DisconnectArguments(BaseSchema): self.suspendDebuggee = suspendDebuggee self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) restart = self.restart terminateDebuggee = self.terminateDebuggee suspendDebuggee = self.suspendDebuggee - dct = {} + dct = { + } if restart is not None: - dct["restart"] = restart + dct['restart'] = restart if terminateDebuggee is not None: - dct["terminateDebuggee"] = terminateDebuggee + dct['terminateDebuggee'] = terminateDebuggee if suspendDebuggee is not None: - dct["suspendDebuggee"] = suspendDebuggee + dct['suspendDebuggee'] = suspendDebuggee dct.update(self.kwargs) return dct -@register_response("disconnect") +@register_response('disconnect') @register class DisconnectResponse(BaseSchema): """ @@ -3373,33 +4133,58 @@ class DisconnectResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -3411,7 +4196,7 @@ class DisconnectResponse(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -3420,6 +4205,7 @@ class DisconnectResponse(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -3429,35 +4215,35 @@ class DisconnectResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_request("terminate") +@register_request('terminate') @register class TerminateRequest(BaseSchema): """ The `terminate` request is sent from the client to the debug adapter in order to shut down the debuggee gracefully. Clients should only call this request if the capability `supportsTerminateRequest` is true. - + Typically a debug adapter implements `terminate` by sending a software signal which the debuggee intercepts in order to clean things up properly before terminating itself. - + Please note that this request does not directly affect the state of the debug session: if the debuggee decides to veto the graceful shutdown for any reason by not terminating itself, then the debug session just continues. - + Clients can surface the `terminate` request as an explicit command or they can integrate it into a two stage Stop command that first sends `terminate` to request a graceful shutdown, and if that fails uses `disconnect` for a forceful shutdown. @@ -3468,48 +4254,57 @@ class TerminateRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["terminate"]}, - "arguments": {"type": "TerminateArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "terminate" + ] + }, + "arguments": { + "type": "TerminateArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: + :param string type: + :param string command: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. - :param TerminateArguments arguments: + :param TerminateArguments arguments: """ - self.type = "request" - self.command = "terminate" + self.type = 'request' + self.command = 'terminate' self.seq = seq if arguments is None: self.arguments = TerminateArguments() else: - self.arguments = ( - TerminateArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != TerminateArguments - else arguments - ) + self.arguments = TerminateArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != TerminateArguments else arguments self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command seq = self.seq arguments = self.arguments dct = { - "type": type, - "command": command, - "seq": seq, + 'type': type, + 'command': command, + 'seq': seq, } if arguments is not None: - dct["arguments"] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['arguments'] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct @@ -3525,12 +4320,12 @@ class TerminateArguments(BaseSchema): __props__ = { "restart": { "type": "boolean", - "description": "A value of True indicates that this `terminate` request is part of a restart sequence.", + "description": "A value of True indicates that this `terminate` request is part of a restart sequence." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, restart=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -3539,16 +4334,18 @@ class TerminateArguments(BaseSchema): self.restart = restart self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) restart = self.restart - dct = {} + dct = { + } if restart is not None: - dct["restart"] = restart + dct['restart'] = restart dct.update(self.kwargs) return dct -@register_response("terminate") +@register_response('terminate') @register class TerminateResponse(BaseSchema): """ @@ -3560,33 +4357,58 @@ class TerminateResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -3598,7 +4420,7 @@ class TerminateResponse(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -3607,6 +4429,7 @@ class TerminateResponse(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -3616,27 +4439,27 @@ class TerminateResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_request("breakpointLocations") +@register_request('breakpointLocations') @register class BreakpointLocationsRequest(BaseSchema): """ The `breakpointLocations` request returns all possible locations for source breakpoints in a given range. - + Clients should only call this request if the corresponding capability `supportsBreakpointLocationsRequest` is true. @@ -3646,48 +4469,57 @@ class BreakpointLocationsRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["breakpointLocations"]}, - "arguments": {"type": "BreakpointLocationsArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "breakpointLocations" + ] + }, + "arguments": { + "type": "BreakpointLocationsArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: + :param string type: + :param string command: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. - :param BreakpointLocationsArguments arguments: + :param BreakpointLocationsArguments arguments: """ - self.type = "request" - self.command = "breakpointLocations" + self.type = 'request' + self.command = 'breakpointLocations' self.seq = seq if arguments is None: self.arguments = BreakpointLocationsArguments() else: - self.arguments = ( - BreakpointLocationsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != BreakpointLocationsArguments - else arguments - ) + self.arguments = BreakpointLocationsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != BreakpointLocationsArguments else arguments self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command seq = self.seq arguments = self.arguments dct = { - "type": type, - "command": command, - "seq": seq, + 'type': type, + 'command': command, + 'seq': seq, } if arguments is not None: - dct["arguments"] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['arguments'] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct @@ -3703,28 +4535,28 @@ class BreakpointLocationsArguments(BaseSchema): __props__ = { "source": { "description": "The source location of the breakpoints; either `source.path` or `source.sourceReference` must be specified.", - "type": "Source", + "type": "Source" }, "line": { "type": "integer", - "description": "Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line.", + "description": "Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line." }, "column": { "type": "integer", - "description": "Start position within `line` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no column is given, the first position in the start line is assumed.", + "description": "Start position within `line` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no column is given, the first position in the start line is assumed." }, "endLine": { "type": "integer", - "description": "End line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line.", + "description": "End line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line." }, "endColumn": { "type": "integer", - "description": "End position within `endLine` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no end column is given, the last position in the end line is assumed.", - }, + "description": "End position within `endLine` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no end column is given, the last position in the end line is assumed." + } } - __refs__ = set(["source"]) + __refs__ = set(['source']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, source, line, column=None, endLine=None, endColumn=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -3737,13 +4569,14 @@ class BreakpointLocationsArguments(BaseSchema): if source is None: self.source = Source() else: - self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source self.line = line self.column = column self.endLine = endLine self.endColumn = endColumn self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) source = self.source line = self.line @@ -3751,25 +4584,25 @@ class BreakpointLocationsArguments(BaseSchema): endLine = self.endLine endColumn = self.endColumn dct = { - "source": source.to_dict(update_ids_to_dap=update_ids_to_dap), - "line": line, + 'source': source.to_dict(update_ids_to_dap=update_ids_to_dap), + 'line': line, } if column is not None: - dct["column"] = column + dct['column'] = column if endLine is not None: - dct["endLine"] = endLine + dct['endLine'] = endLine if endColumn is not None: - dct["endColumn"] = endColumn + dct['endColumn'] = endColumn dct.update(self.kwargs) return dct -@register_response("breakpointLocations") +@register_response('breakpointLocations') @register class BreakpointLocationsResponse(BaseSchema): """ Response to `breakpointLocations` request. - + Contains possible locations for source breakpoints. Note: automatically generated code. Do not edit manually. @@ -3778,67 +4611,85 @@ class BreakpointLocationsResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { "breakpoints": { "type": "array", - "items": {"$ref": "#/definitions/BreakpointLocation"}, - "description": "Sorted set of possible breakpoint locations.", + "items": { + "$ref": "#/definitions/BreakpointLocation" + }, + "description": "Sorted set of possible breakpoint locations." } }, - "required": ["breakpoints"], - }, + "required": [ + "breakpoints" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param BreakpointLocationsResponseBody body: + :param BreakpointLocationsResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = BreakpointLocationsResponseBody() else: - self.body = ( - BreakpointLocationsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != BreakpointLocationsResponseBody - else body - ) + self.body = BreakpointLocationsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != BreakpointLocationsResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -3848,27 +4699,27 @@ class BreakpointLocationsResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("setBreakpoints") +@register_request('setBreakpoints') @register class SetBreakpointsRequest(BaseSchema): """ Sets multiple breakpoints for a single source and clears all previous breakpoints in that source. - + To clear all breakpoint for a source, specify an empty array. - + When a breakpoint is hit, a `stopped` event (with reason `breakpoint`) is generated. Note: automatically generated code. Do not edit manually. @@ -3877,46 +4728,55 @@ class SetBreakpointsRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["setBreakpoints"]}, - "arguments": {"type": "SetBreakpointsArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "setBreakpoints" + ] + }, + "arguments": { + "type": "SetBreakpointsArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param SetBreakpointsArguments arguments: + :param string type: + :param string command: + :param SetBreakpointsArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "setBreakpoints" + self.type = 'request' + self.command = 'setBreakpoints' if arguments is None: self.arguments = SetBreakpointsArguments() else: - self.arguments = ( - SetBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != SetBreakpointsArguments - else arguments - ) + self.arguments = SetBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != SetBreakpointsArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -3933,22 +4793,30 @@ class SetBreakpointsArguments(BaseSchema): __props__ = { "source": { "description": "The source location of the breakpoints; either `source.path` or `source.sourceReference` must be specified.", - "type": "Source", + "type": "Source" }, "breakpoints": { "type": "array", - "items": {"$ref": "#/definitions/SourceBreakpoint"}, - "description": "The code locations of the breakpoints.", + "items": { + "$ref": "#/definitions/SourceBreakpoint" + }, + "description": "The code locations of the breakpoints." + }, + "lines": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Deprecated: The code locations of the breakpoints." }, - "lines": {"type": "array", "items": {"type": "integer"}, "description": "Deprecated: The code locations of the breakpoints."}, "sourceModified": { "type": "boolean", - "description": "A value of True indicates that the underlying source has been modified which results in new breakpoint locations.", - }, + "description": "A value of True indicates that the underlying source has been modified which results in new breakpoint locations." + } } - __refs__ = set(["source"]) + __refs__ = set(['source']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, source, breakpoints=None, lines=None, sourceModified=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -3960,7 +4828,7 @@ class SetBreakpointsArguments(BaseSchema): if source is None: self.source = Source() else: - self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source self.breakpoints = breakpoints if update_ids_from_dap and self.breakpoints: for o in self.breakpoints: @@ -3969,6 +4837,7 @@ class SetBreakpointsArguments(BaseSchema): self.sourceModified = sourceModified self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) source = self.source breakpoints = self.breakpoints @@ -3979,32 +4848,30 @@ class SetBreakpointsArguments(BaseSchema): lines = [x.to_dict() for x in lines] sourceModified = self.sourceModified dct = { - "source": source.to_dict(update_ids_to_dap=update_ids_to_dap), + 'source': source.to_dict(update_ids_to_dap=update_ids_to_dap), } if breakpoints is not None: - dct["breakpoints"] = ( - [SourceBreakpoint.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints - ) + dct['breakpoints'] = [SourceBreakpoint.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints if lines is not None: - dct["lines"] = lines + dct['lines'] = lines if sourceModified is not None: - dct["sourceModified"] = sourceModified + dct['sourceModified'] = sourceModified dct.update(self.kwargs) return dct -@register_response("setBreakpoints") +@register_response('setBreakpoints') @register class SetBreakpointsResponse(BaseSchema): """ Response to `setBreakpoints` request. - + Returned is information about each breakpoint created by this request. - + This includes the actual code location and whether the breakpoint could be verified. - + The breakpoints returned are in the same order as the elements of the `breakpoints` - + (or the deprecated `lines`) array in the arguments. Note: automatically generated code. Do not edit manually. @@ -4013,67 +4880,85 @@ class SetBreakpointsResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { "breakpoints": { "type": "array", - "items": {"$ref": "#/definitions/Breakpoint"}, - "description": "Information about the breakpoints.\nThe array elements are in the same order as the elements of the `breakpoints` (or the deprecated `lines`) array in the arguments.", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints.\nThe array elements are in the same order as the elements of the `breakpoints` (or the deprecated `lines`) array in the arguments." } }, - "required": ["breakpoints"], - }, + "required": [ + "breakpoints" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param SetBreakpointsResponseBody body: + :param SetBreakpointsResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = SetBreakpointsResponseBody() else: - self.body = ( - SetBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != SetBreakpointsResponseBody - else body - ) + self.body = SetBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != SetBreakpointsResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -4083,30 +4968,30 @@ class SetBreakpointsResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("setFunctionBreakpoints") +@register_request('setFunctionBreakpoints') @register class SetFunctionBreakpointsRequest(BaseSchema): """ Replaces all existing function breakpoints with new function breakpoints. - + To clear all function breakpoints, specify an empty array. - + When a function breakpoint is hit, a `stopped` event (with reason `function breakpoint`) is generated. - + Clients should only call this request if the corresponding capability `supportsFunctionBreakpoints` is true. @@ -4116,46 +5001,55 @@ class SetFunctionBreakpointsRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["setFunctionBreakpoints"]}, - "arguments": {"type": "SetFunctionBreakpointsArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "setFunctionBreakpoints" + ] + }, + "arguments": { + "type": "SetFunctionBreakpointsArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param SetFunctionBreakpointsArguments arguments: + :param string type: + :param string command: + :param SetFunctionBreakpointsArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "setFunctionBreakpoints" + self.type = 'request' + self.command = 'setFunctionBreakpoints' if arguments is None: self.arguments = SetFunctionBreakpointsArguments() else: - self.arguments = ( - SetFunctionBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != SetFunctionBreakpointsArguments - else arguments - ) + self.arguments = SetFunctionBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != SetFunctionBreakpointsArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -4172,13 +5066,15 @@ class SetFunctionBreakpointsArguments(BaseSchema): __props__ = { "breakpoints": { "type": "array", - "items": {"$ref": "#/definitions/FunctionBreakpoint"}, - "description": "The function names of the breakpoints.", + "items": { + "$ref": "#/definitions/FunctionBreakpoint" + }, + "description": "The function names of the breakpoints." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -4190,25 +5086,24 @@ class SetFunctionBreakpointsArguments(BaseSchema): FunctionBreakpoint.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) breakpoints = self.breakpoints if breakpoints and hasattr(breakpoints[0], "to_dict"): breakpoints = [x.to_dict() for x in breakpoints] dct = { - "breakpoints": [FunctionBreakpoint.update_dict_ids_to_dap(o) for o in breakpoints] - if (update_ids_to_dap and breakpoints) - else breakpoints, + 'breakpoints': [FunctionBreakpoint.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints, } dct.update(self.kwargs) return dct -@register_response("setFunctionBreakpoints") +@register_response('setFunctionBreakpoints') @register class SetFunctionBreakpointsResponse(BaseSchema): """ Response to `setFunctionBreakpoints` request. - + Returned is information about each breakpoint created by this request. Note: automatically generated code. Do not edit manually. @@ -4217,67 +5112,85 @@ class SetFunctionBreakpointsResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { "breakpoints": { "type": "array", - "items": {"$ref": "#/definitions/Breakpoint"}, - "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array.", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array." } }, - "required": ["breakpoints"], - }, + "required": [ + "breakpoints" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param SetFunctionBreakpointsResponseBody body: + :param SetFunctionBreakpointsResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = SetFunctionBreakpointsResponseBody() else: - self.body = ( - SetFunctionBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != SetFunctionBreakpointsResponseBody - else body - ) + self.body = SetFunctionBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != SetFunctionBreakpointsResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -4287,27 +5200,27 @@ class SetFunctionBreakpointsResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("setExceptionBreakpoints") +@register_request('setExceptionBreakpoints') @register class SetExceptionBreakpointsRequest(BaseSchema): """ The request configures the debugger's response to thrown exceptions. - + If an exception is configured to break, a `stopped` event is fired (with reason `exception`). - + Clients should only call this request if the corresponding capability `exceptionBreakpointFilters` returns one or more filters. @@ -4317,46 +5230,55 @@ class SetExceptionBreakpointsRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["setExceptionBreakpoints"]}, - "arguments": {"type": "SetExceptionBreakpointsArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "setExceptionBreakpoints" + ] + }, + "arguments": { + "type": "SetExceptionBreakpointsArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param SetExceptionBreakpointsArguments arguments: + :param string type: + :param string command: + :param SetExceptionBreakpointsArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "setExceptionBreakpoints" + self.type = 'request' + self.command = 'setExceptionBreakpoints' if arguments is None: self.arguments = SetExceptionBreakpointsArguments() else: - self.arguments = ( - SetExceptionBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != SetExceptionBreakpointsArguments - else arguments - ) + self.arguments = SetExceptionBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != SetExceptionBreakpointsArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -4373,23 +5295,29 @@ class SetExceptionBreakpointsArguments(BaseSchema): __props__ = { "filters": { "type": "array", - "items": {"type": "string"}, - "description": "Set of exception filters specified by their ID. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. The `filter` and `filterOptions` sets are additive.", + "items": { + "type": "string" + }, + "description": "Set of exception filters specified by their ID. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. The `filter` and `filterOptions` sets are additive." }, "filterOptions": { "type": "array", - "items": {"$ref": "#/definitions/ExceptionFilterOptions"}, - "description": "Set of exception filters and their options. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is True. The `filter` and `filterOptions` sets are additive.", + "items": { + "$ref": "#/definitions/ExceptionFilterOptions" + }, + "description": "Set of exception filters and their options. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is True. The `filter` and `filterOptions` sets are additive." }, "exceptionOptions": { "type": "array", - "items": {"$ref": "#/definitions/ExceptionOptions"}, - "description": "Configuration options for selected exceptions.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionOptions` is True.", - }, + "items": { + "$ref": "#/definitions/ExceptionOptions" + }, + "description": "Configuration options for selected exceptions.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionOptions` is True." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, filters, filterOptions=None, exceptionOptions=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -4409,6 +5337,7 @@ class SetExceptionBreakpointsArguments(BaseSchema): ExceptionOptions.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) filters = self.filters if filters and hasattr(filters[0], "to_dict"): @@ -4420,41 +5349,33 @@ class SetExceptionBreakpointsArguments(BaseSchema): if exceptionOptions and hasattr(exceptionOptions[0], "to_dict"): exceptionOptions = [x.to_dict() for x in exceptionOptions] dct = { - "filters": filters, + 'filters': filters, } if filterOptions is not None: - dct["filterOptions"] = ( - [ExceptionFilterOptions.update_dict_ids_to_dap(o) for o in filterOptions] - if (update_ids_to_dap and filterOptions) - else filterOptions - ) + dct['filterOptions'] = [ExceptionFilterOptions.update_dict_ids_to_dap(o) for o in filterOptions] if (update_ids_to_dap and filterOptions) else filterOptions if exceptionOptions is not None: - dct["exceptionOptions"] = ( - [ExceptionOptions.update_dict_ids_to_dap(o) for o in exceptionOptions] - if (update_ids_to_dap and exceptionOptions) - else exceptionOptions - ) + dct['exceptionOptions'] = [ExceptionOptions.update_dict_ids_to_dap(o) for o in exceptionOptions] if (update_ids_to_dap and exceptionOptions) else exceptionOptions dct.update(self.kwargs) return dct -@register_response("setExceptionBreakpoints") +@register_response('setExceptionBreakpoints') @register class SetExceptionBreakpointsResponse(BaseSchema): """ Response to `setExceptionBreakpoints` request. - + The response contains an array of `Breakpoint` objects with information about each exception breakpoint or filter. The `Breakpoint` objects are in the same order as the elements of the `filters`, `filterOptions`, `exceptionOptions` arrays given as arguments. If both `filters` and `filterOptions` are given, the returned array must start with `filters` information first, followed by `filterOptions` information. - + The `verified` property of a `Breakpoint` object signals whether the exception breakpoint or filter could be successfully created and whether the condition is valid. In case of an error the `message` property explains the problem. The `id` property can be used to introduce a unique ID for the exception breakpoint or filter so that it can be updated subsequently by sending breakpoint events. - + For backward compatibility both the `breakpoints` array and the enclosing `body` are optional. If these elements are missing a client is not able to show problems for individual exception breakpoints or filters. @@ -4465,39 +5386,58 @@ class SetExceptionBreakpointsResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { "breakpoints": { "type": "array", - "items": {"$ref": "#/definitions/Breakpoint"}, - "description": "Information about the exception breakpoints or filters.\nThe breakpoints returned are in the same order as the elements of the `filters`, `filterOptions`, `exceptionOptions` arrays in the arguments. If both `filters` and `filterOptions` are given, the returned array must start with `filters` information first, followed by `filterOptions` information.", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the exception breakpoints or filters.\nThe breakpoints returned are in the same order as the elements of the `filters`, `filterOptions`, `exceptionOptions` arrays in the arguments. If both `filters` and `filterOptions` are given, the returned array must start with `filters` information first, followed by `filterOptions` information." } - }, - }, + } + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -4507,9 +5447,9 @@ class SetExceptionBreakpointsResponse(BaseSchema): :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. - :param SetExceptionBreakpointsResponseBody body: + :param SetExceptionBreakpointsResponseBody body: """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -4518,13 +5458,10 @@ class SetExceptionBreakpointsResponse(BaseSchema): if body is None: self.body = SetExceptionBreakpointsResponseBody() else: - self.body = ( - SetExceptionBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != SetExceptionBreakpointsResponseBody - else body - ) + self.body = SetExceptionBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != SetExceptionBreakpointsResponseBody else body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -4534,26 +5471,26 @@ class SetExceptionBreakpointsResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['body'] = body.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct -@register_request("dataBreakpointInfo") +@register_request('dataBreakpointInfo') @register class DataBreakpointInfoRequest(BaseSchema): """ Obtains information on a possible data breakpoint that could be set on an expression or variable. - + Clients should only call this request if the corresponding capability `supportsDataBreakpoints` is true. @@ -4563,46 +5500,55 @@ class DataBreakpointInfoRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["dataBreakpointInfo"]}, - "arguments": {"type": "DataBreakpointInfoArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "dataBreakpointInfo" + ] + }, + "arguments": { + "type": "DataBreakpointInfoArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param DataBreakpointInfoArguments arguments: + :param string type: + :param string command: + :param DataBreakpointInfoArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "dataBreakpointInfo" + self.type = 'request' + self.command = 'dataBreakpointInfo' if arguments is None: self.arguments = DataBreakpointInfoArguments() else: - self.arguments = ( - DataBreakpointInfoArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != DataBreakpointInfoArguments - else arguments - ) + self.arguments = DataBreakpointInfoArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != DataBreakpointInfoArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -4619,20 +5565,20 @@ class DataBreakpointInfoArguments(BaseSchema): __props__ = { "variablesReference": { "type": "integer", - "description": "Reference to the variable container if the data breakpoint is requested for a child of the container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.", + "description": "Reference to the variable container if the data breakpoint is requested for a child of the container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." }, "name": { "type": "string", - "description": "The name of the variable's child to obtain data breakpoint information for.\nIf `variablesReference` isn't specified, this can be an expression.", + "description": "The name of the variable's child to obtain data breakpoint information for.\nIf `variablesReference` isn't specified, this can be an expression." }, "frameId": { "type": "integer", - "description": "When `name` is an expression, evaluate it in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. When `variablesReference` is specified, this property has no effect.", - }, + "description": "When `name` is an expression, evaluate it in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. When `variablesReference` is specified, this property has no effect." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, name, variablesReference=None, frameId=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -4648,13 +5594,14 @@ class DataBreakpointInfoArguments(BaseSchema): self.variablesReference = self._translate_id_from_dap(self.variablesReference) self.frameId = self._translate_id_from_dap(self.frameId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "variablesReference" in dct: - dct["variablesReference"] = cls._translate_id_from_dap(dct["variablesReference"]) - if "frameId" in dct: - dct["frameId"] = cls._translate_id_from_dap(dct["frameId"]) + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_from_dap(dct['variablesReference']) + if 'frameId' in dct: + dct['frameId'] = cls._translate_id_from_dap(dct['frameId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -4667,25 +5614,25 @@ class DataBreakpointInfoArguments(BaseSchema): if frameId is not None: frameId = self._translate_id_to_dap(frameId) dct = { - "name": name, + 'name': name, } if variablesReference is not None: - dct["variablesReference"] = variablesReference + dct['variablesReference'] = variablesReference if frameId is not None: - dct["frameId"] = frameId + dct['frameId'] = frameId dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "variablesReference" in dct: - dct["variablesReference"] = cls._translate_id_to_dap(dct["variablesReference"]) - if "frameId" in dct: - dct["frameId"] = cls._translate_id_to_dap(dct["frameId"]) + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_to_dap(dct['variablesReference']) + if 'frameId' in dct: + dct['frameId'] = cls._translate_id_to_dap(dct['frameId']) return dct -@register_response("dataBreakpointInfo") +@register_response('dataBreakpointInfo') @register class DataBreakpointInfoResponse(BaseSchema): """ @@ -4697,79 +5644,101 @@ class DataBreakpointInfoResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { "dataId": { - "type": ["string", "null"], - "description": "An identifier for the data on which a data breakpoint can be registered with the `setDataBreakpoints` request or null if no data breakpoint is available. If a `variablesReference` or `frameId` is passed, the `dataId` is valid in the current suspended state, otherwise it's valid indefinitely. See 'Lifetime of Object References' in the Overview section for details. Breakpoints set using the `dataId` in the `setDataBreakpoints` request may outlive the lifetime of the associated `dataId`.", + "type": [ + "string", + "null" + ], + "description": "An identifier for the data on which a data breakpoint can be registered with the `setDataBreakpoints` request or null if no data breakpoint is available. If a `variablesReference` or `frameId` is passed, the `dataId` is valid in the current suspended state, otherwise it's valid indefinitely. See 'Lifetime of Object References' in the Overview section for details. Breakpoints set using the `dataId` in the `setDataBreakpoints` request may outlive the lifetime of the associated `dataId`." }, "description": { "type": "string", - "description": "UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available.", + "description": "UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available." }, "accessTypes": { "type": "array", - "items": {"$ref": "#/definitions/DataBreakpointAccessType"}, - "description": "Attribute lists the available access types for a potential data breakpoint. A UI client could surface this information.", + "items": { + "$ref": "#/definitions/DataBreakpointAccessType" + }, + "description": "Attribute lists the available access types for a potential data breakpoint. A UI client could surface this information." }, "canPersist": { "type": "boolean", - "description": "Attribute indicates that a potential data breakpoint could be persisted across sessions.", - }, + "description": "Attribute indicates that a potential data breakpoint could be persisted across sessions." + } }, - "required": ["dataId", "description"], - }, + "required": [ + "dataId", + "description" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param DataBreakpointInfoResponseBody body: + :param DataBreakpointInfoResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = DataBreakpointInfoResponseBody() else: - self.body = ( - DataBreakpointInfoResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != DataBreakpointInfoResponseBody - else body - ) + self.body = DataBreakpointInfoResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != DataBreakpointInfoResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -4779,29 +5748,29 @@ class DataBreakpointInfoResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("setDataBreakpoints") +@register_request('setDataBreakpoints') @register class SetDataBreakpointsRequest(BaseSchema): """ Replaces all existing data breakpoints with new data breakpoints. - + To clear all data breakpoints, specify an empty array. - + When a data breakpoint is hit, a `stopped` event (with reason `data breakpoint`) is generated. - + Clients should only call this request if the corresponding capability `supportsDataBreakpoints` is true. @@ -4811,46 +5780,55 @@ class SetDataBreakpointsRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["setDataBreakpoints"]}, - "arguments": {"type": "SetDataBreakpointsArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "setDataBreakpoints" + ] + }, + "arguments": { + "type": "SetDataBreakpointsArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param SetDataBreakpointsArguments arguments: + :param string type: + :param string command: + :param SetDataBreakpointsArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "setDataBreakpoints" + self.type = 'request' + self.command = 'setDataBreakpoints' if arguments is None: self.arguments = SetDataBreakpointsArguments() else: - self.arguments = ( - SetDataBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != SetDataBreakpointsArguments - else arguments - ) + self.arguments = SetDataBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != SetDataBreakpointsArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -4867,13 +5845,15 @@ class SetDataBreakpointsArguments(BaseSchema): __props__ = { "breakpoints": { "type": "array", - "items": {"$ref": "#/definitions/DataBreakpoint"}, - "description": "The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints.", + "items": { + "$ref": "#/definitions/DataBreakpoint" + }, + "description": "The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -4885,25 +5865,24 @@ class SetDataBreakpointsArguments(BaseSchema): DataBreakpoint.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) breakpoints = self.breakpoints if breakpoints and hasattr(breakpoints[0], "to_dict"): breakpoints = [x.to_dict() for x in breakpoints] dct = { - "breakpoints": [DataBreakpoint.update_dict_ids_to_dap(o) for o in breakpoints] - if (update_ids_to_dap and breakpoints) - else breakpoints, + 'breakpoints': [DataBreakpoint.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints, } dct.update(self.kwargs) return dct -@register_response("setDataBreakpoints") +@register_response('setDataBreakpoints') @register class SetDataBreakpointsResponse(BaseSchema): """ Response to `setDataBreakpoints` request. - + Returned is information about each breakpoint created by this request. Note: automatically generated code. Do not edit manually. @@ -4912,67 +5891,85 @@ class SetDataBreakpointsResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { "breakpoints": { "type": "array", - "items": {"$ref": "#/definitions/Breakpoint"}, - "description": "Information about the data breakpoints. The array elements correspond to the elements of the input argument `breakpoints` array.", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the data breakpoints. The array elements correspond to the elements of the input argument `breakpoints` array." } }, - "required": ["breakpoints"], - }, + "required": [ + "breakpoints" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param SetDataBreakpointsResponseBody body: + :param SetDataBreakpointsResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = SetDataBreakpointsResponseBody() else: - self.body = ( - SetDataBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != SetDataBreakpointsResponseBody - else body - ) + self.body = SetDataBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != SetDataBreakpointsResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -4982,31 +5979,31 @@ class SetDataBreakpointsResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("setInstructionBreakpoints") +@register_request('setInstructionBreakpoints') @register class SetInstructionBreakpointsRequest(BaseSchema): """ Replaces all existing instruction breakpoints. Typically, instruction breakpoints would be set from a disassembly window. - + To clear all instruction breakpoints, specify an empty array. - + When an instruction breakpoint is hit, a `stopped` event (with reason `instruction breakpoint`) is generated. - + Clients should only call this request if the corresponding capability `supportsInstructionBreakpoints` is true. @@ -5016,46 +6013,55 @@ class SetInstructionBreakpointsRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["setInstructionBreakpoints"]}, - "arguments": {"type": "SetInstructionBreakpointsArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "setInstructionBreakpoints" + ] + }, + "arguments": { + "type": "SetInstructionBreakpointsArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param SetInstructionBreakpointsArguments arguments: + :param string type: + :param string command: + :param SetInstructionBreakpointsArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "setInstructionBreakpoints" + self.type = 'request' + self.command = 'setInstructionBreakpoints' if arguments is None: self.arguments = SetInstructionBreakpointsArguments() else: - self.arguments = ( - SetInstructionBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != SetInstructionBreakpointsArguments - else arguments - ) + self.arguments = SetInstructionBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != SetInstructionBreakpointsArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -5072,13 +6078,15 @@ class SetInstructionBreakpointsArguments(BaseSchema): __props__ = { "breakpoints": { "type": "array", - "items": {"$ref": "#/definitions/InstructionBreakpoint"}, - "description": "The instruction references of the breakpoints", + "items": { + "$ref": "#/definitions/InstructionBreakpoint" + }, + "description": "The instruction references of the breakpoints" } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -5090,20 +6098,19 @@ class SetInstructionBreakpointsArguments(BaseSchema): InstructionBreakpoint.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) breakpoints = self.breakpoints if breakpoints and hasattr(breakpoints[0], "to_dict"): breakpoints = [x.to_dict() for x in breakpoints] dct = { - "breakpoints": [InstructionBreakpoint.update_dict_ids_to_dap(o) for o in breakpoints] - if (update_ids_to_dap and breakpoints) - else breakpoints, + 'breakpoints': [InstructionBreakpoint.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints, } dct.update(self.kwargs) return dct -@register_response("setInstructionBreakpoints") +@register_response('setInstructionBreakpoints') @register class SetInstructionBreakpointsResponse(BaseSchema): """ @@ -5115,67 +6122,85 @@ class SetInstructionBreakpointsResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { "breakpoints": { "type": "array", - "items": {"$ref": "#/definitions/Breakpoint"}, - "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array.", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array." } }, - "required": ["breakpoints"], - }, + "required": [ + "breakpoints" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param SetInstructionBreakpointsResponseBody body: + :param SetInstructionBreakpointsResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = SetInstructionBreakpointsResponseBody() else: - self.body = ( - SetInstructionBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != SetInstructionBreakpointsResponseBody - else body - ) + self.body = SetInstructionBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != SetInstructionBreakpointsResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -5185,20 +6210,20 @@ class SetInstructionBreakpointsResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("continue") +@register_request('continue') @register class ContinueRequest(BaseSchema): """ @@ -5213,46 +6238,55 @@ class ContinueRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["continue"]}, - "arguments": {"type": "ContinueArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "continue" + ] + }, + "arguments": { + "type": "ContinueArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param ContinueArguments arguments: + :param string type: + :param string command: + :param ContinueArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "continue" + self.type = 'request' + self.command = 'continue' if arguments is None: self.arguments = ContinueArguments() else: - self.arguments = ( - ContinueArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != ContinueArguments - else arguments - ) + self.arguments = ContinueArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != ContinueArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -5269,16 +6303,16 @@ class ContinueArguments(BaseSchema): __props__ = { "threadId": { "type": "integer", - "description": "Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is True, only the thread with this ID is resumed.", + "description": "Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is True, only the thread with this ID is resumed." }, "singleThread": { "type": "boolean", - "description": "If this flag is True, execution is resumed only for the thread with given `threadId`.", - }, + "description": "If this flag is True, execution is resumed only for the thread with given `threadId`." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, threadId, singleThread=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -5290,11 +6324,12 @@ class ContinueArguments(BaseSchema): if update_ids_from_dap: self.threadId = self._translate_id_from_dap(self.threadId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_from_dap(dct['threadId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -5304,21 +6339,21 @@ class ContinueArguments(BaseSchema): if threadId is not None: threadId = self._translate_id_to_dap(threadId) dct = { - "threadId": threadId, + 'threadId': threadId, } if singleThread is not None: - dct["singleThread"] = singleThread + dct['singleThread'] = singleThread dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_to_dap(dct['threadId']) return dct -@register_response("continue") +@register_response('continue') @register class ContinueResponse(BaseSchema): """ @@ -5330,63 +6365,79 @@ class ContinueResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { "allThreadsContinued": { "type": "boolean", - "description": "The value True (or a missing property) signals to the client that all threads have been resumed. The value false indicates that not all threads were resumed.", + "description": "The value True (or a missing property) signals to the client that all threads have been resumed. The value false indicates that not all threads were resumed." } - }, - }, + } + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param ContinueResponseBody body: + :param ContinueResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = ContinueResponseBody() else: - self.body = ( - ContinueResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ContinueResponseBody else body - ) + self.body = ContinueResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ContinueResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -5396,30 +6447,30 @@ class ContinueResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("next") +@register_request('next') @register class NextRequest(BaseSchema): """ The request executes one step (in the given granularity) for the specified thread and allows all other threads to run freely by resuming them. - + If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming. - + The debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed. @@ -5429,44 +6480,55 @@ class NextRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["next"]}, - "arguments": {"type": "NextArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "next" + ] + }, + "arguments": { + "type": "NextArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param NextArguments arguments: + :param string type: + :param string command: + :param NextArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "next" + self.type = 'request' + self.command = 'next' if arguments is None: self.arguments = NextArguments() else: - self.arguments = ( - NextArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != NextArguments else arguments - ) + self.arguments = NextArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != NextArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -5483,17 +6545,20 @@ class NextArguments(BaseSchema): __props__ = { "threadId": { "type": "integer", - "description": "Specifies the thread for which to resume execution for one step (of the given granularity).", + "description": "Specifies the thread for which to resume execution for one step (of the given granularity)." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is True, all other suspended threads are not resumed." }, - "singleThread": {"type": "boolean", "description": "If this flag is True, all other suspended threads are not resumed."}, "granularity": { "description": "Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed.", - "type": "SteppingGranularity", - }, + "type": "SteppingGranularity" + } } - __refs__ = set(["granularity"]) + __refs__ = set(['granularity']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, threadId, singleThread=None, granularity=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -5509,11 +6574,12 @@ class NextArguments(BaseSchema): if update_ids_from_dap: self.threadId = self._translate_id_from_dap(self.threadId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_from_dap(dct['threadId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -5524,23 +6590,23 @@ class NextArguments(BaseSchema): if threadId is not None: threadId = self._translate_id_to_dap(threadId) dct = { - "threadId": threadId, + 'threadId': threadId, } if singleThread is not None: - dct["singleThread"] = singleThread + dct['singleThread'] = singleThread if granularity is not None: - dct["granularity"] = granularity + dct['granularity'] = granularity dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_to_dap(dct['threadId']) return dct -@register_response("next") +@register_response('next') @register class NextResponse(BaseSchema): """ @@ -5552,33 +6618,58 @@ class NextResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -5590,7 +6681,7 @@ class NextResponse(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -5599,6 +6690,7 @@ class NextResponse(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -5608,40 +6700,40 @@ class NextResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_request("stepIn") +@register_request('stepIn') @register class StepInRequest(BaseSchema): """ The request resumes the given thread to step into a function/method and allows all other threads to run freely by resuming them. - + If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming. - + If the request cannot step into a target, `stepIn` behaves like the `next` request. - + The debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed. - + If there are multiple function/method calls (or other targets) on the source line, - + the argument `targetId` can be used to control into which target the `stepIn` should occur. - + The list of possible targets for a given source line can be retrieved via the `stepInTargets` request. @@ -5651,46 +6743,55 @@ class StepInRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["stepIn"]}, - "arguments": {"type": "StepInArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "stepIn" + ] + }, + "arguments": { + "type": "StepInArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param StepInArguments arguments: + :param string type: + :param string command: + :param StepInArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "stepIn" + self.type = 'request' + self.command = 'stepIn' if arguments is None: self.arguments = StepInArguments() else: - self.arguments = ( - StepInArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != StepInArguments - else arguments - ) + self.arguments = StepInArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != StepInArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -5707,18 +6808,24 @@ class StepInArguments(BaseSchema): __props__ = { "threadId": { "type": "integer", - "description": "Specifies the thread for which to resume execution for one step-into (of the given granularity).", + "description": "Specifies the thread for which to resume execution for one step-into (of the given granularity)." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is True, all other suspended threads are not resumed." + }, + "targetId": { + "type": "integer", + "description": "Id of the target to step into." }, - "singleThread": {"type": "boolean", "description": "If this flag is True, all other suspended threads are not resumed."}, - "targetId": {"type": "integer", "description": "Id of the target to step into."}, "granularity": { "description": "Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed.", - "type": "SteppingGranularity", - }, + "type": "SteppingGranularity" + } } - __refs__ = set(["granularity"]) + __refs__ = set(['granularity']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, threadId, singleThread=None, targetId=None, granularity=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -5736,11 +6843,12 @@ class StepInArguments(BaseSchema): if update_ids_from_dap: self.threadId = self._translate_id_from_dap(self.threadId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_from_dap(dct['threadId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -5752,25 +6860,25 @@ class StepInArguments(BaseSchema): if threadId is not None: threadId = self._translate_id_to_dap(threadId) dct = { - "threadId": threadId, + 'threadId': threadId, } if singleThread is not None: - dct["singleThread"] = singleThread + dct['singleThread'] = singleThread if targetId is not None: - dct["targetId"] = targetId + dct['targetId'] = targetId if granularity is not None: - dct["granularity"] = granularity + dct['granularity'] = granularity dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_to_dap(dct['threadId']) return dct -@register_response("stepIn") +@register_response('stepIn') @register class StepInResponse(BaseSchema): """ @@ -5782,33 +6890,58 @@ class StepInResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -5820,7 +6953,7 @@ class StepInResponse(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -5829,6 +6962,7 @@ class StepInResponse(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -5838,31 +6972,31 @@ class StepInResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_request("stepOut") +@register_request('stepOut') @register class StepOutRequest(BaseSchema): """ The request resumes the given thread to step out (return) from a function/method and allows all other threads to run freely by resuming them. - + If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming. - + The debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed. @@ -5872,46 +7006,55 @@ class StepOutRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["stepOut"]}, - "arguments": {"type": "StepOutArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "stepOut" + ] + }, + "arguments": { + "type": "StepOutArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param StepOutArguments arguments: + :param string type: + :param string command: + :param StepOutArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "stepOut" + self.type = 'request' + self.command = 'stepOut' if arguments is None: self.arguments = StepOutArguments() else: - self.arguments = ( - StepOutArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != StepOutArguments - else arguments - ) + self.arguments = StepOutArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != StepOutArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -5928,17 +7071,20 @@ class StepOutArguments(BaseSchema): __props__ = { "threadId": { "type": "integer", - "description": "Specifies the thread for which to resume execution for one step-out (of the given granularity).", + "description": "Specifies the thread for which to resume execution for one step-out (of the given granularity)." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is True, all other suspended threads are not resumed." }, - "singleThread": {"type": "boolean", "description": "If this flag is True, all other suspended threads are not resumed."}, "granularity": { "description": "Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed.", - "type": "SteppingGranularity", - }, + "type": "SteppingGranularity" + } } - __refs__ = set(["granularity"]) + __refs__ = set(['granularity']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, threadId, singleThread=None, granularity=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -5954,11 +7100,12 @@ class StepOutArguments(BaseSchema): if update_ids_from_dap: self.threadId = self._translate_id_from_dap(self.threadId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_from_dap(dct['threadId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -5969,23 +7116,23 @@ class StepOutArguments(BaseSchema): if threadId is not None: threadId = self._translate_id_to_dap(threadId) dct = { - "threadId": threadId, + 'threadId': threadId, } if singleThread is not None: - dct["singleThread"] = singleThread + dct['singleThread'] = singleThread if granularity is not None: - dct["granularity"] = granularity + dct['granularity'] = granularity dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_to_dap(dct['threadId']) return dct -@register_response("stepOut") +@register_response('stepOut') @register class StepOutResponse(BaseSchema): """ @@ -5997,33 +7144,58 @@ class StepOutResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -6035,7 +7207,7 @@ class StepOutResponse(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -6044,6 +7216,7 @@ class StepOutResponse(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -6053,34 +7226,34 @@ class StepOutResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_request("stepBack") +@register_request('stepBack') @register class StepBackRequest(BaseSchema): """ The request executes one backward step (in the given granularity) for the specified thread and allows all other threads to run backward freely by resuming them. - + If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming. - + The debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed. - + Clients should only call this request if the corresponding capability `supportsStepBack` is true. Note: automatically generated code. Do not edit manually. @@ -6089,46 +7262,55 @@ class StepBackRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["stepBack"]}, - "arguments": {"type": "StepBackArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "stepBack" + ] + }, + "arguments": { + "type": "StepBackArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param StepBackArguments arguments: + :param string type: + :param string command: + :param StepBackArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "stepBack" + self.type = 'request' + self.command = 'stepBack' if arguments is None: self.arguments = StepBackArguments() else: - self.arguments = ( - StepBackArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != StepBackArguments - else arguments - ) + self.arguments = StepBackArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != StepBackArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -6145,17 +7327,20 @@ class StepBackArguments(BaseSchema): __props__ = { "threadId": { "type": "integer", - "description": "Specifies the thread for which to resume execution for one step backwards (of the given granularity).", + "description": "Specifies the thread for which to resume execution for one step backwards (of the given granularity)." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is True, all other suspended threads are not resumed." }, - "singleThread": {"type": "boolean", "description": "If this flag is True, all other suspended threads are not resumed."}, "granularity": { "description": "Stepping granularity to step. If no granularity is specified, a granularity of `statement` is assumed.", - "type": "SteppingGranularity", - }, + "type": "SteppingGranularity" + } } - __refs__ = set(["granularity"]) + __refs__ = set(['granularity']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, threadId, singleThread=None, granularity=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -6171,11 +7356,12 @@ class StepBackArguments(BaseSchema): if update_ids_from_dap: self.threadId = self._translate_id_from_dap(self.threadId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_from_dap(dct['threadId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -6186,23 +7372,23 @@ class StepBackArguments(BaseSchema): if threadId is not None: threadId = self._translate_id_to_dap(threadId) dct = { - "threadId": threadId, + 'threadId': threadId, } if singleThread is not None: - dct["singleThread"] = singleThread + dct['singleThread'] = singleThread if granularity is not None: - dct["granularity"] = granularity + dct['granularity'] = granularity dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_to_dap(dct['threadId']) return dct -@register_response("stepBack") +@register_response('stepBack') @register class StepBackResponse(BaseSchema): """ @@ -6214,33 +7400,58 @@ class StepBackResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -6252,7 +7463,7 @@ class StepBackResponse(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -6261,6 +7472,7 @@ class StepBackResponse(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -6270,21 +7482,21 @@ class StepBackResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_request("reverseContinue") +@register_request('reverseContinue') @register class ReverseContinueRequest(BaseSchema): """ @@ -6292,7 +7504,7 @@ class ReverseContinueRequest(BaseSchema): execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true resumes only the specified thread. If not all threads were resumed, the `allThreadsContinued` attribute of the response should be set to false. - + Clients should only call this request if the corresponding capability `supportsStepBack` is true. Note: automatically generated code. Do not edit manually. @@ -6301,46 +7513,55 @@ class ReverseContinueRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["reverseContinue"]}, - "arguments": {"type": "ReverseContinueArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "reverseContinue" + ] + }, + "arguments": { + "type": "ReverseContinueArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param ReverseContinueArguments arguments: + :param string type: + :param string command: + :param ReverseContinueArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "reverseContinue" + self.type = 'request' + self.command = 'reverseContinue' if arguments is None: self.arguments = ReverseContinueArguments() else: - self.arguments = ( - ReverseContinueArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != ReverseContinueArguments - else arguments - ) + self.arguments = ReverseContinueArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != ReverseContinueArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -6357,16 +7578,16 @@ class ReverseContinueArguments(BaseSchema): __props__ = { "threadId": { "type": "integer", - "description": "Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is True, only the thread with this ID is resumed.", + "description": "Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is True, only the thread with this ID is resumed." }, "singleThread": { "type": "boolean", - "description": "If this flag is True, backward execution is resumed only for the thread with given `threadId`.", - }, + "description": "If this flag is True, backward execution is resumed only for the thread with given `threadId`." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, threadId, singleThread=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -6378,11 +7599,12 @@ class ReverseContinueArguments(BaseSchema): if update_ids_from_dap: self.threadId = self._translate_id_from_dap(self.threadId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_from_dap(dct['threadId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -6392,21 +7614,21 @@ class ReverseContinueArguments(BaseSchema): if threadId is not None: threadId = self._translate_id_to_dap(threadId) dct = { - "threadId": threadId, + 'threadId': threadId, } if singleThread is not None: - dct["singleThread"] = singleThread + dct['singleThread'] = singleThread dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_to_dap(dct['threadId']) return dct -@register_response("reverseContinue") +@register_response('reverseContinue') @register class ReverseContinueResponse(BaseSchema): """ @@ -6419,33 +7641,58 @@ class ReverseContinueResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -6457,7 +7704,7 @@ class ReverseContinueResponse(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -6466,6 +7713,7 @@ class ReverseContinueResponse(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -6475,29 +7723,29 @@ class ReverseContinueResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_request("restartFrame") +@register_request('restartFrame') @register class RestartFrameRequest(BaseSchema): """ The request restarts execution of the specified stack frame. - + The debug adapter first sends the response and then a `stopped` event (with reason `restart`) after the restart has completed. - + Clients should only call this request if the corresponding capability `supportsRestartFrame` is true. @@ -6507,46 +7755,55 @@ class RestartFrameRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["restartFrame"]}, - "arguments": {"type": "RestartFrameArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "restartFrame" + ] + }, + "arguments": { + "type": "RestartFrameArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param RestartFrameArguments arguments: + :param string type: + :param string command: + :param RestartFrameArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "restartFrame" + self.type = 'request' + self.command = 'restartFrame' if arguments is None: self.arguments = RestartFrameArguments() else: - self.arguments = ( - RestartFrameArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != RestartFrameArguments - else arguments - ) + self.arguments = RestartFrameArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != RestartFrameArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -6563,12 +7820,12 @@ class RestartFrameArguments(BaseSchema): __props__ = { "frameId": { "type": "integer", - "description": "Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.", + "description": "Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, frameId, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -6578,11 +7835,12 @@ class RestartFrameArguments(BaseSchema): if update_ids_from_dap: self.frameId = self._translate_id_from_dap(self.frameId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "frameId" in dct: - dct["frameId"] = cls._translate_id_from_dap(dct["frameId"]) + if 'frameId' in dct: + dct['frameId'] = cls._translate_id_from_dap(dct['frameId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -6591,19 +7849,19 @@ class RestartFrameArguments(BaseSchema): if frameId is not None: frameId = self._translate_id_to_dap(frameId) dct = { - "frameId": frameId, + 'frameId': frameId, } dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "frameId" in dct: - dct["frameId"] = cls._translate_id_to_dap(dct["frameId"]) + if 'frameId' in dct: + dct['frameId'] = cls._translate_id_to_dap(dct['frameId']) return dct -@register_response("restartFrame") +@register_response('restartFrame') @register class RestartFrameResponse(BaseSchema): """ @@ -6615,33 +7873,58 @@ class RestartFrameResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -6653,7 +7936,7 @@ class RestartFrameResponse(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -6662,6 +7945,7 @@ class RestartFrameResponse(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -6671,32 +7955,32 @@ class RestartFrameResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_request("goto") +@register_request('goto') @register class GotoRequest(BaseSchema): """ The request sets the location where the debuggee will continue to run. - + This makes it possible to skip the execution of code or to execute code again. - + The code between the current location and the goto target is not executed but skipped. - + The debug adapter first sends the response and then a `stopped` event with reason `goto`. - + Clients should only call this request if the corresponding capability `supportsGotoTargetsRequest` is true (because only then goto targets exist that can be passed as arguments). @@ -6706,44 +7990,55 @@ class GotoRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["goto"]}, - "arguments": {"type": "GotoArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "goto" + ] + }, + "arguments": { + "type": "GotoArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param GotoArguments arguments: + :param string type: + :param string command: + :param GotoArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "goto" + self.type = 'request' + self.command = 'goto' if arguments is None: self.arguments = GotoArguments() else: - self.arguments = ( - GotoArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != GotoArguments else arguments - ) + self.arguments = GotoArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != GotoArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -6758,12 +8053,18 @@ class GotoArguments(BaseSchema): """ __props__ = { - "threadId": {"type": "integer", "description": "Set the goto target for this thread."}, - "targetId": {"type": "integer", "description": "The location where the debuggee will continue to run."}, + "threadId": { + "type": "integer", + "description": "Set the goto target for this thread." + }, + "targetId": { + "type": "integer", + "description": "The location where the debuggee will continue to run." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, threadId, targetId, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -6775,11 +8076,12 @@ class GotoArguments(BaseSchema): if update_ids_from_dap: self.threadId = self._translate_id_from_dap(self.threadId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_from_dap(dct['threadId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -6789,20 +8091,20 @@ class GotoArguments(BaseSchema): if threadId is not None: threadId = self._translate_id_to_dap(threadId) dct = { - "threadId": threadId, - "targetId": targetId, + 'threadId': threadId, + 'targetId': targetId, } dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_to_dap(dct['threadId']) return dct -@register_response("goto") +@register_response('goto') @register class GotoResponse(BaseSchema): """ @@ -6814,33 +8116,58 @@ class GotoResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -6852,7 +8179,7 @@ class GotoResponse(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -6861,6 +8188,7 @@ class GotoResponse(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -6870,26 +8198,26 @@ class GotoResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_request("pause") +@register_request('pause') @register class PauseRequest(BaseSchema): """ The request suspends the debuggee. - + The debug adapter first sends the response and then a `stopped` event (with reason `pause`) after the thread has been paused successfully. @@ -6899,44 +8227,55 @@ class PauseRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["pause"]}, - "arguments": {"type": "PauseArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "pause" + ] + }, + "arguments": { + "type": "PauseArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param PauseArguments arguments: + :param string type: + :param string command: + :param PauseArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "pause" + self.type = 'request' + self.command = 'pause' if arguments is None: self.arguments = PauseArguments() else: - self.arguments = ( - PauseArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != PauseArguments else arguments - ) + self.arguments = PauseArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != PauseArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -6950,10 +8289,15 @@ class PauseArguments(BaseSchema): Note: automatically generated code. Do not edit manually. """ - __props__ = {"threadId": {"type": "integer", "description": "Pause execution for this thread."}} + __props__ = { + "threadId": { + "type": "integer", + "description": "Pause execution for this thread." + } + } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, threadId, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -6963,11 +8307,12 @@ class PauseArguments(BaseSchema): if update_ids_from_dap: self.threadId = self._translate_id_from_dap(self.threadId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_from_dap(dct['threadId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -6976,19 +8321,19 @@ class PauseArguments(BaseSchema): if threadId is not None: threadId = self._translate_id_to_dap(threadId) dct = { - "threadId": threadId, + 'threadId': threadId, } dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_to_dap(dct['threadId']) return dct -@register_response("pause") +@register_response('pause') @register class PauseResponse(BaseSchema): """ @@ -7000,33 +8345,58 @@ class PauseResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -7038,7 +8408,7 @@ class PauseResponse(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -7047,6 +8417,7 @@ class PauseResponse(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -7056,26 +8427,26 @@ class PauseResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_request("stackTrace") +@register_request('stackTrace') @register class StackTraceRequest(BaseSchema): """ The request returns a stacktrace from the current execution state of a given thread. - + A client can request all stack frames by omitting the startFrame and levels arguments. For performance-conscious clients and if the corresponding capability `supportsDelayedStackTraceLoading` is true, stack frames can be retrieved in a piecemeal way with the `startFrame` and `levels` @@ -7091,46 +8462,55 @@ class StackTraceRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["stackTrace"]}, - "arguments": {"type": "StackTraceArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "stackTrace" + ] + }, + "arguments": { + "type": "StackTraceArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param StackTraceArguments arguments: + :param string type: + :param string command: + :param StackTraceArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "stackTrace" + self.type = 'request' + self.command = 'stackTrace' if arguments is None: self.arguments = StackTraceArguments() else: - self.arguments = ( - StackTraceArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != StackTraceArguments - else arguments - ) + self.arguments = StackTraceArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != StackTraceArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -7145,20 +8525,26 @@ class StackTraceArguments(BaseSchema): """ __props__ = { - "threadId": {"type": "integer", "description": "Retrieve the stacktrace for this thread."}, - "startFrame": {"type": "integer", "description": "The index of the first frame to return; if omitted frames start at 0."}, + "threadId": { + "type": "integer", + "description": "Retrieve the stacktrace for this thread." + }, + "startFrame": { + "type": "integer", + "description": "The index of the first frame to return; if omitted frames start at 0." + }, "levels": { "type": "integer", - "description": "The maximum number of frames to return. If levels is not specified or 0, all frames are returned.", + "description": "The maximum number of frames to return. If levels is not specified or 0, all frames are returned." }, "format": { "description": "Specifies details on how to format the stack frames.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is True.", - "type": "StackFrameFormat", - }, + "type": "StackFrameFormat" + } } - __refs__ = set(["format"]) + __refs__ = set(['format']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, threadId, startFrame=None, levels=None, format=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -7174,17 +8560,16 @@ class StackTraceArguments(BaseSchema): if format is None: self.format = StackFrameFormat() else: - self.format = ( - StackFrameFormat(update_ids_from_dap=update_ids_from_dap, **format) if format.__class__ != StackFrameFormat else format - ) + self.format = StackFrameFormat(update_ids_from_dap=update_ids_from_dap, **format) if format.__class__ != StackFrameFormat else format if update_ids_from_dap: self.threadId = self._translate_id_from_dap(self.threadId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_from_dap(dct['threadId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -7196,25 +8581,25 @@ class StackTraceArguments(BaseSchema): if threadId is not None: threadId = self._translate_id_to_dap(threadId) dct = { - "threadId": threadId, + 'threadId': threadId, } if startFrame is not None: - dct["startFrame"] = startFrame + dct['startFrame'] = startFrame if levels is not None: - dct["levels"] = levels + dct['levels'] = levels if format is not None: - dct["format"] = format.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['format'] = format.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_to_dap(dct['threadId']) return dct -@register_response("stackTrace") +@register_response('stackTrace') @register class StackTraceResponse(BaseSchema): """ @@ -7226,71 +8611,89 @@ class StackTraceResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { "stackFrames": { "type": "array", - "items": {"$ref": "#/definitions/StackFrame"}, - "description": "The frames of the stack frame. If the array has length zero, there are no stack frames available.\nThis means that there is no location information available.", + "items": { + "$ref": "#/definitions/StackFrame" + }, + "description": "The frames of the stack frame. If the array has length zero, there are no stack frames available.\nThis means that there is no location information available." }, "totalFrames": { "type": "integer", - "description": "The total number of frames available in the stack. If omitted or if `totalFrames` is larger than the available frames, a client is expected to request frames until a request returns less frames than requested (which indicates the end of the stack). Returning monotonically increasing `totalFrames` values for subsequent requests can be used to enforce paging in the client.", - }, + "description": "The total number of frames available in the stack. If omitted or if `totalFrames` is larger than the available frames, a client is expected to request frames until a request returns less frames than requested (which indicates the end of the stack). Returning monotonically increasing `totalFrames` values for subsequent requests can be used to enforce paging in the client." + } }, - "required": ["stackFrames"], - }, + "required": [ + "stackFrames" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param StackTraceResponseBody body: + :param StackTraceResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = StackTraceResponseBody() else: - self.body = ( - StackTraceResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != StackTraceResponseBody - else body - ) + self.body = StackTraceResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != StackTraceResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -7300,20 +8703,20 @@ class StackTraceResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("scopes") +@register_request('scopes') @register class ScopesRequest(BaseSchema): """ @@ -7325,46 +8728,55 @@ class ScopesRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["scopes"]}, - "arguments": {"type": "ScopesArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "scopes" + ] + }, + "arguments": { + "type": "ScopesArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param ScopesArguments arguments: + :param string type: + :param string command: + :param ScopesArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "scopes" + self.type = 'request' + self.command = 'scopes' if arguments is None: self.arguments = ScopesArguments() else: - self.arguments = ( - ScopesArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != ScopesArguments - else arguments - ) + self.arguments = ScopesArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != ScopesArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -7381,12 +8793,12 @@ class ScopesArguments(BaseSchema): __props__ = { "frameId": { "type": "integer", - "description": "Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.", + "description": "Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, frameId, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -7396,11 +8808,12 @@ class ScopesArguments(BaseSchema): if update_ids_from_dap: self.frameId = self._translate_id_from_dap(self.frameId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "frameId" in dct: - dct["frameId"] = cls._translate_id_from_dap(dct["frameId"]) + if 'frameId' in dct: + dct['frameId'] = cls._translate_id_from_dap(dct['frameId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -7409,19 +8822,19 @@ class ScopesArguments(BaseSchema): if frameId is not None: frameId = self._translate_id_to_dap(frameId) dct = { - "frameId": frameId, + 'frameId': frameId, } dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "frameId" in dct: - dct["frameId"] = cls._translate_id_to_dap(dct["frameId"]) + if 'frameId' in dct: + dct['frameId'] = cls._translate_id_to_dap(dct['frameId']) return dct -@register_response("scopes") +@register_response('scopes') @register class ScopesResponse(BaseSchema): """ @@ -7433,65 +8846,85 @@ class ScopesResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { "scopes": { "type": "array", - "items": {"$ref": "#/definitions/Scope"}, - "description": "The scopes of the stack frame. If the array has length zero, there are no scopes available.", + "items": { + "$ref": "#/definitions/Scope" + }, + "description": "The scopes of the stack frame. If the array has length zero, there are no scopes available." } }, - "required": ["scopes"], - }, + "required": [ + "scopes" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param ScopesResponseBody body: + :param ScopesResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = ScopesResponseBody() else: - self.body = ( - ScopesResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ScopesResponseBody else body - ) + self.body = ScopesResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ScopesResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -7501,25 +8934,25 @@ class ScopesResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("variables") +@register_request('variables') @register class VariablesRequest(BaseSchema): """ Retrieves all child variables for the given variable reference. - + A filter can be used to limit the fetched children to either named or indexed children. Note: automatically generated code. Do not edit manually. @@ -7528,46 +8961,55 @@ class VariablesRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["variables"]}, - "arguments": {"type": "VariablesArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "variables" + ] + }, + "arguments": { + "type": "VariablesArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param VariablesArguments arguments: + :param string type: + :param string command: + :param VariablesArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "variables" + self.type = 'request' + self.command = 'variables' if arguments is None: self.arguments = VariablesArguments() else: - self.arguments = ( - VariablesArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != VariablesArguments - else arguments - ) + self.arguments = VariablesArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != VariablesArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -7584,29 +9026,32 @@ class VariablesArguments(BaseSchema): __props__ = { "variablesReference": { "type": "integer", - "description": "The variable for which to retrieve its children. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.", + "description": "The variable for which to retrieve its children. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." }, "filter": { "type": "string", - "enum": ["indexed", "named"], - "description": "Filter to limit the child variables to either named or indexed. If omitted, both types are fetched.", + "enum": [ + "indexed", + "named" + ], + "description": "Filter to limit the child variables to either named or indexed. If omitted, both types are fetched." }, "start": { "type": "integer", - "description": "The index of the first variable to return; if omitted children start at 0.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is True.", + "description": "The index of the first variable to return; if omitted children start at 0.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is True." }, "count": { "type": "integer", - "description": "The number of variables to return. If count is missing or 0, all variables are returned.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is True.", + "description": "The number of variables to return. If count is missing or 0, all variables are returned.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is True." }, "format": { "description": "Specifies details on how to format the Variable values.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is True.", - "type": "ValueFormat", - }, + "type": "ValueFormat" + } } - __refs__ = set(["format"]) + __refs__ = set(['format']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, variablesReference, filter=None, start=None, count=None, format=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -7626,15 +9071,16 @@ class VariablesArguments(BaseSchema): if format is None: self.format = ValueFormat() else: - self.format = ValueFormat(update_ids_from_dap=update_ids_from_dap, **format) if format.__class__ != ValueFormat else format + self.format = ValueFormat(update_ids_from_dap=update_ids_from_dap, **format) if format.__class__ != ValueFormat else format if update_ids_from_dap: self.variablesReference = self._translate_id_from_dap(self.variablesReference) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "variablesReference" in dct: - dct["variablesReference"] = cls._translate_id_from_dap(dct["variablesReference"]) + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_from_dap(dct['variablesReference']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -7647,27 +9093,27 @@ class VariablesArguments(BaseSchema): if variablesReference is not None: variablesReference = self._translate_id_to_dap(variablesReference) dct = { - "variablesReference": variablesReference, + 'variablesReference': variablesReference, } if filter is not None: - dct["filter"] = filter + dct['filter'] = filter if start is not None: - dct["start"] = start + dct['start'] = start if count is not None: - dct["count"] = count + dct['count'] = count if format is not None: - dct["format"] = format.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['format'] = format.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "variablesReference" in dct: - dct["variablesReference"] = cls._translate_id_to_dap(dct["variablesReference"]) + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_to_dap(dct['variablesReference']) return dct -@register_response("variables") +@register_response('variables') @register class VariablesResponse(BaseSchema): """ @@ -7679,65 +9125,85 @@ class VariablesResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { "variables": { "type": "array", - "items": {"$ref": "#/definitions/Variable"}, - "description": "All (or a range) of variables for the given variable reference.", + "items": { + "$ref": "#/definitions/Variable" + }, + "description": "All (or a range) of variables for the given variable reference." } }, - "required": ["variables"], - }, + "required": [ + "variables" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param VariablesResponseBody body: + :param VariablesResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = VariablesResponseBody() else: - self.body = ( - VariablesResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != VariablesResponseBody else body - ) + self.body = VariablesResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != VariablesResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -7747,26 +9213,26 @@ class VariablesResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("setVariable") +@register_request('setVariable') @register class SetVariableRequest(BaseSchema): """ Set the variable with the given name in the variable container to a new value. Clients should only call this request if the corresponding capability `supportsSetVariable` is true. - + If a debug adapter implements both `setVariable` and `setExpression`, a client will only use `setExpression` if the variable has an `evaluateName` property. @@ -7776,46 +9242,55 @@ class SetVariableRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["setVariable"]}, - "arguments": {"type": "SetVariableArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "setVariable" + ] + }, + "arguments": { + "type": "SetVariableArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param SetVariableArguments arguments: + :param string type: + :param string command: + :param SetVariableArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "setVariable" + self.type = 'request' + self.command = 'setVariable' if arguments is None: self.arguments = SetVariableArguments() else: - self.arguments = ( - SetVariableArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != SetVariableArguments - else arguments - ) + self.arguments = SetVariableArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != SetVariableArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -7832,15 +9307,24 @@ class SetVariableArguments(BaseSchema): __props__ = { "variablesReference": { "type": "integer", - "description": "The reference of the variable container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.", + "description": "The reference of the variable container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." }, - "name": {"type": "string", "description": "The name of the variable in the container."}, - "value": {"type": "string", "description": "The value of the variable."}, - "format": {"description": "Specifies details on how to format the response value.", "type": "ValueFormat"}, + "name": { + "type": "string", + "description": "The name of the variable in the container." + }, + "value": { + "type": "string", + "description": "The value of the variable." + }, + "format": { + "description": "Specifies details on how to format the response value.", + "type": "ValueFormat" + } } - __refs__ = set(["format"]) + __refs__ = set(['format']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, variablesReference, name, value, format=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -7855,15 +9339,16 @@ class SetVariableArguments(BaseSchema): if format is None: self.format = ValueFormat() else: - self.format = ValueFormat(update_ids_from_dap=update_ids_from_dap, **format) if format.__class__ != ValueFormat else format + self.format = ValueFormat(update_ids_from_dap=update_ids_from_dap, **format) if format.__class__ != ValueFormat else format if update_ids_from_dap: self.variablesReference = self._translate_id_from_dap(self.variablesReference) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "variablesReference" in dct: - dct["variablesReference"] = cls._translate_id_from_dap(dct["variablesReference"]) + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_from_dap(dct['variablesReference']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -7875,23 +9360,23 @@ class SetVariableArguments(BaseSchema): if variablesReference is not None: variablesReference = self._translate_id_to_dap(variablesReference) dct = { - "variablesReference": variablesReference, - "name": name, - "value": value, + 'variablesReference': variablesReference, + 'name': name, + 'value': value, } if format is not None: - dct["format"] = format.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['format'] = format.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "variablesReference" in dct: - dct["variablesReference"] = cls._translate_id_to_dap(dct["variablesReference"]) + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_to_dap(dct['variablesReference']) return dct -@register_response("setVariable") +@register_response('setVariable') @register class SetVariableResponse(BaseSchema): """ @@ -7903,83 +9388,102 @@ class SetVariableResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { - "value": {"type": "string", "description": "The new value of the variable."}, + "value": { + "type": "string", + "description": "The new value of the variable." + }, "type": { "type": "string", - "description": "The type of the new value. Typically shown in the UI when hovering over the value.", + "description": "The type of the new value. Typically shown in the UI when hovering over the value." }, "variablesReference": { "type": "integer", - "description": "If `variablesReference` is > 0, the new value is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + "description": "If `variablesReference` is > 0, the new value is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." }, "namedVariables": { "type": "integer", - "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "indexedVariables": { "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "memoryReference": { "type": "string", - "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True.", - }, + "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True." + } }, - "required": ["value"], - }, + "required": [ + "value" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param SetVariableResponseBody body: + :param SetVariableResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = SetVariableResponseBody() else: - self.body = ( - SetVariableResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != SetVariableResponseBody - else body - ) + self.body = SetVariableResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != SetVariableResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -7989,20 +9493,20 @@ class SetVariableResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("source") +@register_request('source') @register class SourceRequest(BaseSchema): """ @@ -8014,46 +9518,55 @@ class SourceRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["source"]}, - "arguments": {"type": "SourceArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "source" + ] + }, + "arguments": { + "type": "SourceArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param SourceArguments arguments: + :param string type: + :param string command: + :param SourceArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "source" + self.type = 'request' + self.command = 'source' if arguments is None: self.arguments = SourceArguments() else: - self.arguments = ( - SourceArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != SourceArguments - else arguments - ) + self.arguments = SourceArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != SourceArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -8070,16 +9583,16 @@ class SourceArguments(BaseSchema): __props__ = { "source": { "description": "Specifies the source content to load. Either `source.path` or `source.sourceReference` must be specified.", - "type": "Source", + "type": "Source" }, "sourceReference": { "type": "integer", - "description": "The reference to the source. This is the same as `source.sourceReference`.\nThis is provided for backward compatibility since old clients do not understand the `source` attribute.", - }, + "description": "The reference to the source. This is the same as `source.sourceReference`.\nThis is provided for backward compatibility since old clients do not understand the `source` attribute." + } } - __refs__ = set(["source"]) + __refs__ = set(['source']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, sourceReference, source=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -8091,22 +9604,23 @@ class SourceArguments(BaseSchema): if source is None: self.source = Source() else: - self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) sourceReference = self.sourceReference source = self.source dct = { - "sourceReference": sourceReference, + 'sourceReference': sourceReference, } if source is not None: - dct["source"] = source.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['source'] = source.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct -@register_response("source") +@register_response('source') @register class SourceResponse(BaseSchema): """ @@ -8118,62 +9632,86 @@ class SourceResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { - "content": {"type": "string", "description": "Content of the source reference."}, - "mimeType": {"type": "string", "description": "Content type (MIME type) of the source."}, + "content": { + "type": "string", + "description": "Content of the source reference." + }, + "mimeType": { + "type": "string", + "description": "Content type (MIME type) of the source." + } }, - "required": ["content"], - }, + "required": [ + "content" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param SourceResponseBody body: + :param SourceResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = SourceResponseBody() else: - self.body = ( - SourceResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != SourceResponseBody else body - ) + self.body = SourceResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != SourceResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -8183,20 +9721,20 @@ class SourceResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("threads") +@register_request('threads') @register class ThreadsRequest(BaseSchema): """ @@ -8208,49 +9746,68 @@ class ThreadsRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "threads" + ] }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["threads"]}, "arguments": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Object containing arguments for the command.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Object containing arguments for the command." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: + :param string type: + :param string command: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] arguments: Object containing arguments for the command. """ - self.type = "request" - self.command = "threads" + self.type = 'request' + self.command = 'threads' self.seq = seq self.arguments = arguments self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command seq = self.seq arguments = self.arguments dct = { - "type": type, - "command": command, - "seq": seq, + 'type': type, + 'command': command, + 'seq': seq, } if arguments is not None: - dct["arguments"] = arguments + dct['arguments'] = arguments dct.update(self.kwargs) return dct -@register_response("threads") +@register_response('threads') @register class ThreadsResponse(BaseSchema): """ @@ -8262,59 +9819,85 @@ class ThreadsResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", - "properties": {"threads": {"type": "array", "items": {"$ref": "#/definitions/Thread"}, "description": "All threads."}}, - "required": ["threads"], - }, + "properties": { + "threads": { + "type": "array", + "items": { + "$ref": "#/definitions/Thread" + }, + "description": "All threads." + } + }, + "required": [ + "threads" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param ThreadsResponseBody body: + :param ThreadsResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = ThreadsResponseBody() else: - self.body = ( - ThreadsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ThreadsResponseBody else body - ) + self.body = ThreadsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ThreadsResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -8324,25 +9907,25 @@ class ThreadsResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("terminateThreads") +@register_request('terminateThreads') @register class TerminateThreadsRequest(BaseSchema): """ The request terminates the threads with the given ids. - + Clients should only call this request if the corresponding capability `supportsTerminateThreadsRequest` is true. @@ -8352,46 +9935,55 @@ class TerminateThreadsRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["terminateThreads"]}, - "arguments": {"type": "TerminateThreadsArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "terminateThreads" + ] + }, + "arguments": { + "type": "TerminateThreadsArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param TerminateThreadsArguments arguments: + :param string type: + :param string command: + :param TerminateThreadsArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "terminateThreads" + self.type = 'request' + self.command = 'terminateThreads' if arguments is None: self.arguments = TerminateThreadsArguments() else: - self.arguments = ( - TerminateThreadsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != TerminateThreadsArguments - else arguments - ) + self.arguments = TerminateThreadsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != TerminateThreadsArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -8405,10 +9997,18 @@ class TerminateThreadsArguments(BaseSchema): Note: automatically generated code. Do not edit manually. """ - __props__ = {"threadIds": {"type": "array", "items": {"type": "integer"}, "description": "Ids of threads to be terminated."}} + __props__ = { + "threadIds": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Ids of threads to be terminated." + } + } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, threadIds=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -8417,18 +10017,20 @@ class TerminateThreadsArguments(BaseSchema): self.threadIds = threadIds self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) threadIds = self.threadIds if threadIds and hasattr(threadIds[0], "to_dict"): threadIds = [x.to_dict() for x in threadIds] - dct = {} + dct = { + } if threadIds is not None: - dct["threadIds"] = threadIds + dct['threadIds'] = threadIds dct.update(self.kwargs) return dct -@register_response("terminateThreads") +@register_response('terminateThreads') @register class TerminateThreadsResponse(BaseSchema): """ @@ -8440,33 +10042,58 @@ class TerminateThreadsResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -8478,7 +10105,7 @@ class TerminateThreadsResponse(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -8487,6 +10114,7 @@ class TerminateThreadsResponse(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -8496,27 +10124,27 @@ class TerminateThreadsResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_request("modules") +@register_request('modules') @register class ModulesRequest(BaseSchema): """ Modules can be retrieved from the debug adapter with this request which can either return all modules or a range of modules to support paging. - + Clients should only call this request if the corresponding capability `supportsModulesRequest` is true. @@ -8526,48 +10154,57 @@ class ModulesRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["modules"]}, - "arguments": {"type": "ModulesArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "modules" + ] + }, + "arguments": { + "type": "ModulesArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: + :param string type: + :param string command: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. - :param ModulesArguments arguments: + :param ModulesArguments arguments: """ - self.type = "request" - self.command = "modules" + self.type = 'request' + self.command = 'modules' self.seq = seq if arguments is None: self.arguments = ModulesArguments() else: - self.arguments = ( - ModulesArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != ModulesArguments - else arguments - ) + self.arguments = ModulesArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != ModulesArguments else arguments self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command seq = self.seq arguments = self.arguments dct = { - "type": type, - "command": command, - "seq": seq, + 'type': type, + 'command': command, + 'seq': seq, } if arguments is not None: - dct["arguments"] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['arguments'] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct @@ -8581,15 +10218,18 @@ class ModulesArguments(BaseSchema): """ __props__ = { - "startModule": {"type": "integer", "description": "The index of the first module to return; if omitted modules start at 0."}, + "startModule": { + "type": "integer", + "description": "The index of the first module to return; if omitted modules start at 0." + }, "moduleCount": { "type": "integer", - "description": "The number of modules to return. If `moduleCount` is not specified or 0, all modules are returned.", - }, + "description": "The number of modules to return. If `moduleCount` is not specified or 0, all modules are returned." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, startModule=None, moduleCount=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -8600,19 +10240,21 @@ class ModulesArguments(BaseSchema): self.moduleCount = moduleCount self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) startModule = self.startModule moduleCount = self.moduleCount - dct = {} + dct = { + } if startModule is not None: - dct["startModule"] = startModule + dct['startModule'] = startModule if moduleCount is not None: - dct["moduleCount"] = moduleCount + dct['moduleCount'] = moduleCount dct.update(self.kwargs) return dct -@register_response("modules") +@register_response('modules') @register class ModulesResponse(BaseSchema): """ @@ -8624,62 +10266,89 @@ class ModulesResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { - "modules": {"type": "array", "items": {"$ref": "#/definitions/Module"}, "description": "All modules or range of modules."}, - "totalModules": {"type": "integer", "description": "The total number of modules available."}, + "modules": { + "type": "array", + "items": { + "$ref": "#/definitions/Module" + }, + "description": "All modules or range of modules." + }, + "totalModules": { + "type": "integer", + "description": "The total number of modules available." + } }, - "required": ["modules"], - }, + "required": [ + "modules" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param ModulesResponseBody body: + :param ModulesResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = ModulesResponseBody() else: - self.body = ( - ModulesResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ModulesResponseBody else body - ) + self.body = ModulesResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ModulesResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -8689,25 +10358,25 @@ class ModulesResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("loadedSources") +@register_request('loadedSources') @register class LoadedSourcesRequest(BaseSchema): """ Retrieves the set of all sources currently loaded by the debugged process. - + Clients should only call this request if the corresponding capability `supportsLoadedSourcesRequest` is true. @@ -8717,48 +10386,57 @@ class LoadedSourcesRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["loadedSources"]}, - "arguments": {"type": "LoadedSourcesArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "loadedSources" + ] + }, + "arguments": { + "type": "LoadedSourcesArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: + :param string type: + :param string command: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. - :param LoadedSourcesArguments arguments: + :param LoadedSourcesArguments arguments: """ - self.type = "request" - self.command = "loadedSources" + self.type = 'request' + self.command = 'loadedSources' self.seq = seq if arguments is None: self.arguments = LoadedSourcesArguments() else: - self.arguments = ( - LoadedSourcesArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != LoadedSourcesArguments - else arguments - ) + self.arguments = LoadedSourcesArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != LoadedSourcesArguments else arguments self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command seq = self.seq arguments = self.arguments dct = { - "type": type, - "command": command, - "seq": seq, + 'type': type, + 'command': command, + 'seq': seq, } if arguments is not None: - dct["arguments"] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['arguments'] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct @@ -8774,20 +10452,24 @@ class LoadedSourcesArguments(BaseSchema): __props__ = {} __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) - """ """ - + """ + + """ + self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) - dct = {} + dct = { + } dct.update(self.kwargs) return dct -@register_response("loadedSources") +@register_response('loadedSources') @register class LoadedSourcesResponse(BaseSchema): """ @@ -8799,63 +10481,85 @@ class LoadedSourcesResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { - "sources": {"type": "array", "items": {"$ref": "#/definitions/Source"}, "description": "Set of loaded sources."} + "sources": { + "type": "array", + "items": { + "$ref": "#/definitions/Source" + }, + "description": "Set of loaded sources." + } }, - "required": ["sources"], - }, + "required": [ + "sources" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param LoadedSourcesResponseBody body: + :param LoadedSourcesResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = LoadedSourcesResponseBody() else: - self.body = ( - LoadedSourcesResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != LoadedSourcesResponseBody - else body - ) + self.body = LoadedSourcesResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != LoadedSourcesResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -8865,25 +10569,25 @@ class LoadedSourcesResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("evaluate") +@register_request('evaluate') @register class EvaluateRequest(BaseSchema): """ Evaluates the given expression in the context of the topmost stack frame. - + The expression has access to any variables and arguments that are in scope. Note: automatically generated code. Do not edit manually. @@ -8892,46 +10596,55 @@ class EvaluateRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["evaluate"]}, - "arguments": {"type": "EvaluateArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "evaluate" + ] + }, + "arguments": { + "type": "EvaluateArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param EvaluateArguments arguments: + :param string type: + :param string command: + :param EvaluateArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "evaluate" + self.type = 'request' + self.command = 'evaluate' if arguments is None: self.arguments = EvaluateArguments() else: - self.arguments = ( - EvaluateArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != EvaluateArguments - else arguments - ) + self.arguments = EvaluateArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != EvaluateArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -8946,31 +10659,40 @@ class EvaluateArguments(BaseSchema): """ __props__ = { - "expression": {"type": "string", "description": "The expression to evaluate."}, + "expression": { + "type": "string", + "description": "The expression to evaluate." + }, "frameId": { "type": "integer", - "description": "Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope.", + "description": "Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope." }, "context": { "type": "string", - "_enum": ["watch", "repl", "hover", "clipboard", "variables"], + "_enum": [ + "watch", + "repl", + "hover", + "clipboard", + "variables" + ], "enumDescriptions": [ "evaluate is called from a watch view context.", "evaluate is called from a REPL context.", "evaluate is called to generate the debug hover contents.\nThis value should only be used if the corresponding capability `supportsEvaluateForHovers` is True.", "evaluate is called to generate clipboard contents.\nThis value should only be used if the corresponding capability `supportsClipboardContext` is True.", - "evaluate is called from a variables view context.", + "evaluate is called from a variables view context." ], - "description": "The context in which the evaluate request is used.", + "description": "The context in which the evaluate request is used." }, "format": { "description": "Specifies details on how to format the result.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is True.", - "type": "ValueFormat", - }, + "type": "ValueFormat" + } } - __refs__ = set(["format"]) + __refs__ = set(['format']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, expression, frameId=None, context=None, format=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -8986,15 +10708,16 @@ class EvaluateArguments(BaseSchema): if format is None: self.format = ValueFormat() else: - self.format = ValueFormat(update_ids_from_dap=update_ids_from_dap, **format) if format.__class__ != ValueFormat else format + self.format = ValueFormat(update_ids_from_dap=update_ids_from_dap, **format) if format.__class__ != ValueFormat else format if update_ids_from_dap: self.frameId = self._translate_id_from_dap(self.frameId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "frameId" in dct: - dct["frameId"] = cls._translate_id_from_dap(dct["frameId"]) + if 'frameId' in dct: + dct['frameId'] = cls._translate_id_from_dap(dct['frameId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -9006,25 +10729,25 @@ class EvaluateArguments(BaseSchema): if frameId is not None: frameId = self._translate_id_to_dap(frameId) dct = { - "expression": expression, + 'expression': expression, } if frameId is not None: - dct["frameId"] = frameId + dct['frameId'] = frameId if context is not None: - dct["context"] = context + dct['context'] = context if format is not None: - dct["format"] = format.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['format'] = format.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "frameId" in dct: - dct["frameId"] = cls._translate_id_to_dap(dct["frameId"]) + if 'frameId' in dct: + dct['frameId'] = cls._translate_id_to_dap(dct['frameId']) return dct -@register_response("evaluate") +@register_response('evaluate') @register class EvaluateResponse(BaseSchema): """ @@ -9036,85 +10759,107 @@ class EvaluateResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { - "result": {"type": "string", "description": "The result of the evaluate request."}, + "result": { + "type": "string", + "description": "The result of the evaluate request." + }, "type": { "type": "string", - "description": "The type of the evaluate result.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is True.", + "description": "The type of the evaluate result.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is True." }, "presentationHint": { "$ref": "#/definitions/VariablePresentationHint", - "description": "Properties of an evaluate result that can be used to determine how to render the result in the UI.", + "description": "Properties of an evaluate result that can be used to determine how to render the result in the UI." }, "variablesReference": { "type": "integer", - "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." }, "namedVariables": { "type": "integer", - "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "indexedVariables": { "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "memoryReference": { "type": "string", - "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True.", - }, + "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True." + } }, - "required": ["result", "variablesReference"], - }, + "required": [ + "result", + "variablesReference" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param EvaluateResponseBody body: + :param EvaluateResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = EvaluateResponseBody() else: - self.body = ( - EvaluateResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != EvaluateResponseBody else body - ) + self.body = EvaluateResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != EvaluateResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -9124,31 +10869,31 @@ class EvaluateResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("setExpression") +@register_request('setExpression') @register class SetExpressionRequest(BaseSchema): """ Evaluates the given `value` expression and assigns it to the `expression` which must be a modifiable l-value. - + The expressions have access to any variables and arguments that are in scope of the specified frame. - + Clients should only call this request if the corresponding capability `supportsSetExpression` is true. - + If a debug adapter implements both `setExpression` and `setVariable`, a client uses `setExpression` if the variable has an `evaluateName` property. @@ -9158,46 +10903,55 @@ class SetExpressionRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["setExpression"]}, - "arguments": {"type": "SetExpressionArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "setExpression" + ] + }, + "arguments": { + "type": "SetExpressionArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param SetExpressionArguments arguments: + :param string type: + :param string command: + :param SetExpressionArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "setExpression" + self.type = 'request' + self.command = 'setExpression' if arguments is None: self.arguments = SetExpressionArguments() else: - self.arguments = ( - SetExpressionArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != SetExpressionArguments - else arguments - ) + self.arguments = SetExpressionArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != SetExpressionArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -9212,17 +10966,26 @@ class SetExpressionArguments(BaseSchema): """ __props__ = { - "expression": {"type": "string", "description": "The l-value expression to assign to."}, - "value": {"type": "string", "description": "The value expression to assign to the l-value expression."}, + "expression": { + "type": "string", + "description": "The l-value expression to assign to." + }, + "value": { + "type": "string", + "description": "The value expression to assign to the l-value expression." + }, "frameId": { "type": "integer", - "description": "Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope.", + "description": "Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope." }, - "format": {"description": "Specifies how the resulting value should be formatted.", "type": "ValueFormat"}, + "format": { + "description": "Specifies how the resulting value should be formatted.", + "type": "ValueFormat" + } } - __refs__ = set(["format"]) + __refs__ = set(['format']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, expression, value, frameId=None, format=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -9237,15 +11000,16 @@ class SetExpressionArguments(BaseSchema): if format is None: self.format = ValueFormat() else: - self.format = ValueFormat(update_ids_from_dap=update_ids_from_dap, **format) if format.__class__ != ValueFormat else format + self.format = ValueFormat(update_ids_from_dap=update_ids_from_dap, **format) if format.__class__ != ValueFormat else format if update_ids_from_dap: self.frameId = self._translate_id_from_dap(self.frameId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "frameId" in dct: - dct["frameId"] = cls._translate_id_from_dap(dct["frameId"]) + if 'frameId' in dct: + dct['frameId'] = cls._translate_id_from_dap(dct['frameId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -9257,24 +11021,24 @@ class SetExpressionArguments(BaseSchema): if frameId is not None: frameId = self._translate_id_to_dap(frameId) dct = { - "expression": expression, - "value": value, + 'expression': expression, + 'value': value, } if frameId is not None: - dct["frameId"] = frameId + dct['frameId'] = frameId if format is not None: - dct["format"] = format.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['format'] = format.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "frameId" in dct: - dct["frameId"] = cls._translate_id_to_dap(dct["frameId"]) + if 'frameId' in dct: + dct['frameId'] = cls._translate_id_to_dap(dct['frameId']) return dct -@register_response("setExpression") +@register_response('setExpression') @register class SetExpressionResponse(BaseSchema): """ @@ -9286,87 +11050,106 @@ class SetExpressionResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { - "value": {"type": "string", "description": "The new value of the expression."}, + "value": { + "type": "string", + "description": "The new value of the expression." + }, "type": { "type": "string", - "description": "The type of the value.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is True.", + "description": "The type of the value.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is True." }, "presentationHint": { "$ref": "#/definitions/VariablePresentationHint", - "description": "Properties of a value that can be used to determine how to render the result in the UI.", + "description": "Properties of a value that can be used to determine how to render the result in the UI." }, "variablesReference": { "type": "integer", - "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." }, "namedVariables": { "type": "integer", - "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "indexedVariables": { "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "memoryReference": { "type": "string", - "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True.", - }, + "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True." + } }, - "required": ["value"], - }, + "required": [ + "value" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param SetExpressionResponseBody body: + :param SetExpressionResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = SetExpressionResponseBody() else: - self.body = ( - SetExpressionResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != SetExpressionResponseBody - else body - ) + self.body = SetExpressionResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != SetExpressionResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -9376,27 +11159,27 @@ class SetExpressionResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("stepInTargets") +@register_request('stepInTargets') @register class StepInTargetsRequest(BaseSchema): """ This request retrieves the possible step-in targets for the specified stack frame. - + These targets can be used in the `stepIn` request. - + Clients should only call this request if the corresponding capability `supportsStepInTargetsRequest` is true. @@ -9406,46 +11189,55 @@ class StepInTargetsRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["stepInTargets"]}, - "arguments": {"type": "StepInTargetsArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "stepInTargets" + ] + }, + "arguments": { + "type": "StepInTargetsArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param StepInTargetsArguments arguments: + :param string type: + :param string command: + :param StepInTargetsArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "stepInTargets" + self.type = 'request' + self.command = 'stepInTargets' if arguments is None: self.arguments = StepInTargetsArguments() else: - self.arguments = ( - StepInTargetsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != StepInTargetsArguments - else arguments - ) + self.arguments = StepInTargetsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != StepInTargetsArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -9459,10 +11251,15 @@ class StepInTargetsArguments(BaseSchema): Note: automatically generated code. Do not edit manually. """ - __props__ = {"frameId": {"type": "integer", "description": "The stack frame for which to retrieve the possible step-in targets."}} + __props__ = { + "frameId": { + "type": "integer", + "description": "The stack frame for which to retrieve the possible step-in targets." + } + } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, frameId, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -9472,11 +11269,12 @@ class StepInTargetsArguments(BaseSchema): if update_ids_from_dap: self.frameId = self._translate_id_from_dap(self.frameId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "frameId" in dct: - dct["frameId"] = cls._translate_id_from_dap(dct["frameId"]) + if 'frameId' in dct: + dct['frameId'] = cls._translate_id_from_dap(dct['frameId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -9485,19 +11283,19 @@ class StepInTargetsArguments(BaseSchema): if frameId is not None: frameId = self._translate_id_to_dap(frameId) dct = { - "frameId": frameId, + 'frameId': frameId, } dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "frameId" in dct: - dct["frameId"] = cls._translate_id_to_dap(dct["frameId"]) + if 'frameId' in dct: + dct['frameId'] = cls._translate_id_to_dap(dct['frameId']) return dct -@register_response("stepInTargets") +@register_response('stepInTargets') @register class StepInTargetsResponse(BaseSchema): """ @@ -9509,67 +11307,85 @@ class StepInTargetsResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { "targets": { "type": "array", - "items": {"$ref": "#/definitions/StepInTarget"}, - "description": "The possible step-in targets of the specified source location.", + "items": { + "$ref": "#/definitions/StepInTarget" + }, + "description": "The possible step-in targets of the specified source location." } }, - "required": ["targets"], - }, + "required": [ + "targets" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param StepInTargetsResponseBody body: + :param StepInTargetsResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = StepInTargetsResponseBody() else: - self.body = ( - StepInTargetsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != StepInTargetsResponseBody - else body - ) + self.body = StepInTargetsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != StepInTargetsResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -9579,27 +11395,27 @@ class StepInTargetsResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("gotoTargets") +@register_request('gotoTargets') @register class GotoTargetsRequest(BaseSchema): """ This request retrieves the possible goto targets for the specified source location. - + These targets can be used in the `goto` request. - + Clients should only call this request if the corresponding capability `supportsGotoTargetsRequest` is true. @@ -9609,46 +11425,55 @@ class GotoTargetsRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["gotoTargets"]}, - "arguments": {"type": "GotoTargetsArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "gotoTargets" + ] + }, + "arguments": { + "type": "GotoTargetsArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param GotoTargetsArguments arguments: + :param string type: + :param string command: + :param GotoTargetsArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "gotoTargets" + self.type = 'request' + self.command = 'gotoTargets' if arguments is None: self.arguments = GotoTargetsArguments() else: - self.arguments = ( - GotoTargetsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != GotoTargetsArguments - else arguments - ) + self.arguments = GotoTargetsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != GotoTargetsArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -9663,16 +11488,22 @@ class GotoTargetsArguments(BaseSchema): """ __props__ = { - "source": {"description": "The source location for which the goto targets are determined.", "type": "Source"}, - "line": {"type": "integer", "description": "The line location for which the goto targets are determined."}, + "source": { + "description": "The source location for which the goto targets are determined.", + "type": "Source" + }, + "line": { + "type": "integer", + "description": "The line location for which the goto targets are determined." + }, "column": { "type": "integer", - "description": "The position within `line` for which the goto targets are determined. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", - }, + "description": "The position within `line` for which the goto targets are determined. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + } } - __refs__ = set(["source"]) + __refs__ = set(['source']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, source, line, column=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -9683,26 +11514,27 @@ class GotoTargetsArguments(BaseSchema): if source is None: self.source = Source() else: - self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source self.line = line self.column = column self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) source = self.source line = self.line column = self.column dct = { - "source": source.to_dict(update_ids_to_dap=update_ids_to_dap), - "line": line, + 'source': source.to_dict(update_ids_to_dap=update_ids_to_dap), + 'line': line, } if column is not None: - dct["column"] = column + dct['column'] = column dct.update(self.kwargs) return dct -@register_response("gotoTargets") +@register_response('gotoTargets') @register class GotoTargetsResponse(BaseSchema): """ @@ -9714,67 +11546,85 @@ class GotoTargetsResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { "targets": { "type": "array", - "items": {"$ref": "#/definitions/GotoTarget"}, - "description": "The possible goto targets of the specified location.", + "items": { + "$ref": "#/definitions/GotoTarget" + }, + "description": "The possible goto targets of the specified location." } }, - "required": ["targets"], - }, + "required": [ + "targets" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param GotoTargetsResponseBody body: + :param GotoTargetsResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = GotoTargetsResponseBody() else: - self.body = ( - GotoTargetsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != GotoTargetsResponseBody - else body - ) + self.body = GotoTargetsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != GotoTargetsResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -9784,25 +11634,25 @@ class GotoTargetsResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("completions") +@register_request('completions') @register class CompletionsRequest(BaseSchema): """ Returns a list of possible completions for a given caret position and text. - + Clients should only call this request if the corresponding capability `supportsCompletionsRequest` is true. @@ -9812,46 +11662,55 @@ class CompletionsRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["completions"]}, - "arguments": {"type": "CompletionsArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "completions" + ] + }, + "arguments": { + "type": "CompletionsArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param CompletionsArguments arguments: + :param string type: + :param string command: + :param CompletionsArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "completions" + self.type = 'request' + self.command = 'completions' if arguments is None: self.arguments = CompletionsArguments() else: - self.arguments = ( - CompletionsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != CompletionsArguments - else arguments - ) + self.arguments = CompletionsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != CompletionsArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -9868,24 +11727,24 @@ class CompletionsArguments(BaseSchema): __props__ = { "frameId": { "type": "integer", - "description": "Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope.", + "description": "Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope." }, "text": { "type": "string", - "description": "One or more source lines. Typically this is the text users have typed into the debug console before they asked for completion.", + "description": "One or more source lines. Typically this is the text users have typed into the debug console before they asked for completion." }, "column": { "type": "integer", - "description": "The position within `text` for which to determine the completion proposals. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + "description": "The position within `text` for which to determine the completion proposals. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." }, "line": { "type": "integer", - "description": "A line for which to determine the completion proposals. If missing the first line of the text is assumed.", - }, + "description": "A line for which to determine the completion proposals. If missing the first line of the text is assumed." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, text, column, frameId=None, line=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -9901,11 +11760,12 @@ class CompletionsArguments(BaseSchema): if update_ids_from_dap: self.frameId = self._translate_id_from_dap(self.frameId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "frameId" in dct: - dct["frameId"] = cls._translate_id_from_dap(dct["frameId"]) + if 'frameId' in dct: + dct['frameId'] = cls._translate_id_from_dap(dct['frameId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -9917,24 +11777,24 @@ class CompletionsArguments(BaseSchema): if frameId is not None: frameId = self._translate_id_to_dap(frameId) dct = { - "text": text, - "column": column, + 'text': text, + 'column': column, } if frameId is not None: - dct["frameId"] = frameId + dct['frameId'] = frameId if line is not None: - dct["line"] = line + dct['line'] = line dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "frameId" in dct: - dct["frameId"] = cls._translate_id_to_dap(dct["frameId"]) + if 'frameId' in dct: + dct['frameId'] = cls._translate_id_to_dap(dct['frameId']) return dct -@register_response("completions") +@register_response('completions') @register class CompletionsResponse(BaseSchema): """ @@ -9946,67 +11806,85 @@ class CompletionsResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { "targets": { "type": "array", - "items": {"$ref": "#/definitions/CompletionItem"}, - "description": "The possible completions for .", + "items": { + "$ref": "#/definitions/CompletionItem" + }, + "description": "The possible completions for ." } }, - "required": ["targets"], - }, + "required": [ + "targets" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param CompletionsResponseBody body: + :param CompletionsResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = CompletionsResponseBody() else: - self.body = ( - CompletionsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != CompletionsResponseBody - else body - ) + self.body = CompletionsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != CompletionsResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -10016,25 +11894,25 @@ class CompletionsResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("exceptionInfo") +@register_request('exceptionInfo') @register class ExceptionInfoRequest(BaseSchema): """ Retrieves the details of the exception that caused this event to be raised. - + Clients should only call this request if the corresponding capability `supportsExceptionInfoRequest` is true. @@ -10044,46 +11922,55 @@ class ExceptionInfoRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["exceptionInfo"]}, - "arguments": {"type": "ExceptionInfoArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "exceptionInfo" + ] + }, + "arguments": { + "type": "ExceptionInfoArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param ExceptionInfoArguments arguments: + :param string type: + :param string command: + :param ExceptionInfoArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "exceptionInfo" + self.type = 'request' + self.command = 'exceptionInfo' if arguments is None: self.arguments = ExceptionInfoArguments() else: - self.arguments = ( - ExceptionInfoArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != ExceptionInfoArguments - else arguments - ) + self.arguments = ExceptionInfoArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != ExceptionInfoArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -10097,10 +11984,15 @@ class ExceptionInfoArguments(BaseSchema): Note: automatically generated code. Do not edit manually. """ - __props__ = {"threadId": {"type": "integer", "description": "Thread for which exception information should be retrieved."}} + __props__ = { + "threadId": { + "type": "integer", + "description": "Thread for which exception information should be retrieved." + } + } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, threadId, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -10110,11 +12002,12 @@ class ExceptionInfoArguments(BaseSchema): if update_ids_from_dap: self.threadId = self._translate_id_from_dap(self.threadId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_from_dap(dct['threadId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -10123,19 +12016,19 @@ class ExceptionInfoArguments(BaseSchema): if threadId is not None: threadId = self._translate_id_to_dap(threadId) dct = { - "threadId": threadId, + 'threadId': threadId, } dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_to_dap(dct['threadId']) return dct -@register_response("exceptionInfo") +@register_response('exceptionInfo') @register class ExceptionInfoResponse(BaseSchema): """ @@ -10147,69 +12040,95 @@ class ExceptionInfoResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { - "exceptionId": {"type": "string", "description": "ID of the exception that was thrown."}, - "description": {"type": "string", "description": "Descriptive text for the exception."}, + "exceptionId": { + "type": "string", + "description": "ID of the exception that was thrown." + }, + "description": { + "type": "string", + "description": "Descriptive text for the exception." + }, "breakMode": { "$ref": "#/definitions/ExceptionBreakMode", - "description": "Mode that caused the exception notification to be raised.", + "description": "Mode that caused the exception notification to be raised." }, - "details": {"$ref": "#/definitions/ExceptionDetails", "description": "Detailed information about the exception."}, + "details": { + "$ref": "#/definitions/ExceptionDetails", + "description": "Detailed information about the exception." + } }, - "required": ["exceptionId", "breakMode"], - }, + "required": [ + "exceptionId", + "breakMode" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param ExceptionInfoResponseBody body: + :param ExceptionInfoResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = ExceptionInfoResponseBody() else: - self.body = ( - ExceptionInfoResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != ExceptionInfoResponseBody - else body - ) + self.body = ExceptionInfoResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ExceptionInfoResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -10219,25 +12138,25 @@ class ExceptionInfoResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct -@register_request("readMemory") +@register_request('readMemory') @register class ReadMemoryRequest(BaseSchema): """ Reads bytes from memory at the provided location. - + Clients should only call this request if the corresponding capability `supportsReadMemoryRequest` is true. @@ -10247,46 +12166,55 @@ class ReadMemoryRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["readMemory"]}, - "arguments": {"type": "ReadMemoryArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "readMemory" + ] + }, + "arguments": { + "type": "ReadMemoryArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param ReadMemoryArguments arguments: + :param string type: + :param string command: + :param ReadMemoryArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "readMemory" + self.type = 'request' + self.command = 'readMemory' if arguments is None: self.arguments = ReadMemoryArguments() else: - self.arguments = ( - ReadMemoryArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != ReadMemoryArguments - else arguments - ) + self.arguments = ReadMemoryArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != ReadMemoryArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -10301,16 +12229,22 @@ class ReadMemoryArguments(BaseSchema): """ __props__ = { - "memoryReference": {"type": "string", "description": "Memory reference to the base location from which data should be read."}, + "memoryReference": { + "type": "string", + "description": "Memory reference to the base location from which data should be read." + }, "offset": { "type": "integer", - "description": "Offset (in bytes) to be applied to the reference location before reading data. Can be negative.", + "description": "Offset (in bytes) to be applied to the reference location before reading data. Can be negative." }, - "count": {"type": "integer", "description": "Number of bytes to read at the specified location and offset."}, + "count": { + "type": "integer", + "description": "Number of bytes to read at the specified location and offset." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, memoryReference, count, offset=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -10323,21 +12257,22 @@ class ReadMemoryArguments(BaseSchema): self.offset = offset self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) memoryReference = self.memoryReference count = self.count offset = self.offset dct = { - "memoryReference": memoryReference, - "count": count, + 'memoryReference': memoryReference, + 'count': count, } if offset is not None: - dct["offset"] = offset + dct['offset'] = offset dct.update(self.kwargs) return dct -@register_response("readMemory") +@register_response('readMemory') @register class ReadMemoryResponse(BaseSchema): """ @@ -10349,47 +12284,66 @@ class ReadMemoryResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { "address": { "type": "string", - "description": "The address of the first byte of data returned.\nTreated as a hex value if prefixed with `0x`, or as a decimal value otherwise.", + "description": "The address of the first byte of data returned.\nTreated as a hex value if prefixed with `0x`, or as a decimal value otherwise." }, "unreadableBytes": { "type": "integer", - "description": "The number of unreadable bytes encountered after the last successfully read byte.\nThis can be used to determine the number of bytes that should be skipped before a subsequent `readMemory` request succeeds.", + "description": "The number of unreadable bytes encountered after the last successfully read byte.\nThis can be used to determine the number of bytes that should be skipped before a subsequent `readMemory` request succeeds." }, "data": { "type": "string", - "description": "The bytes read from memory, encoded using base64. If the decoded length of `data` is less than the requested `count` in the original `readMemory` request, and `unreadableBytes` is zero or omitted, then the client should assume it's reached the end of readable memory.", - }, + "description": "The bytes read from memory, encoded using base64. If the decoded length of `data` is less than the requested `count` in the original `readMemory` request, and `unreadableBytes` is zero or omitted, then the client should assume it's reached the end of readable memory." + } }, - "required": ["address"], - }, + "required": [ + "address" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -10399,9 +12353,9 @@ class ReadMemoryResponse(BaseSchema): :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. - :param ReadMemoryResponseBody body: + :param ReadMemoryResponseBody body: """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -10410,13 +12364,10 @@ class ReadMemoryResponse(BaseSchema): if body is None: self.body = ReadMemoryResponseBody() else: - self.body = ( - ReadMemoryResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != ReadMemoryResponseBody - else body - ) + self.body = ReadMemoryResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ReadMemoryResponseBody else body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -10426,26 +12377,26 @@ class ReadMemoryResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['body'] = body.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct -@register_request("writeMemory") +@register_request('writeMemory') @register class WriteMemoryRequest(BaseSchema): """ Writes bytes to memory at the provided location. - + Clients should only call this request if the corresponding capability `supportsWriteMemoryRequest` is true. @@ -10455,46 +12406,55 @@ class WriteMemoryRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["writeMemory"]}, - "arguments": {"type": "WriteMemoryArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "writeMemory" + ] + }, + "arguments": { + "type": "WriteMemoryArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param WriteMemoryArguments arguments: + :param string type: + :param string command: + :param WriteMemoryArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "writeMemory" + self.type = 'request' + self.command = 'writeMemory' if arguments is None: self.arguments = WriteMemoryArguments() else: - self.arguments = ( - WriteMemoryArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != WriteMemoryArguments - else arguments - ) + self.arguments = WriteMemoryArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != WriteMemoryArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -10509,20 +12469,26 @@ class WriteMemoryArguments(BaseSchema): """ __props__ = { - "memoryReference": {"type": "string", "description": "Memory reference to the base location to which data should be written."}, + "memoryReference": { + "type": "string", + "description": "Memory reference to the base location to which data should be written." + }, "offset": { "type": "integer", - "description": "Offset (in bytes) to be applied to the reference location before writing data. Can be negative.", + "description": "Offset (in bytes) to be applied to the reference location before writing data. Can be negative." }, "allowPartial": { "type": "boolean", - "description": "Property to control partial writes. If True, the debug adapter should attempt to write memory even if the entire memory region is not writable. In such a case the debug adapter should stop after hitting the first byte of memory that cannot be written and return the number of bytes written in the response via the `offset` and `bytesWritten` properties.\nIf false or missing, a debug adapter should attempt to verify the region is writable before writing, and fail the response if it is not.", + "description": "Property to control partial writes. If True, the debug adapter should attempt to write memory even if the entire memory region is not writable. In such a case the debug adapter should stop after hitting the first byte of memory that cannot be written and return the number of bytes written in the response via the `offset` and `bytesWritten` properties.\nIf false or missing, a debug adapter should attempt to verify the region is writable before writing, and fail the response if it is not." }, - "data": {"type": "string", "description": "Bytes to write, encoded using base64."}, + "data": { + "type": "string", + "description": "Bytes to write, encoded using base64." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, memoryReference, data, offset=None, allowPartial=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -10538,24 +12504,25 @@ class WriteMemoryArguments(BaseSchema): self.allowPartial = allowPartial self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) memoryReference = self.memoryReference data = self.data offset = self.offset allowPartial = self.allowPartial dct = { - "memoryReference": memoryReference, - "data": data, + 'memoryReference': memoryReference, + 'data': data, } if offset is not None: - dct["offset"] = offset + dct['offset'] = offset if allowPartial is not None: - dct["allowPartial"] = allowPartial + dct['allowPartial'] = allowPartial dct.update(self.kwargs) return dct -@register_response("writeMemory") +@register_response('writeMemory') @register class WriteMemoryResponse(BaseSchema): """ @@ -10567,42 +12534,59 @@ class WriteMemoryResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { "offset": { "type": "integer", - "description": "Property that should be returned when `allowPartial` is True to indicate the offset of the first byte of data successfully written. Can be negative.", + "description": "Property that should be returned when `allowPartial` is True to indicate the offset of the first byte of data successfully written. Can be negative." }, "bytesWritten": { "type": "integer", - "description": "Property that should be returned when `allowPartial` is True to indicate the number of bytes starting from address that were successfully written.", - }, - }, - }, + "description": "Property that should be returned when `allowPartial` is True to indicate the number of bytes starting from address that were successfully written." + } + } + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -10612,9 +12596,9 @@ class WriteMemoryResponse(BaseSchema): :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. - :param WriteMemoryResponseBody body: + :param WriteMemoryResponseBody body: """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -10623,13 +12607,10 @@ class WriteMemoryResponse(BaseSchema): if body is None: self.body = WriteMemoryResponseBody() else: - self.body = ( - WriteMemoryResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != WriteMemoryResponseBody - else body - ) + self.body = WriteMemoryResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != WriteMemoryResponseBody else body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -10639,26 +12620,26 @@ class WriteMemoryResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['body'] = body.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct -@register_request("disassemble") +@register_request('disassemble') @register class DisassembleRequest(BaseSchema): """ Disassembles code stored at the provided location. - + Clients should only call this request if the corresponding capability `supportsDisassembleRequest` is true. @@ -10668,46 +12649,55 @@ class DisassembleRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["disassemble"]}, - "arguments": {"type": "DisassembleArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "disassemble" + ] + }, + "arguments": { + "type": "DisassembleArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param DisassembleArguments arguments: + :param string type: + :param string command: + :param DisassembleArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "disassemble" + self.type = 'request' + self.command = 'disassemble' if arguments is None: self.arguments = DisassembleArguments() else: - self.arguments = ( - DisassembleArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != DisassembleArguments - else arguments - ) + self.arguments = DisassembleArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != DisassembleArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -10724,39 +12714,30 @@ class DisassembleArguments(BaseSchema): __props__ = { "memoryReference": { "type": "string", - "description": "Memory reference to the base location containing the instructions to disassemble.", + "description": "Memory reference to the base location containing the instructions to disassemble." }, "offset": { "type": "integer", - "description": "Offset (in bytes) to be applied to the reference location before disassembling. Can be negative.", + "description": "Offset (in bytes) to be applied to the reference location before disassembling. Can be negative." }, "instructionOffset": { "type": "integer", - "description": "Offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative.", + "description": "Offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative." }, "instructionCount": { "type": "integer", - "description": "Number of instructions to disassemble starting at the specified location and offset.\nAn adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value.", + "description": "Number of instructions to disassemble starting at the specified location and offset.\nAn adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value." }, "resolveSymbols": { "type": "boolean", - "description": "If True, the adapter should attempt to resolve memory addresses and other values to symbolic names.", - }, + "description": "If True, the adapter should attempt to resolve memory addresses and other values to symbolic names." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - memoryReference, - instructionCount, - offset=None, - instructionOffset=None, - resolveSymbols=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, memoryReference, instructionCount, offset=None, instructionOffset=None, resolveSymbols=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string memoryReference: Memory reference to the base location containing the instructions to disassemble. :param integer instructionCount: Number of instructions to disassemble starting at the specified location and offset. @@ -10772,6 +12753,7 @@ class DisassembleArguments(BaseSchema): self.resolveSymbols = resolveSymbols self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) memoryReference = self.memoryReference instructionCount = self.instructionCount @@ -10779,20 +12761,20 @@ class DisassembleArguments(BaseSchema): instructionOffset = self.instructionOffset resolveSymbols = self.resolveSymbols dct = { - "memoryReference": memoryReference, - "instructionCount": instructionCount, + 'memoryReference': memoryReference, + 'instructionCount': instructionCount, } if offset is not None: - dct["offset"] = offset + dct['offset'] = offset if instructionOffset is not None: - dct["instructionOffset"] = instructionOffset + dct['instructionOffset'] = instructionOffset if resolveSymbols is not None: - dct["resolveSymbols"] = resolveSymbols + dct['resolveSymbols'] = resolveSymbols dct.update(self.kwargs) return dct -@register_response("disassemble") +@register_response('disassemble') @register class DisassembleResponse(BaseSchema): """ @@ -10804,40 +12786,61 @@ class DisassembleResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { "instructions": { "type": "array", - "items": {"$ref": "#/definitions/DisassembledInstruction"}, - "description": "The list of disassembled instructions.", + "items": { + "$ref": "#/definitions/DisassembledInstruction" + }, + "description": "The list of disassembled instructions." } }, - "required": ["instructions"], - }, + "required": [ + "instructions" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -10847,9 +12850,9 @@ class DisassembleResponse(BaseSchema): :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. - :param DisassembleResponseBody body: + :param DisassembleResponseBody body: """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -10858,13 +12861,10 @@ class DisassembleResponse(BaseSchema): if body is None: self.body = DisassembleResponseBody() else: - self.body = ( - DisassembleResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != DisassembleResponseBody - else body - ) + self.body = DisassembleResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != DisassembleResponseBody else body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -10874,16 +12874,16 @@ class DisassembleResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['body'] = body.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct @@ -10899,159 +12899,178 @@ class Capabilities(BaseSchema): __props__ = { "supportsConfigurationDoneRequest": { "type": "boolean", - "description": "The debug adapter supports the `configurationDone` request.", + "description": "The debug adapter supports the `configurationDone` request." + }, + "supportsFunctionBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports function breakpoints." + }, + "supportsConditionalBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports conditional breakpoints." }, - "supportsFunctionBreakpoints": {"type": "boolean", "description": "The debug adapter supports function breakpoints."}, - "supportsConditionalBreakpoints": {"type": "boolean", "description": "The debug adapter supports conditional breakpoints."}, "supportsHitConditionalBreakpoints": { "type": "boolean", - "description": "The debug adapter supports breakpoints that break execution after a specified number of hits.", + "description": "The debug adapter supports breakpoints that break execution after a specified number of hits." }, "supportsEvaluateForHovers": { "type": "boolean", - "description": "The debug adapter supports a (side effect free) `evaluate` request for data hovers.", + "description": "The debug adapter supports a (side effect free) `evaluate` request for data hovers." }, "exceptionBreakpointFilters": { "type": "array", - "items": {"$ref": "#/definitions/ExceptionBreakpointsFilter"}, - "description": "Available exception filter options for the `setExceptionBreakpoints` request.", + "items": { + "$ref": "#/definitions/ExceptionBreakpointsFilter" + }, + "description": "Available exception filter options for the `setExceptionBreakpoints` request." }, "supportsStepBack": { "type": "boolean", - "description": "The debug adapter supports stepping back via the `stepBack` and `reverseContinue` requests.", + "description": "The debug adapter supports stepping back via the `stepBack` and `reverseContinue` requests." + }, + "supportsSetVariable": { + "type": "boolean", + "description": "The debug adapter supports setting a variable to a value." + }, + "supportsRestartFrame": { + "type": "boolean", + "description": "The debug adapter supports restarting a frame." + }, + "supportsGotoTargetsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `gotoTargets` request." + }, + "supportsStepInTargetsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `stepInTargets` request." + }, + "supportsCompletionsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `completions` request." }, - "supportsSetVariable": {"type": "boolean", "description": "The debug adapter supports setting a variable to a value."}, - "supportsRestartFrame": {"type": "boolean", "description": "The debug adapter supports restarting a frame."}, - "supportsGotoTargetsRequest": {"type": "boolean", "description": "The debug adapter supports the `gotoTargets` request."}, - "supportsStepInTargetsRequest": {"type": "boolean", "description": "The debug adapter supports the `stepInTargets` request."}, - "supportsCompletionsRequest": {"type": "boolean", "description": "The debug adapter supports the `completions` request."}, "completionTriggerCharacters": { "type": "array", - "items": {"type": "string"}, - "description": "The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the `.` character.", + "items": { + "type": "string" + }, + "description": "The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the `.` character." + }, + "supportsModulesRequest": { + "type": "boolean", + "description": "The debug adapter supports the `modules` request." }, - "supportsModulesRequest": {"type": "boolean", "description": "The debug adapter supports the `modules` request."}, "additionalModuleColumns": { "type": "array", - "items": {"$ref": "#/definitions/ColumnDescriptor"}, - "description": "The set of additional module information exposed by the debug adapter.", + "items": { + "$ref": "#/definitions/ColumnDescriptor" + }, + "description": "The set of additional module information exposed by the debug adapter." }, "supportedChecksumAlgorithms": { "type": "array", - "items": {"$ref": "#/definitions/ChecksumAlgorithm"}, - "description": "Checksum algorithms supported by the debug adapter.", + "items": { + "$ref": "#/definitions/ChecksumAlgorithm" + }, + "description": "Checksum algorithms supported by the debug adapter." }, "supportsRestartRequest": { "type": "boolean", - "description": "The debug adapter supports the `restart` request. In this case a client should not implement `restart` by terminating and relaunching the adapter but by calling the `restart` request.", + "description": "The debug adapter supports the `restart` request. In this case a client should not implement `restart` by terminating and relaunching the adapter but by calling the `restart` request." }, "supportsExceptionOptions": { "type": "boolean", - "description": "The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request.", + "description": "The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request." }, "supportsValueFormattingOptions": { "type": "boolean", - "description": "The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and `evaluate` requests.", + "description": "The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and `evaluate` requests." + }, + "supportsExceptionInfoRequest": { + "type": "boolean", + "description": "The debug adapter supports the `exceptionInfo` request." }, - "supportsExceptionInfoRequest": {"type": "boolean", "description": "The debug adapter supports the `exceptionInfo` request."}, "supportTerminateDebuggee": { "type": "boolean", - "description": "The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request.", + "description": "The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request." }, "supportSuspendDebuggee": { "type": "boolean", - "description": "The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request.", + "description": "The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request." }, "supportsDelayedStackTraceLoading": { "type": "boolean", - "description": "The debug adapter supports the delayed loading of parts of the stack, which requires that both the `startFrame` and `levels` arguments and the `totalFrames` result of the `stackTrace` request are supported.", + "description": "The debug adapter supports the delayed loading of parts of the stack, which requires that both the `startFrame` and `levels` arguments and the `totalFrames` result of the `stackTrace` request are supported." + }, + "supportsLoadedSourcesRequest": { + "type": "boolean", + "description": "The debug adapter supports the `loadedSources` request." }, - "supportsLoadedSourcesRequest": {"type": "boolean", "description": "The debug adapter supports the `loadedSources` request."}, "supportsLogPoints": { "type": "boolean", - "description": "The debug adapter supports log points by interpreting the `logMessage` attribute of the `SourceBreakpoint`.", + "description": "The debug adapter supports log points by interpreting the `logMessage` attribute of the `SourceBreakpoint`." + }, + "supportsTerminateThreadsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `terminateThreads` request." + }, + "supportsSetExpression": { + "type": "boolean", + "description": "The debug adapter supports the `setExpression` request." + }, + "supportsTerminateRequest": { + "type": "boolean", + "description": "The debug adapter supports the `terminate` request." + }, + "supportsDataBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports data breakpoints." + }, + "supportsReadMemoryRequest": { + "type": "boolean", + "description": "The debug adapter supports the `readMemory` request." + }, + "supportsWriteMemoryRequest": { + "type": "boolean", + "description": "The debug adapter supports the `writeMemory` request." + }, + "supportsDisassembleRequest": { + "type": "boolean", + "description": "The debug adapter supports the `disassemble` request." + }, + "supportsCancelRequest": { + "type": "boolean", + "description": "The debug adapter supports the `cancel` request." }, - "supportsTerminateThreadsRequest": {"type": "boolean", "description": "The debug adapter supports the `terminateThreads` request."}, - "supportsSetExpression": {"type": "boolean", "description": "The debug adapter supports the `setExpression` request."}, - "supportsTerminateRequest": {"type": "boolean", "description": "The debug adapter supports the `terminate` request."}, - "supportsDataBreakpoints": {"type": "boolean", "description": "The debug adapter supports data breakpoints."}, - "supportsReadMemoryRequest": {"type": "boolean", "description": "The debug adapter supports the `readMemory` request."}, - "supportsWriteMemoryRequest": {"type": "boolean", "description": "The debug adapter supports the `writeMemory` request."}, - "supportsDisassembleRequest": {"type": "boolean", "description": "The debug adapter supports the `disassemble` request."}, - "supportsCancelRequest": {"type": "boolean", "description": "The debug adapter supports the `cancel` request."}, "supportsBreakpointLocationsRequest": { "type": "boolean", - "description": "The debug adapter supports the `breakpointLocations` request.", + "description": "The debug adapter supports the `breakpointLocations` request." }, "supportsClipboardContext": { "type": "boolean", - "description": "The debug adapter supports the `clipboard` context value in the `evaluate` request.", + "description": "The debug adapter supports the `clipboard` context value in the `evaluate` request." }, "supportsSteppingGranularity": { "type": "boolean", - "description": "The debug adapter supports stepping granularities (argument `granularity`) for the stepping requests.", + "description": "The debug adapter supports stepping granularities (argument `granularity`) for the stepping requests." }, "supportsInstructionBreakpoints": { "type": "boolean", - "description": "The debug adapter supports adding breakpoints based on instruction references.", + "description": "The debug adapter supports adding breakpoints based on instruction references." }, "supportsExceptionFilterOptions": { "type": "boolean", - "description": "The debug adapter supports `filterOptions` as an argument on the `setExceptionBreakpoints` request.", + "description": "The debug adapter supports `filterOptions` as an argument on the `setExceptionBreakpoints` request." }, "supportsSingleThreadExecutionRequests": { "type": "boolean", - "description": "The debug adapter supports the `singleThread` property on the execution requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`).", - }, + "description": "The debug adapter supports the `singleThread` property on the execution requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`)." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - supportsConfigurationDoneRequest=None, - supportsFunctionBreakpoints=None, - supportsConditionalBreakpoints=None, - supportsHitConditionalBreakpoints=None, - supportsEvaluateForHovers=None, - exceptionBreakpointFilters=None, - supportsStepBack=None, - supportsSetVariable=None, - supportsRestartFrame=None, - supportsGotoTargetsRequest=None, - supportsStepInTargetsRequest=None, - supportsCompletionsRequest=None, - completionTriggerCharacters=None, - supportsModulesRequest=None, - additionalModuleColumns=None, - supportedChecksumAlgorithms=None, - supportsRestartRequest=None, - supportsExceptionOptions=None, - supportsValueFormattingOptions=None, - supportsExceptionInfoRequest=None, - supportTerminateDebuggee=None, - supportSuspendDebuggee=None, - supportsDelayedStackTraceLoading=None, - supportsLoadedSourcesRequest=None, - supportsLogPoints=None, - supportsTerminateThreadsRequest=None, - supportsSetExpression=None, - supportsTerminateRequest=None, - supportsDataBreakpoints=None, - supportsReadMemoryRequest=None, - supportsWriteMemoryRequest=None, - supportsDisassembleRequest=None, - supportsCancelRequest=None, - supportsBreakpointLocationsRequest=None, - supportsClipboardContext=None, - supportsSteppingGranularity=None, - supportsInstructionBreakpoints=None, - supportsExceptionFilterOptions=None, - supportsSingleThreadExecutionRequests=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, supportsConfigurationDoneRequest=None, supportsFunctionBreakpoints=None, supportsConditionalBreakpoints=None, supportsHitConditionalBreakpoints=None, supportsEvaluateForHovers=None, exceptionBreakpointFilters=None, supportsStepBack=None, supportsSetVariable=None, supportsRestartFrame=None, supportsGotoTargetsRequest=None, supportsStepInTargetsRequest=None, supportsCompletionsRequest=None, completionTriggerCharacters=None, supportsModulesRequest=None, additionalModuleColumns=None, supportedChecksumAlgorithms=None, supportsRestartRequest=None, supportsExceptionOptions=None, supportsValueFormattingOptions=None, supportsExceptionInfoRequest=None, supportTerminateDebuggee=None, supportSuspendDebuggee=None, supportsDelayedStackTraceLoading=None, supportsLoadedSourcesRequest=None, supportsLogPoints=None, supportsTerminateThreadsRequest=None, supportsSetExpression=None, supportsTerminateRequest=None, supportsDataBreakpoints=None, supportsReadMemoryRequest=None, supportsWriteMemoryRequest=None, supportsDisassembleRequest=None, supportsCancelRequest=None, supportsBreakpointLocationsRequest=None, supportsClipboardContext=None, supportsSteppingGranularity=None, supportsInstructionBreakpoints=None, supportsExceptionFilterOptions=None, supportsSingleThreadExecutionRequests=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param boolean supportsConfigurationDoneRequest: The debug adapter supports the `configurationDone` request. :param boolean supportsFunctionBreakpoints: The debug adapter supports function breakpoints. @@ -11143,6 +13162,7 @@ class Capabilities(BaseSchema): self.supportsSingleThreadExecutionRequests = supportsSingleThreadExecutionRequests self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) supportsConfigurationDoneRequest = self.supportsConfigurationDoneRequest supportsFunctionBreakpoints = self.supportsFunctionBreakpoints @@ -11191,97 +13211,86 @@ class Capabilities(BaseSchema): supportsInstructionBreakpoints = self.supportsInstructionBreakpoints supportsExceptionFilterOptions = self.supportsExceptionFilterOptions supportsSingleThreadExecutionRequests = self.supportsSingleThreadExecutionRequests - dct = {} + dct = { + } if supportsConfigurationDoneRequest is not None: - dct["supportsConfigurationDoneRequest"] = supportsConfigurationDoneRequest + dct['supportsConfigurationDoneRequest'] = supportsConfigurationDoneRequest if supportsFunctionBreakpoints is not None: - dct["supportsFunctionBreakpoints"] = supportsFunctionBreakpoints + dct['supportsFunctionBreakpoints'] = supportsFunctionBreakpoints if supportsConditionalBreakpoints is not None: - dct["supportsConditionalBreakpoints"] = supportsConditionalBreakpoints + dct['supportsConditionalBreakpoints'] = supportsConditionalBreakpoints if supportsHitConditionalBreakpoints is not None: - dct["supportsHitConditionalBreakpoints"] = supportsHitConditionalBreakpoints + dct['supportsHitConditionalBreakpoints'] = supportsHitConditionalBreakpoints if supportsEvaluateForHovers is not None: - dct["supportsEvaluateForHovers"] = supportsEvaluateForHovers + dct['supportsEvaluateForHovers'] = supportsEvaluateForHovers if exceptionBreakpointFilters is not None: - dct["exceptionBreakpointFilters"] = ( - [ExceptionBreakpointsFilter.update_dict_ids_to_dap(o) for o in exceptionBreakpointFilters] - if (update_ids_to_dap and exceptionBreakpointFilters) - else exceptionBreakpointFilters - ) + dct['exceptionBreakpointFilters'] = [ExceptionBreakpointsFilter.update_dict_ids_to_dap(o) for o in exceptionBreakpointFilters] if (update_ids_to_dap and exceptionBreakpointFilters) else exceptionBreakpointFilters if supportsStepBack is not None: - dct["supportsStepBack"] = supportsStepBack + dct['supportsStepBack'] = supportsStepBack if supportsSetVariable is not None: - dct["supportsSetVariable"] = supportsSetVariable + dct['supportsSetVariable'] = supportsSetVariable if supportsRestartFrame is not None: - dct["supportsRestartFrame"] = supportsRestartFrame + dct['supportsRestartFrame'] = supportsRestartFrame if supportsGotoTargetsRequest is not None: - dct["supportsGotoTargetsRequest"] = supportsGotoTargetsRequest + dct['supportsGotoTargetsRequest'] = supportsGotoTargetsRequest if supportsStepInTargetsRequest is not None: - dct["supportsStepInTargetsRequest"] = supportsStepInTargetsRequest + dct['supportsStepInTargetsRequest'] = supportsStepInTargetsRequest if supportsCompletionsRequest is not None: - dct["supportsCompletionsRequest"] = supportsCompletionsRequest + dct['supportsCompletionsRequest'] = supportsCompletionsRequest if completionTriggerCharacters is not None: - dct["completionTriggerCharacters"] = completionTriggerCharacters + dct['completionTriggerCharacters'] = completionTriggerCharacters if supportsModulesRequest is not None: - dct["supportsModulesRequest"] = supportsModulesRequest + dct['supportsModulesRequest'] = supportsModulesRequest if additionalModuleColumns is not None: - dct["additionalModuleColumns"] = ( - [ColumnDescriptor.update_dict_ids_to_dap(o) for o in additionalModuleColumns] - if (update_ids_to_dap and additionalModuleColumns) - else additionalModuleColumns - ) + dct['additionalModuleColumns'] = [ColumnDescriptor.update_dict_ids_to_dap(o) for o in additionalModuleColumns] if (update_ids_to_dap and additionalModuleColumns) else additionalModuleColumns if supportedChecksumAlgorithms is not None: - dct["supportedChecksumAlgorithms"] = ( - [ChecksumAlgorithm.update_dict_ids_to_dap(o) for o in supportedChecksumAlgorithms] - if (update_ids_to_dap and supportedChecksumAlgorithms) - else supportedChecksumAlgorithms - ) + dct['supportedChecksumAlgorithms'] = [ChecksumAlgorithm.update_dict_ids_to_dap(o) for o in supportedChecksumAlgorithms] if (update_ids_to_dap and supportedChecksumAlgorithms) else supportedChecksumAlgorithms if supportsRestartRequest is not None: - dct["supportsRestartRequest"] = supportsRestartRequest + dct['supportsRestartRequest'] = supportsRestartRequest if supportsExceptionOptions is not None: - dct["supportsExceptionOptions"] = supportsExceptionOptions + dct['supportsExceptionOptions'] = supportsExceptionOptions if supportsValueFormattingOptions is not None: - dct["supportsValueFormattingOptions"] = supportsValueFormattingOptions + dct['supportsValueFormattingOptions'] = supportsValueFormattingOptions if supportsExceptionInfoRequest is not None: - dct["supportsExceptionInfoRequest"] = supportsExceptionInfoRequest + dct['supportsExceptionInfoRequest'] = supportsExceptionInfoRequest if supportTerminateDebuggee is not None: - dct["supportTerminateDebuggee"] = supportTerminateDebuggee + dct['supportTerminateDebuggee'] = supportTerminateDebuggee if supportSuspendDebuggee is not None: - dct["supportSuspendDebuggee"] = supportSuspendDebuggee + dct['supportSuspendDebuggee'] = supportSuspendDebuggee if supportsDelayedStackTraceLoading is not None: - dct["supportsDelayedStackTraceLoading"] = supportsDelayedStackTraceLoading + dct['supportsDelayedStackTraceLoading'] = supportsDelayedStackTraceLoading if supportsLoadedSourcesRequest is not None: - dct["supportsLoadedSourcesRequest"] = supportsLoadedSourcesRequest + dct['supportsLoadedSourcesRequest'] = supportsLoadedSourcesRequest if supportsLogPoints is not None: - dct["supportsLogPoints"] = supportsLogPoints + dct['supportsLogPoints'] = supportsLogPoints if supportsTerminateThreadsRequest is not None: - dct["supportsTerminateThreadsRequest"] = supportsTerminateThreadsRequest + dct['supportsTerminateThreadsRequest'] = supportsTerminateThreadsRequest if supportsSetExpression is not None: - dct["supportsSetExpression"] = supportsSetExpression + dct['supportsSetExpression'] = supportsSetExpression if supportsTerminateRequest is not None: - dct["supportsTerminateRequest"] = supportsTerminateRequest + dct['supportsTerminateRequest'] = supportsTerminateRequest if supportsDataBreakpoints is not None: - dct["supportsDataBreakpoints"] = supportsDataBreakpoints + dct['supportsDataBreakpoints'] = supportsDataBreakpoints if supportsReadMemoryRequest is not None: - dct["supportsReadMemoryRequest"] = supportsReadMemoryRequest + dct['supportsReadMemoryRequest'] = supportsReadMemoryRequest if supportsWriteMemoryRequest is not None: - dct["supportsWriteMemoryRequest"] = supportsWriteMemoryRequest + dct['supportsWriteMemoryRequest'] = supportsWriteMemoryRequest if supportsDisassembleRequest is not None: - dct["supportsDisassembleRequest"] = supportsDisassembleRequest + dct['supportsDisassembleRequest'] = supportsDisassembleRequest if supportsCancelRequest is not None: - dct["supportsCancelRequest"] = supportsCancelRequest + dct['supportsCancelRequest'] = supportsCancelRequest if supportsBreakpointLocationsRequest is not None: - dct["supportsBreakpointLocationsRequest"] = supportsBreakpointLocationsRequest + dct['supportsBreakpointLocationsRequest'] = supportsBreakpointLocationsRequest if supportsClipboardContext is not None: - dct["supportsClipboardContext"] = supportsClipboardContext + dct['supportsClipboardContext'] = supportsClipboardContext if supportsSteppingGranularity is not None: - dct["supportsSteppingGranularity"] = supportsSteppingGranularity + dct['supportsSteppingGranularity'] = supportsSteppingGranularity if supportsInstructionBreakpoints is not None: - dct["supportsInstructionBreakpoints"] = supportsInstructionBreakpoints + dct['supportsInstructionBreakpoints'] = supportsInstructionBreakpoints if supportsExceptionFilterOptions is not None: - dct["supportsExceptionFilterOptions"] = supportsExceptionFilterOptions + dct['supportsExceptionFilterOptions'] = supportsExceptionFilterOptions if supportsSingleThreadExecutionRequests is not None: - dct["supportsSingleThreadExecutionRequests"] = supportsSingleThreadExecutionRequests + dct['supportsSingleThreadExecutionRequests'] = supportsSingleThreadExecutionRequests dct.update(self.kwargs) return dct @@ -11298,38 +13307,34 @@ class ExceptionBreakpointsFilter(BaseSchema): __props__ = { "filter": { "type": "string", - "description": "The internal ID of the filter option. This value is passed to the `setExceptionBreakpoints` request.", + "description": "The internal ID of the filter option. This value is passed to the `setExceptionBreakpoints` request." + }, + "label": { + "type": "string", + "description": "The name of the filter option. This is shown in the UI." }, - "label": {"type": "string", "description": "The name of the filter option. This is shown in the UI."}, "description": { "type": "string", - "description": "A help text providing additional information about the exception filter. This string is typically shown as a hover and can be translated.", + "description": "A help text providing additional information about the exception filter. This string is typically shown as a hover and can be translated." + }, + "default": { + "type": "boolean", + "description": "Initial value of the filter option. If not specified a value false is assumed." }, - "default": {"type": "boolean", "description": "Initial value of the filter option. If not specified a value false is assumed."}, "supportsCondition": { "type": "boolean", - "description": "Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set.", + "description": "Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set." }, "conditionDescription": { "type": "string", - "description": "A help text providing information about the condition. This string is shown as the placeholder text for a text box and can be translated.", - }, + "description": "A help text providing information about the condition. This string is shown as the placeholder text for a text box and can be translated." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - filter, - label, - description=None, - default=None, - supportsCondition=None, - conditionDescription=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, filter, label, description=None, default=None, supportsCondition=None, conditionDescription=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string filter: The internal ID of the filter option. This value is passed to the `setExceptionBreakpoints` request. :param string label: The name of the filter option. This is shown in the UI. @@ -11346,6 +13351,7 @@ class ExceptionBreakpointsFilter(BaseSchema): self.conditionDescription = conditionDescription self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) filter = self.filter # noqa (assign to builtin) label = self.label @@ -11354,17 +13360,17 @@ class ExceptionBreakpointsFilter(BaseSchema): supportsCondition = self.supportsCondition conditionDescription = self.conditionDescription dct = { - "filter": filter, - "label": label, + 'filter': filter, + 'label': label, } if description is not None: - dct["description"] = description + dct['description'] = description if default is not None: - dct["default"] = default + dct['default'] = default if supportsCondition is not None: - dct["supportsCondition"] = supportsCondition + dct['supportsCondition'] = supportsCondition if conditionDescription is not None: - dct["conditionDescription"] = conditionDescription + dct['conditionDescription'] = conditionDescription dct.update(self.kwargs) return dct @@ -11380,29 +13386,42 @@ class Message(BaseSchema): __props__ = { "id": { "type": "integer", - "description": "Unique (within a debug adapter implementation) identifier for the message. The purpose of these error IDs is to help extension authors that have the requirement that every user visible error message needs a corresponding error number, so that users or customer support can find information about the specific error more easily.", + "description": "Unique (within a debug adapter implementation) identifier for the message. The purpose of these error IDs is to help extension authors that have the requirement that every user visible error message needs a corresponding error number, so that users or customer support can find information about the specific error more easily." }, "format": { "type": "string", - "description": "A format string for the message. Embedded variables have the form `{name}`.\nIf variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes.", + "description": "A format string for the message. Embedded variables have the form `{name}`.\nIf variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes." }, "variables": { "type": "object", "description": "An object used as a dictionary for looking up the variables in the format string.", - "additionalProperties": {"type": "string", "description": "All dictionary values must be strings."}, + "additionalProperties": { + "type": "string", + "description": "All dictionary values must be strings." + } }, - "sendTelemetry": {"type": "boolean", "description": "If True send to telemetry."}, - "showUser": {"type": "boolean", "description": "If True show user."}, - "url": {"type": "string", "description": "A url where additional information about this message can be found."}, - "urlLabel": {"type": "string", "description": "A label that is presented to the user as the UI for opening the url."}, + "sendTelemetry": { + "type": "boolean", + "description": "If True send to telemetry." + }, + "showUser": { + "type": "boolean", + "description": "If True show user." + }, + "url": { + "type": "string", + "description": "A url where additional information about this message can be found." + }, + "urlLabel": { + "type": "string", + "description": "A label that is presented to the user as the UI for opening the url." + } } - __refs__ = set(["variables"]) + __refs__ = set(['variables']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, id, format, variables=None, sendTelemetry=None, showUser=None, url=None, urlLabel=None, update_ids_from_dap=False, **kwargs - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, id, format, variables=None, sendTelemetry=None, showUser=None, url=None, urlLabel=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param integer id: Unique (within a debug adapter implementation) identifier for the message. The purpose of these error IDs is to help extension authors that have the requirement that every user visible error message needs a corresponding error number, so that users or customer support can find information about the specific error more easily. :param string format: A format string for the message. Embedded variables have the form `{name}`. @@ -11418,17 +13437,14 @@ class Message(BaseSchema): if variables is None: self.variables = MessageVariables() else: - self.variables = ( - MessageVariables(update_ids_from_dap=update_ids_from_dap, **variables) - if variables.__class__ != MessageVariables - else variables - ) + self.variables = MessageVariables(update_ids_from_dap=update_ids_from_dap, **variables) if variables.__class__ != MessageVariables else variables self.sendTelemetry = sendTelemetry self.showUser = showUser self.url = url self.urlLabel = urlLabel self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) id = self.id # noqa (assign to builtin) format = self.format # noqa (assign to builtin) @@ -11438,19 +13454,19 @@ class Message(BaseSchema): url = self.url urlLabel = self.urlLabel dct = { - "id": id, - "format": format, + 'id': id, + 'format': format, } if variables is not None: - dct["variables"] = variables.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['variables'] = variables.to_dict(update_ids_to_dap=update_ids_to_dap) if sendTelemetry is not None: - dct["sendTelemetry"] = sendTelemetry + dct['sendTelemetry'] = sendTelemetry if showUser is not None: - dct["showUser"] = showUser + dct['showUser'] = showUser if url is not None: - dct["url"] = url + dct['url'] = url if urlLabel is not None: - dct["urlLabel"] = urlLabel + dct['urlLabel'] = urlLabel dct.update(self.kwargs) return dct @@ -11459,17 +13475,17 @@ class Message(BaseSchema): class Module(BaseSchema): """ A Module object represents a row in the modules view. - + The `id` attribute identifies a module in the modules view and is used in a `module` event for identifying a module for adding, updating or deleting. - + The `name` attribute is used to minimally render the module in the UI. - - + + Additional attributes can be added to the module. They show up in the module view if they have a corresponding `ColumnDescriptor`. - - + + To avoid an unnecessary proliferation of additional attributes with similar semantics but different names, we recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found. @@ -11478,48 +13494,55 @@ class Module(BaseSchema): """ __props__ = { - "id": {"type": ["integer", "string"], "description": "Unique identifier for the module."}, - "name": {"type": "string", "description": "A name of the module."}, + "id": { + "type": [ + "integer", + "string" + ], + "description": "Unique identifier for the module." + }, + "name": { + "type": "string", + "description": "A name of the module." + }, "path": { "type": "string", - "description": "Logical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module.", + "description": "Logical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module." + }, + "isOptimized": { + "type": "boolean", + "description": "True if the module is optimized." }, - "isOptimized": {"type": "boolean", "description": "True if the module is optimized."}, "isUserCode": { "type": "boolean", - "description": "True if the module is considered 'user code' by a debugger that supports 'Just My Code'.", + "description": "True if the module is considered 'user code' by a debugger that supports 'Just My Code'." + }, + "version": { + "type": "string", + "description": "Version of Module." }, - "version": {"type": "string", "description": "Version of Module."}, "symbolStatus": { "type": "string", - "description": "User-understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc.)", + "description": "User-understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc.)" }, "symbolFilePath": { "type": "string", - "description": "Logical full path to the symbol file. The exact definition is implementation defined.", + "description": "Logical full path to the symbol file. The exact definition is implementation defined." }, - "dateTimeStamp": {"type": "string", "description": "Module created or modified, encoded as a RFC 3339 timestamp."}, - "addressRange": {"type": "string", "description": "Address range covered by this module."}, + "dateTimeStamp": { + "type": "string", + "description": "Module created or modified, encoded as a RFC 3339 timestamp." + }, + "addressRange": { + "type": "string", + "description": "Address range covered by this module." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - id, - name, - path=None, - isOptimized=None, - isUserCode=None, - version=None, - symbolStatus=None, - symbolFilePath=None, - dateTimeStamp=None, - addressRange=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, id, name, path=None, isOptimized=None, isUserCode=None, version=None, symbolStatus=None, symbolFilePath=None, dateTimeStamp=None, addressRange=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param ['integer', 'string'] id: Unique identifier for the module. :param string name: A name of the module. @@ -11544,6 +13567,7 @@ class Module(BaseSchema): self.addressRange = addressRange self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) id = self.id # noqa (assign to builtin) name = self.name @@ -11556,25 +13580,25 @@ class Module(BaseSchema): dateTimeStamp = self.dateTimeStamp addressRange = self.addressRange dct = { - "id": id, - "name": name, + 'id': id, + 'name': name, } if path is not None: - dct["path"] = path + dct['path'] = path if isOptimized is not None: - dct["isOptimized"] = isOptimized + dct['isOptimized'] = isOptimized if isUserCode is not None: - dct["isUserCode"] = isUserCode + dct['isUserCode'] = isUserCode if version is not None: - dct["version"] = version + dct['version'] = version if symbolStatus is not None: - dct["symbolStatus"] = symbolStatus + dct['symbolStatus'] = symbolStatus if symbolFilePath is not None: - dct["symbolFilePath"] = symbolFilePath + dct['symbolFilePath'] = symbolFilePath if dateTimeStamp is not None: - dct["dateTimeStamp"] = dateTimeStamp + dct['dateTimeStamp'] = dateTimeStamp if addressRange is not None: - dct["addressRange"] = addressRange + dct['addressRange'] = addressRange dct.update(self.kwargs) return dct @@ -11584,31 +13608,45 @@ class ColumnDescriptor(BaseSchema): """ A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to format it, - + and what the column's label should be. - + It is only used if the underlying UI actually supports this level of customization. Note: automatically generated code. Do not edit manually. """ __props__ = { - "attributeName": {"type": "string", "description": "Name of the attribute rendered in this column."}, - "label": {"type": "string", "description": "Header UI label of column."}, + "attributeName": { + "type": "string", + "description": "Name of the attribute rendered in this column." + }, + "label": { + "type": "string", + "description": "Header UI label of column." + }, "format": { "type": "string", - "description": "Format to use for the rendered values in this column. TBD how the format strings looks like.", + "description": "Format to use for the rendered values in this column. TBD how the format strings looks like." }, "type": { "type": "string", - "enum": ["string", "number", "boolean", "unixTimestampUTC"], - "description": "Datatype of values in this column. Defaults to `string` if not specified.", + "enum": [ + "string", + "number", + "boolean", + "unixTimestampUTC" + ], + "description": "Datatype of values in this column. Defaults to `string` if not specified." }, - "width": {"type": "integer", "description": "Width of this column in characters (hint only)."}, + "width": { + "type": "integer", + "description": "Width of this column in characters (hint only)." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, attributeName, label, format=None, type=None, width=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -11625,6 +13663,7 @@ class ColumnDescriptor(BaseSchema): self.width = width self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) attributeName = self.attributeName label = self.label @@ -11632,15 +13671,15 @@ class ColumnDescriptor(BaseSchema): type = self.type # noqa (assign to builtin) width = self.width dct = { - "attributeName": attributeName, - "label": label, + 'attributeName': attributeName, + 'label': label, } if format is not None: - dct["format"] = format + dct['format'] = format if type is not None: - dct["type"] = type + dct['type'] = type if width is not None: - dct["width"] = width + dct['width'] = width dct.update(self.kwargs) return dct @@ -11654,12 +13693,18 @@ class Thread(BaseSchema): """ __props__ = { - "id": {"type": "integer", "description": "Unique identifier for the thread."}, - "name": {"type": "string", "description": "The name of the thread."}, + "id": { + "type": "integer", + "description": "Unique identifier for the thread." + }, + "name": { + "type": "string", + "description": "The name of the thread." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, id, name, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -11671,11 +13716,12 @@ class Thread(BaseSchema): if update_ids_from_dap: self.id = self._translate_id_from_dap(self.id) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "id" in dct: - dct["id"] = cls._translate_id_from_dap(dct["id"]) + if 'id' in dct: + dct['id'] = cls._translate_id_from_dap(dct['id']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -11685,16 +13731,16 @@ class Thread(BaseSchema): if id is not None: id = self._translate_id_to_dap(id) # noqa (assign to builtin) dct = { - "id": id, - "name": name, + 'id': id, + 'name': name, } dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "id" in dct: - dct["id"] = cls._translate_id_to_dap(dct["id"]) + if 'id' in dct: + dct['id'] = cls._translate_id_to_dap(dct['id']) return dct @@ -11702,7 +13748,7 @@ class Thread(BaseSchema): class Source(BaseSchema): """ A `Source` is a descriptor for source code. - + It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints. @@ -11712,57 +13758,61 @@ class Source(BaseSchema): __props__ = { "name": { "type": "string", - "description": "The short name of the source. Every source returned from the debug adapter has a name.\nWhen sending a source to the debug adapter this name is optional.", + "description": "The short name of the source. Every source returned from the debug adapter has a name.\nWhen sending a source to the debug adapter this name is optional." }, "path": { "type": "string", - "description": "The path of the source to be shown in the UI.\nIt is only used to locate and load the content of the source if no `sourceReference` is specified (or its value is 0).", + "description": "The path of the source to be shown in the UI.\nIt is only used to locate and load the content of the source if no `sourceReference` is specified (or its value is 0)." }, "sourceReference": { "type": "integer", - "description": "If the value > 0 the contents of the source must be retrieved through the `source` request (even if a path is specified).\nSince a `sourceReference` is only valid for a session, it can not be used to persist a source.\nThe value should be less than or equal to 2147483647 (2^31-1).", + "description": "If the value > 0 the contents of the source must be retrieved through the `source` request (even if a path is specified).\nSince a `sourceReference` is only valid for a session, it can not be used to persist a source.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "presentationHint": { "type": "string", "description": "A hint for how to present the source in the UI.\nA value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping.", - "enum": ["normal", "emphasize", "deemphasize"], + "enum": [ + "normal", + "emphasize", + "deemphasize" + ] }, "origin": { "type": "string", - "description": "The origin of this source. For example, 'internal module', 'inlined content from source map', etc.", + "description": "The origin of this source. For example, 'internal module', 'inlined content from source map', etc." }, "sources": { "type": "array", - "items": {"$ref": "#/definitions/Source"}, - "description": "A list of sources that are related to this source. These may be the source that generated this source.", + "items": { + "$ref": "#/definitions/Source" + }, + "description": "A list of sources that are related to this source. These may be the source that generated this source." }, "adapterData": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Additional data that a debug adapter might want to loop through the client.\nThe client should leave the data intact and persist it across sessions. The client should not interpret the data.", + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Additional data that a debug adapter might want to loop through the client.\nThe client should leave the data intact and persist it across sessions. The client should not interpret the data." }, "checksums": { "type": "array", - "items": {"$ref": "#/definitions/Checksum"}, - "description": "The checksums associated with this file.", - }, + "items": { + "$ref": "#/definitions/Checksum" + }, + "description": "The checksums associated with this file." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - name=None, - path=None, - sourceReference=None, - presentationHint=None, - origin=None, - sources=None, - adapterData=None, - checksums=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, name=None, path=None, sourceReference=None, presentationHint=None, origin=None, sources=None, adapterData=None, checksums=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string name: The short name of the source. Every source returned from the debug adapter has a name. When sending a source to the debug adapter this name is optional. @@ -11795,6 +13845,7 @@ class Source(BaseSchema): Checksum.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) name = self.name path = self.path @@ -11808,23 +13859,24 @@ class Source(BaseSchema): checksums = self.checksums if checksums and hasattr(checksums[0], "to_dict"): checksums = [x.to_dict() for x in checksums] - dct = {} + dct = { + } if name is not None: - dct["name"] = name + dct['name'] = name if path is not None: - dct["path"] = path + dct['path'] = path if sourceReference is not None: - dct["sourceReference"] = sourceReference + dct['sourceReference'] = sourceReference if presentationHint is not None: - dct["presentationHint"] = presentationHint + dct['presentationHint'] = presentationHint if origin is not None: - dct["origin"] = origin + dct['origin'] = origin if sources is not None: - dct["sources"] = [Source.update_dict_ids_to_dap(o) for o in sources] if (update_ids_to_dap and sources) else sources + dct['sources'] = [Source.update_dict_ids_to_dap(o) for o in sources] if (update_ids_to_dap and sources) else sources if adapterData is not None: - dct["adapterData"] = adapterData + dct['adapterData'] = adapterData if checksums is not None: - dct["checksums"] = [Checksum.update_dict_ids_to_dap(o) for o in checksums] if (update_ids_to_dap and checksums) else checksums + dct['checksums'] = [Checksum.update_dict_ids_to_dap(o) for o in checksums] if (update_ids_to_dap and checksums) else checksums dct.update(self.kwargs) return dct @@ -11840,58 +13892,62 @@ class StackFrame(BaseSchema): __props__ = { "id": { "type": "integer", - "description": "An identifier for the stack frame. It must be unique across all threads.\nThis id can be used to retrieve the scopes of the frame with the `scopes` request or to restart the execution of a stack frame.", + "description": "An identifier for the stack frame. It must be unique across all threads.\nThis id can be used to retrieve the scopes of the frame with the `scopes` request or to restart the execution of a stack frame." + }, + "name": { + "type": "string", + "description": "The name of the stack frame, typically a method name." + }, + "source": { + "description": "The source of the frame.", + "type": "Source" }, - "name": {"type": "string", "description": "The name of the stack frame, typically a method name."}, - "source": {"description": "The source of the frame.", "type": "Source"}, "line": { "type": "integer", - "description": "The line within the source of the frame. If the source attribute is missing or doesn't exist, `line` is 0 and should be ignored by the client.", + "description": "The line within the source of the frame. If the source attribute is missing or doesn't exist, `line` is 0 and should be ignored by the client." }, "column": { "type": "integer", - "description": "Start position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If attribute `source` is missing or doesn't exist, `column` is 0 and should be ignored by the client.", + "description": "Start position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If attribute `source` is missing or doesn't exist, `column` is 0 and should be ignored by the client." + }, + "endLine": { + "type": "integer", + "description": "The end line of the range covered by the stack frame." }, - "endLine": {"type": "integer", "description": "The end line of the range covered by the stack frame."}, "endColumn": { "type": "integer", - "description": "End position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + "description": "End position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." }, "canRestart": { "type": "boolean", - "description": "Indicates whether this frame can be restarted with the `restart` request. Clients should only use this if the debug adapter supports the `restart` request and the corresponding capability `supportsRestartRequest` is True. If a debug adapter has this capability, then `canRestart` defaults to `True` if the property is absent.", + "description": "Indicates whether this frame can be restarted with the `restart` request. Clients should only use this if the debug adapter supports the `restart` request and the corresponding capability `supportsRestartRequest` is True. If a debug adapter has this capability, then `canRestart` defaults to `True` if the property is absent." }, "instructionPointerReference": { "type": "string", - "description": "A memory reference for the current instruction pointer in this frame.", + "description": "A memory reference for the current instruction pointer in this frame." + }, + "moduleId": { + "type": [ + "integer", + "string" + ], + "description": "The module associated with this frame, if any." }, - "moduleId": {"type": ["integer", "string"], "description": "The module associated with this frame, if any."}, "presentationHint": { "type": "string", - "enum": ["normal", "label", "subtle"], - "description": "A hint for how to present this frame in the UI.\nA value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way.", - }, + "enum": [ + "normal", + "label", + "subtle" + ], + "description": "A hint for how to present this frame in the UI.\nA value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way." + } } - __refs__ = set(["source"]) + __refs__ = set(['source']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - id, - name, - line, - column, - source=None, - endLine=None, - endColumn=None, - canRestart=None, - instructionPointerReference=None, - moduleId=None, - presentationHint=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, id, name, line, column, source=None, endLine=None, endColumn=None, canRestart=None, instructionPointerReference=None, moduleId=None, presentationHint=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param integer id: An identifier for the stack frame. It must be unique across all threads. This id can be used to retrieve the scopes of the frame with the `scopes` request or to restart the execution of a stack frame. @@ -11914,7 +13970,7 @@ class StackFrame(BaseSchema): if source is None: self.source = Source() else: - self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source self.endLine = endLine self.endColumn = endColumn self.canRestart = canRestart @@ -11924,11 +13980,12 @@ class StackFrame(BaseSchema): if update_ids_from_dap: self.id = self._translate_id_from_dap(self.id) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "id" in dct: - dct["id"] = cls._translate_id_from_dap(dct["id"]) + if 'id' in dct: + dct['id'] = cls._translate_id_from_dap(dct['id']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -11947,32 +14004,32 @@ class StackFrame(BaseSchema): if id is not None: id = self._translate_id_to_dap(id) # noqa (assign to builtin) dct = { - "id": id, - "name": name, - "line": line, - "column": column, + 'id': id, + 'name': name, + 'line': line, + 'column': column, } if source is not None: - dct["source"] = source.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['source'] = source.to_dict(update_ids_to_dap=update_ids_to_dap) if endLine is not None: - dct["endLine"] = endLine + dct['endLine'] = endLine if endColumn is not None: - dct["endColumn"] = endColumn + dct['endColumn'] = endColumn if canRestart is not None: - dct["canRestart"] = canRestart + dct['canRestart'] = canRestart if instructionPointerReference is not None: - dct["instructionPointerReference"] = instructionPointerReference + dct['instructionPointerReference'] = instructionPointerReference if moduleId is not None: - dct["moduleId"] = moduleId + dct['moduleId'] = moduleId if presentationHint is not None: - dct["presentationHint"] = presentationHint + dct['presentationHint'] = presentationHint dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "id" in dct: - dct["id"] = cls._translate_id_to_dap(dct["id"]) + if 'id' in dct: + dct['id'] = cls._translate_id_to_dap(dct['id']) return dct @@ -11988,66 +14045,64 @@ class Scope(BaseSchema): __props__ = { "name": { "type": "string", - "description": "Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated.", + "description": "Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated." }, "presentationHint": { "type": "string", "description": "A hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI.", - "_enum": ["arguments", "locals", "registers"], + "_enum": [ + "arguments", + "locals", + "registers" + ], "enumDescriptions": [ "Scope contains method arguments.", "Scope contains local variables.", - "Scope contains registers. Only a single `registers` scope should be returned from a `scopes` request.", - ], + "Scope contains registers. Only a single `registers` scope should be returned from a `scopes` request." + ] }, "variablesReference": { "type": "integer", - "description": "The variables of this scope can be retrieved by passing the value of `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + "description": "The variables of this scope can be retrieved by passing the value of `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." }, "namedVariables": { "type": "integer", - "description": "The number of named variables in this scope.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.", + "description": "The number of named variables in this scope.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks." }, "indexedVariables": { "type": "integer", - "description": "The number of indexed variables in this scope.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.", + "description": "The number of indexed variables in this scope.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks." }, "expensive": { "type": "boolean", - "description": "If True, the number of variables in this scope is large or expensive to retrieve.", + "description": "If True, the number of variables in this scope is large or expensive to retrieve." + }, + "source": { + "description": "The source for this scope.", + "type": "Source" + }, + "line": { + "type": "integer", + "description": "The start line of the range covered by this scope." }, - "source": {"description": "The source for this scope.", "type": "Source"}, - "line": {"type": "integer", "description": "The start line of the range covered by this scope."}, "column": { "type": "integer", - "description": "Start position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + "description": "Start position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "endLine": { + "type": "integer", + "description": "The end line of the range covered by this scope." }, - "endLine": {"type": "integer", "description": "The end line of the range covered by this scope."}, "endColumn": { "type": "integer", - "description": "End position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", - }, + "description": "End position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + } } - __refs__ = set(["source"]) + __refs__ = set(['source']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - name, - variablesReference, - expensive, - presentationHint=None, - namedVariables=None, - indexedVariables=None, - source=None, - line=None, - column=None, - endLine=None, - endColumn=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, name, variablesReference, expensive, presentationHint=None, namedVariables=None, indexedVariables=None, source=None, line=None, column=None, endLine=None, endColumn=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string name: Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated. :param integer variablesReference: The variables of this scope can be retrieved by passing the value of `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. @@ -12072,7 +14127,7 @@ class Scope(BaseSchema): if source is None: self.source = Source() else: - self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source self.line = line self.column = column self.endLine = endLine @@ -12080,11 +14135,12 @@ class Scope(BaseSchema): if update_ids_from_dap: self.variablesReference = self._translate_id_from_dap(self.variablesReference) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "variablesReference" in dct: - dct["variablesReference"] = cls._translate_id_from_dap(dct["variablesReference"]) + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_from_dap(dct['variablesReference']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -12103,33 +14159,33 @@ class Scope(BaseSchema): if variablesReference is not None: variablesReference = self._translate_id_to_dap(variablesReference) dct = { - "name": name, - "variablesReference": variablesReference, - "expensive": expensive, + 'name': name, + 'variablesReference': variablesReference, + 'expensive': expensive, } if presentationHint is not None: - dct["presentationHint"] = presentationHint + dct['presentationHint'] = presentationHint if namedVariables is not None: - dct["namedVariables"] = namedVariables + dct['namedVariables'] = namedVariables if indexedVariables is not None: - dct["indexedVariables"] = indexedVariables + dct['indexedVariables'] = indexedVariables if source is not None: - dct["source"] = source.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['source'] = source.to_dict(update_ids_to_dap=update_ids_to_dap) if line is not None: - dct["line"] = line + dct['line'] = line if column is not None: - dct["column"] = column + dct['column'] = column if endLine is not None: - dct["endLine"] = endLine + dct['endLine'] = endLine if endColumn is not None: - dct["endColumn"] = endColumn + dct['endColumn'] = endColumn dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "variablesReference" in dct: - dct["variablesReference"] = cls._translate_id_to_dap(dct["variablesReference"]) + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_to_dap(dct['variablesReference']) return dct @@ -12137,76 +14193,66 @@ class Scope(BaseSchema): class Variable(BaseSchema): """ A Variable is a name/value pair. - + The `type` attribute is shown if space permits or when hovering over the variable's name. - + The `kind` attribute is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private. - + If the value is structured (has children), a handle is provided to retrieve the children with the `variables` request. - + If the number of named or indexed children is large, the numbers should be returned via the `namedVariables` and `indexedVariables` attributes. - + The client can use this information to present the children in a paged UI and fetch them in chunks. Note: automatically generated code. Do not edit manually. """ __props__ = { - "name": {"type": "string", "description": "The variable's name."}, + "name": { + "type": "string", + "description": "The variable's name." + }, "value": { "type": "string", - "description": "The variable's value.\nThis can be a multi-line text, e.g. for a function the body of a function.\nFor structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object. This helps to identify the structured object in the collapsed state when its children are not yet visible.\nAn empty string can be used if no value should be shown in the UI.", + "description": "The variable's value.\nThis can be a multi-line text, e.g. for a function the body of a function.\nFor structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object. This helps to identify the structured object in the collapsed state when its children are not yet visible.\nAn empty string can be used if no value should be shown in the UI." }, "type": { "type": "string", - "description": "The type of the variable's value. Typically shown in the UI when hovering over the value.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is True.", + "description": "The type of the variable's value. Typically shown in the UI when hovering over the value.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is True." }, "presentationHint": { "description": "Properties of a variable that can be used to determine how to render the variable in the UI.", - "type": "VariablePresentationHint", + "type": "VariablePresentationHint" }, "evaluateName": { "type": "string", - "description": "The evaluatable name of this variable which can be passed to the `evaluate` request to fetch the variable's value.", + "description": "The evaluatable name of this variable which can be passed to the `evaluate` request to fetch the variable's value." }, "variablesReference": { "type": "integer", - "description": "If `variablesReference` is > 0, the variable is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + "description": "If `variablesReference` is > 0, the variable is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." }, "namedVariables": { "type": "integer", - "description": "The number of named child variables.\nThe client can use this information to present the children in a paged UI and fetch them in chunks.", + "description": "The number of named child variables.\nThe client can use this information to present the children in a paged UI and fetch them in chunks." }, "indexedVariables": { "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this information to present the children in a paged UI and fetch them in chunks.", + "description": "The number of indexed child variables.\nThe client can use this information to present the children in a paged UI and fetch them in chunks." }, "memoryReference": { "type": "string", - "description": "A memory reference associated with this variable.\nFor pointer type variables, this is generally a reference to the memory address contained in the pointer.\nFor executable data, this reference may later be used in a `disassemble` request.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True.", - }, + "description": "A memory reference associated with this variable.\nFor pointer type variables, this is generally a reference to the memory address contained in the pointer.\nFor executable data, this reference may later be used in a `disassemble` request.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True." + } } - __refs__ = set(["presentationHint"]) + __refs__ = set(['presentationHint']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - name, - value, - variablesReference, - type=None, - presentationHint=None, - evaluateName=None, - namedVariables=None, - indexedVariables=None, - memoryReference=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, name, value, variablesReference, type=None, presentationHint=None, evaluateName=None, namedVariables=None, indexedVariables=None, memoryReference=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string name: The variable's name. :param string value: The variable's value. @@ -12234,11 +14280,7 @@ class Variable(BaseSchema): if presentationHint is None: self.presentationHint = VariablePresentationHint() else: - self.presentationHint = ( - VariablePresentationHint(update_ids_from_dap=update_ids_from_dap, **presentationHint) - if presentationHint.__class__ != VariablePresentationHint - else presentationHint - ) + self.presentationHint = VariablePresentationHint(update_ids_from_dap=update_ids_from_dap, **presentationHint) if presentationHint.__class__ != VariablePresentationHint else presentationHint self.evaluateName = evaluateName self.namedVariables = namedVariables self.indexedVariables = indexedVariables @@ -12246,11 +14288,12 @@ class Variable(BaseSchema): if update_ids_from_dap: self.variablesReference = self._translate_id_from_dap(self.variablesReference) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "variablesReference" in dct: - dct["variablesReference"] = cls._translate_id_from_dap(dct["variablesReference"]) + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_from_dap(dct['variablesReference']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -12267,29 +14310,29 @@ class Variable(BaseSchema): if variablesReference is not None: variablesReference = self._translate_id_to_dap(variablesReference) dct = { - "name": name, - "value": value, - "variablesReference": variablesReference, + 'name': name, + 'value': value, + 'variablesReference': variablesReference, } if type is not None: - dct["type"] = type + dct['type'] = type if presentationHint is not None: - dct["presentationHint"] = presentationHint.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['presentationHint'] = presentationHint.to_dict(update_ids_to_dap=update_ids_to_dap) if evaluateName is not None: - dct["evaluateName"] = evaluateName + dct['evaluateName'] = evaluateName if namedVariables is not None: - dct["namedVariables"] = namedVariables + dct['namedVariables'] = namedVariables if indexedVariables is not None: - dct["indexedVariables"] = indexedVariables + dct['indexedVariables'] = indexedVariables if memoryReference is not None: - dct["memoryReference"] = memoryReference + dct['memoryReference'] = memoryReference dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "variablesReference" in dct: - dct["variablesReference"] = cls._translate_id_to_dap(dct["variablesReference"]) + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_to_dap(dct['variablesReference']) return dct @@ -12316,7 +14359,7 @@ class VariablePresentationHint(BaseSchema): "interface", "mostDerivedClass", "virtual", - "dataBreakpoint", + "dataBreakpoint" ], "enumDescriptions": [ "Indicates that the object is a property.", @@ -12329,8 +14372,8 @@ class VariablePresentationHint(BaseSchema): "Indicates that the object is an interface.", "Indicates that the object is the most derived class.", "Indicates that the object is virtual, that means it is a synthetic object introduced by the adapter for rendering purposes, e.g. an index range for large arrays.", - "Deprecated: Indicates that a data breakpoint is registered for the object. The `hasDataBreakpoint` attribute should generally be used instead.", - ], + "Deprecated: Indicates that a data breakpoint is registered for the object. The `hasDataBreakpoint` attribute should generally be used instead." + ] }, "attributes": { "description": "Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values.", @@ -12345,7 +14388,7 @@ class VariablePresentationHint(BaseSchema): "hasObjectId", "canHaveObjectId", "hasSideEffects", - "hasDataBreakpoint", + "hasDataBreakpoint" ], "enumDescriptions": [ "Indicates that the object is static.", @@ -12355,23 +14398,29 @@ class VariablePresentationHint(BaseSchema): "Indicates that the object can have an Object ID created for it. This is a vestigial attribute that is used by some clients; 'Object ID's are not specified in the protocol.", "Indicates that the object has an Object ID associated with it. This is a vestigial attribute that is used by some clients; 'Object ID's are not specified in the protocol.", "Indicates that the evaluation had side effects.", - "Indicates that the object has its value tracked by a data breakpoint.", - ], - }, + "Indicates that the object has its value tracked by a data breakpoint." + ] + } }, "visibility": { "description": "Visibility of variable. Before introducing additional values, try to use the listed values.", "type": "string", - "_enum": ["public", "private", "protected", "internal", "final"], + "_enum": [ + "public", + "private", + "protected", + "internal", + "final" + ] }, "lazy": { "description": "If True, clients can present the variable with a UI that supports a specific gesture to trigger its evaluation.\nThis mechanism can be used for properties that require executing code when retrieving their value and where the code execution can be expensive and/or produce side-effects. A typical example are properties based on a getter function.\nPlease note that in addition to the `lazy` flag, the variable's `variablesReference` is expected to refer to a variable that will provide the value through another `variable` request.", - "type": "boolean", - }, + "type": "boolean" + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, kind=None, attributes=None, visibility=None, lazy=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -12388,6 +14437,7 @@ class VariablePresentationHint(BaseSchema): self.lazy = lazy self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) kind = self.kind attributes = self.attributes @@ -12395,15 +14445,16 @@ class VariablePresentationHint(BaseSchema): attributes = [x.to_dict() for x in attributes] visibility = self.visibility lazy = self.lazy - dct = {} + dct = { + } if kind is not None: - dct["kind"] = kind + dct['kind'] = kind if attributes is not None: - dct["attributes"] = attributes + dct['attributes'] = attributes if visibility is not None: - dct["visibility"] = visibility + dct['visibility'] = visibility if lazy is not None: - dct["lazy"] = lazy + dct['lazy'] = lazy dct.update(self.kwargs) return dct @@ -12417,20 +14468,26 @@ class BreakpointLocation(BaseSchema): """ __props__ = { - "line": {"type": "integer", "description": "Start line of breakpoint location."}, + "line": { + "type": "integer", + "description": "Start line of breakpoint location." + }, "column": { "type": "integer", - "description": "The start position of a breakpoint location. Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + "description": "The start position of a breakpoint location. Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "endLine": { + "type": "integer", + "description": "The end line of breakpoint location if the location covers a range." }, - "endLine": {"type": "integer", "description": "The end line of breakpoint location if the location covers a range."}, "endColumn": { "type": "integer", - "description": "The end position of a breakpoint location (if the location covers a range). Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", - }, + "description": "The end position of a breakpoint location (if the location covers a range). Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, line, column=None, endLine=None, endColumn=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -12445,20 +14502,21 @@ class BreakpointLocation(BaseSchema): self.endColumn = endColumn self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) line = self.line column = self.column endLine = self.endLine endColumn = self.endColumn dct = { - "line": line, + 'line': line, } if column is not None: - dct["column"] = column + dct['column'] = column if endLine is not None: - dct["endLine"] = endLine + dct['endLine'] = endLine if endColumn is not None: - dct["endColumn"] = endColumn + dct['endColumn'] = endColumn dct.update(self.kwargs) return dct @@ -12472,27 +14530,30 @@ class SourceBreakpoint(BaseSchema): """ __props__ = { - "line": {"type": "integer", "description": "The source line of the breakpoint or logpoint."}, + "line": { + "type": "integer", + "description": "The source line of the breakpoint or logpoint." + }, "column": { "type": "integer", - "description": "Start position within source line of the breakpoint or logpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + "description": "Start position within source line of the breakpoint or logpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." }, "condition": { "type": "string", - "description": "The expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is True.", + "description": "The expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is True." }, "hitCondition": { "type": "string", - "description": "The expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is True.\nIf both this property and `condition` are specified, `hitCondition` should be evaluated only if the `condition` is met, and the debug adapter should stop only if both conditions are met.", + "description": "The expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is True.\nIf both this property and `condition` are specified, `hitCondition` should be evaluated only if the `condition` is met, and the debug adapter should stop only if both conditions are met." }, "logMessage": { "type": "string", - "description": "If this attribute exists and is non-empty, the debug adapter must not 'break' (stop)\nbut log the message instead. Expressions within `{}` are interpolated.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsLogPoints` is True.\nIf either `hitCondition` or `condition` is specified, then the message should only be logged if those conditions are met.", - }, + "description": "If this attribute exists and is non-empty, the debug adapter must not 'break' (stop)\nbut log the message instead. Expressions within `{}` are interpolated.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsLogPoints` is True.\nIf either `hitCondition` or `condition` is specified, then the message should only be logged if those conditions are met." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, line, column=None, condition=None, hitCondition=None, logMessage=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -12516,6 +14577,7 @@ class SourceBreakpoint(BaseSchema): self.logMessage = logMessage self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) line = self.line column = self.column @@ -12523,16 +14585,16 @@ class SourceBreakpoint(BaseSchema): hitCondition = self.hitCondition logMessage = self.logMessage dct = { - "line": line, + 'line': line, } if column is not None: - dct["column"] = column + dct['column'] = column if condition is not None: - dct["condition"] = condition + dct['condition'] = condition if hitCondition is not None: - dct["hitCondition"] = hitCondition + dct['hitCondition'] = hitCondition if logMessage is not None: - dct["logMessage"] = logMessage + dct['logMessage'] = logMessage dct.update(self.kwargs) return dct @@ -12546,19 +14608,22 @@ class FunctionBreakpoint(BaseSchema): """ __props__ = { - "name": {"type": "string", "description": "The name of the function."}, + "name": { + "type": "string", + "description": "The name of the function." + }, "condition": { "type": "string", - "description": "An expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is True.", + "description": "An expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is True." }, "hitCondition": { "type": "string", - "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is True.", - }, + "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is True." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, name, condition=None, hitCondition=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -12574,17 +14639,18 @@ class FunctionBreakpoint(BaseSchema): self.hitCondition = hitCondition self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) name = self.name condition = self.condition hitCondition = self.hitCondition dct = { - "name": name, + 'name': name, } if condition is not None: - dct["condition"] = condition + dct['condition'] = condition if hitCondition is not None: - dct["hitCondition"] = hitCondition + dct['hitCondition'] = hitCondition dct.update(self.kwargs) return dct @@ -12597,24 +14663,28 @@ class DataBreakpointAccessType(BaseSchema): Note: automatically generated code. Do not edit manually. """ - READ = "read" - WRITE = "write" - READWRITE = "readWrite" + READ = 'read' + WRITE = 'write' + READWRITE = 'readWrite' - VALID_VALUES = set(["read", "write", "readWrite"]) + VALID_VALUES = set(['read', 'write', 'readWrite']) __props__ = {} __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) - """ """ - + """ + + """ + self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) - dct = {} + dct = { + } dct.update(self.kwargs) return dct @@ -12630,18 +14700,24 @@ class DataBreakpoint(BaseSchema): __props__ = { "dataId": { "type": "string", - "description": "An id representing the data. This id is returned from the `dataBreakpointInfo` request.", + "description": "An id representing the data. This id is returned from the `dataBreakpointInfo` request." + }, + "accessType": { + "description": "The access type of the data.", + "type": "DataBreakpointAccessType" + }, + "condition": { + "type": "string", + "description": "An expression for conditional breakpoints." }, - "accessType": {"description": "The access type of the data.", "type": "DataBreakpointAccessType"}, - "condition": {"type": "string", "description": "An expression for conditional breakpoints."}, "hitCondition": { "type": "string", - "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.", - }, + "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed." + } } - __refs__ = set(["accessType"]) + __refs__ = set(['accessType']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, dataId, accessType=None, condition=None, hitCondition=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -12659,20 +14735,21 @@ class DataBreakpoint(BaseSchema): self.hitCondition = hitCondition self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) dataId = self.dataId accessType = self.accessType condition = self.condition hitCondition = self.hitCondition dct = { - "dataId": dataId, + 'dataId': dataId, } if accessType is not None: - dct["accessType"] = accessType + dct['accessType'] = accessType if condition is not None: - dct["condition"] = condition + dct['condition'] = condition if hitCondition is not None: - dct["hitCondition"] = hitCondition + dct['hitCondition'] = hitCondition dct.update(self.kwargs) return dct @@ -12688,21 +14765,24 @@ class InstructionBreakpoint(BaseSchema): __props__ = { "instructionReference": { "type": "string", - "description": "The instruction reference of the breakpoint.\nThis should be a memory or instruction pointer reference from an `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`.", + "description": "The instruction reference of the breakpoint.\nThis should be a memory or instruction pointer reference from an `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`." + }, + "offset": { + "type": "integer", + "description": "The offset from the instruction reference in bytes.\nThis can be negative." }, - "offset": {"type": "integer", "description": "The offset from the instruction reference in bytes.\nThis can be negative."}, "condition": { "type": "string", - "description": "An expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is True.", + "description": "An expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is True." }, "hitCondition": { "type": "string", - "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is True.", - }, + "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is True." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, instructionReference, offset=None, condition=None, hitCondition=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -12722,20 +14802,21 @@ class InstructionBreakpoint(BaseSchema): self.hitCondition = hitCondition self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) instructionReference = self.instructionReference offset = self.offset condition = self.condition hitCondition = self.hitCondition dct = { - "instructionReference": instructionReference, + 'instructionReference': instructionReference, } if offset is not None: - dct["offset"] = offset + dct['offset'] = offset if condition is not None: - dct["condition"] = condition + dct['condition'] = condition if hitCondition is not None: - dct["hitCondition"] = hitCondition + dct['hitCondition'] = hitCondition dct.update(self.kwargs) return dct @@ -12752,55 +14833,58 @@ class Breakpoint(BaseSchema): __props__ = { "id": { "type": "integer", - "description": "The identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints.", + "description": "The identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints." }, "verified": { "type": "boolean", - "description": "If True, the breakpoint could be set (but not necessarily at the desired location).", + "description": "If True, the breakpoint could be set (but not necessarily at the desired location)." }, "message": { "type": "string", - "description": "A message about the state of the breakpoint.\nThis is shown to the user and can be used to explain why a breakpoint could not be verified.", + "description": "A message about the state of the breakpoint.\nThis is shown to the user and can be used to explain why a breakpoint could not be verified." + }, + "source": { + "description": "The source where the breakpoint is located.", + "type": "Source" + }, + "line": { + "type": "integer", + "description": "The start line of the actual range covered by the breakpoint." }, - "source": {"description": "The source where the breakpoint is located.", "type": "Source"}, - "line": {"type": "integer", "description": "The start line of the actual range covered by the breakpoint."}, "column": { "type": "integer", - "description": "Start position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + "description": "Start position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "endLine": { + "type": "integer", + "description": "The end line of the actual range covered by the breakpoint." }, - "endLine": {"type": "integer", "description": "The end line of the actual range covered by the breakpoint."}, "endColumn": { "type": "integer", - "description": "End position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.\nIf no end line is given, then the end column is assumed to be in the start line.", + "description": "End position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.\nIf no end line is given, then the end column is assumed to be in the start line." + }, + "instructionReference": { + "type": "string", + "description": "A memory reference to where the breakpoint is set." + }, + "offset": { + "type": "integer", + "description": "The offset from the instruction reference.\nThis can be negative." }, - "instructionReference": {"type": "string", "description": "A memory reference to where the breakpoint is set."}, - "offset": {"type": "integer", "description": "The offset from the instruction reference.\nThis can be negative."}, "reason": { "type": "string", "description": "A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include:\n\n- `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state.\n - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention.", - "enum": ["pending", "failed"], - }, + "enum": [ + "pending", + "failed" + ] + } } - __refs__ = set(["source"]) + __refs__ = set(['source']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - verified, - id=None, - message=None, - source=None, - line=None, - column=None, - endLine=None, - endColumn=None, - instructionReference=None, - offset=None, - reason=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, verified, id=None, message=None, source=None, line=None, column=None, endLine=None, endColumn=None, instructionReference=None, offset=None, reason=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param boolean verified: If true, the breakpoint could be set (but not necessarily at the desired location). :param integer id: The identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints. @@ -12816,7 +14900,7 @@ class Breakpoint(BaseSchema): :param integer offset: The offset from the instruction reference. This can be negative. :param string reason: A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include: - + - `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state. - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention. """ @@ -12826,7 +14910,7 @@ class Breakpoint(BaseSchema): if source is None: self.source = Source() else: - self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source self.line = line self.column = column self.endLine = endLine @@ -12836,6 +14920,7 @@ class Breakpoint(BaseSchema): self.reason = reason self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) verified = self.verified id = self.id # noqa (assign to builtin) @@ -12849,28 +14934,28 @@ class Breakpoint(BaseSchema): offset = self.offset reason = self.reason dct = { - "verified": verified, + 'verified': verified, } if id is not None: - dct["id"] = id + dct['id'] = id if message is not None: - dct["message"] = message + dct['message'] = message if source is not None: - dct["source"] = source.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['source'] = source.to_dict(update_ids_to_dap=update_ids_to_dap) if line is not None: - dct["line"] = line + dct['line'] = line if column is not None: - dct["column"] = column + dct['column'] = column if endLine is not None: - dct["endLine"] = endLine + dct['endLine'] = endLine if endColumn is not None: - dct["endColumn"] = endColumn + dct['endColumn'] = endColumn if instructionReference is not None: - dct["instructionReference"] = instructionReference + dct['instructionReference'] = instructionReference if offset is not None: - dct["offset"] = offset + dct['offset'] = offset if reason is not None: - dct["reason"] = reason + dct['reason'] = reason dct.update(self.kwargs) return dct @@ -12883,24 +14968,28 @@ class SteppingGranularity(BaseSchema): Note: automatically generated code. Do not edit manually. """ - STATEMENT = "statement" - LINE = "line" - INSTRUCTION = "instruction" + STATEMENT = 'statement' + LINE = 'line' + INSTRUCTION = 'instruction' - VALID_VALUES = set(["statement", "line", "instruction"]) + VALID_VALUES = set(['statement', 'line', 'instruction']) __props__ = {} __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) - """ """ - + """ + + """ + self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) - dct = {} + dct = { + } dct.update(self.kwargs) return dct @@ -12915,22 +15004,34 @@ class StepInTarget(BaseSchema): """ __props__ = { - "id": {"type": "integer", "description": "Unique identifier for a step-in target."}, - "label": {"type": "string", "description": "The name of the step-in target (shown in the UI)."}, - "line": {"type": "integer", "description": "The line of the step-in target."}, + "id": { + "type": "integer", + "description": "Unique identifier for a step-in target." + }, + "label": { + "type": "string", + "description": "The name of the step-in target (shown in the UI)." + }, + "line": { + "type": "integer", + "description": "The line of the step-in target." + }, "column": { "type": "integer", - "description": "Start position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + "description": "Start position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "endLine": { + "type": "integer", + "description": "The end line of the range covered by the step-in target." }, - "endLine": {"type": "integer", "description": "The end line of the range covered by the step-in target."}, "endColumn": { "type": "integer", - "description": "End position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", - }, + "description": "End position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, id, label, line=None, column=None, endLine=None, endColumn=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -12949,6 +15050,7 @@ class StepInTarget(BaseSchema): self.endColumn = endColumn self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) id = self.id # noqa (assign to builtin) label = self.label @@ -12957,17 +15059,17 @@ class StepInTarget(BaseSchema): endLine = self.endLine endColumn = self.endColumn dct = { - "id": id, - "label": label, + 'id': id, + 'label': label, } if line is not None: - dct["line"] = line + dct['line'] = line if column is not None: - dct["column"] = column + dct['column'] = column if endLine is not None: - dct["endLine"] = endLine + dct['endLine'] = endLine if endColumn is not None: - dct["endColumn"] = endColumn + dct['endColumn'] = endColumn dct.update(self.kwargs) return dct @@ -12976,40 +15078,47 @@ class StepInTarget(BaseSchema): class GotoTarget(BaseSchema): """ A `GotoTarget` describes a code location that can be used as a target in the `goto` request. - + The possible goto targets can be determined via the `gotoTargets` request. Note: automatically generated code. Do not edit manually. """ __props__ = { - "id": {"type": "integer", "description": "Unique identifier for a goto target. This is used in the `goto` request."}, - "label": {"type": "string", "description": "The name of the goto target (shown in the UI)."}, - "line": {"type": "integer", "description": "The line of the goto target."}, - "column": {"type": "integer", "description": "The column of the goto target."}, - "endLine": {"type": "integer", "description": "The end line of the range covered by the goto target."}, - "endColumn": {"type": "integer", "description": "The end column of the range covered by the goto target."}, + "id": { + "type": "integer", + "description": "Unique identifier for a goto target. This is used in the `goto` request." + }, + "label": { + "type": "string", + "description": "The name of the goto target (shown in the UI)." + }, + "line": { + "type": "integer", + "description": "The line of the goto target." + }, + "column": { + "type": "integer", + "description": "The column of the goto target." + }, + "endLine": { + "type": "integer", + "description": "The end line of the range covered by the goto target." + }, + "endColumn": { + "type": "integer", + "description": "The end column of the range covered by the goto target." + }, "instructionPointerReference": { "type": "string", - "description": "A memory reference for the instruction pointer value represented by this target.", - }, + "description": "A memory reference for the instruction pointer value represented by this target." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - id, - label, - line, - column=None, - endLine=None, - endColumn=None, - instructionPointerReference=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, id, label, line, column=None, endLine=None, endColumn=None, instructionPointerReference=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param integer id: Unique identifier for a goto target. This is used in the `goto` request. :param string label: The name of the goto target (shown in the UI). @@ -13028,6 +15137,7 @@ class GotoTarget(BaseSchema): self.instructionPointerReference = instructionPointerReference self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) id = self.id # noqa (assign to builtin) label = self.label @@ -13037,18 +15147,18 @@ class GotoTarget(BaseSchema): endColumn = self.endColumn instructionPointerReference = self.instructionPointerReference dct = { - "id": id, - "label": label, - "line": line, + 'id': id, + 'label': label, + 'line': line, } if column is not None: - dct["column"] = column + dct['column'] = column if endLine is not None: - dct["endLine"] = endLine + dct['endLine'] = endLine if endColumn is not None: - dct["endColumn"] = endColumn + dct['endColumn'] = endColumn if instructionPointerReference is not None: - dct["instructionPointerReference"] = instructionPointerReference + dct['instructionPointerReference'] = instructionPointerReference dct.update(self.kwargs) return dct @@ -13064,56 +15174,46 @@ class CompletionItem(BaseSchema): __props__ = { "label": { "type": "string", - "description": "The label of this completion item. By default this is also the text that is inserted when selecting this completion.", + "description": "The label of this completion item. By default this is also the text that is inserted when selecting this completion." + }, + "text": { + "type": "string", + "description": "If text is returned and not an empty string, then it is inserted instead of the label." }, - "text": {"type": "string", "description": "If text is returned and not an empty string, then it is inserted instead of the label."}, "sortText": { "type": "string", - "description": "A string that should be used when comparing this item with other items. If not returned or an empty string, the `label` is used instead.", + "description": "A string that should be used when comparing this item with other items. If not returned or an empty string, the `label` is used instead." }, "detail": { "type": "string", - "description": "A human-readable string with additional information about this item, like type or symbol information.", + "description": "A human-readable string with additional information about this item, like type or symbol information." }, "type": { "description": "The item's type. Typically the client uses this information to render the item in the UI with an icon.", - "type": "CompletionItemType", + "type": "CompletionItemType" }, "start": { "type": "integer", - "description": "Start position (within the `text` attribute of the `completions` request) where the completion text is added. The position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If the start position is omitted the text is added at the location specified by the `column` attribute of the `completions` request.", + "description": "Start position (within the `text` attribute of the `completions` request) where the completion text is added. The position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If the start position is omitted the text is added at the location specified by the `column` attribute of the `completions` request." }, "length": { "type": "integer", - "description": "Length determines how many characters are overwritten by the completion text and it is measured in UTF-16 code units. If missing the value 0 is assumed which results in the completion text being inserted.", + "description": "Length determines how many characters are overwritten by the completion text and it is measured in UTF-16 code units. If missing the value 0 is assumed which results in the completion text being inserted." }, "selectionStart": { "type": "integer", - "description": "Determines the start of the new selection after the text has been inserted (or replaced). `selectionStart` is measured in UTF-16 code units and must be in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text.", + "description": "Determines the start of the new selection after the text has been inserted (or replaced). `selectionStart` is measured in UTF-16 code units and must be in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text." }, "selectionLength": { "type": "integer", - "description": "Determines the length of the new selection after the text has been inserted (or replaced) and it is measured in UTF-16 code units. The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0.", - }, + "description": "Determines the length of the new selection after the text has been inserted (or replaced) and it is measured in UTF-16 code units. The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0." + } } - __refs__ = set(["type"]) + __refs__ = set(['type']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - label, - text=None, - sortText=None, - detail=None, - type=None, - start=None, - length=None, - selectionStart=None, - selectionLength=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, label, text=None, sortText=None, detail=None, type=None, start=None, length=None, selectionStart=None, selectionLength=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string label: The label of this completion item. By default this is also the text that is inserted when selecting this completion. :param string text: If text is returned and not an empty string, then it is inserted instead of the label. @@ -13138,6 +15238,7 @@ class CompletionItem(BaseSchema): self.selectionLength = selectionLength self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) label = self.label text = self.text @@ -13149,24 +15250,24 @@ class CompletionItem(BaseSchema): selectionStart = self.selectionStart selectionLength = self.selectionLength dct = { - "label": label, + 'label': label, } if text is not None: - dct["text"] = text + dct['text'] = text if sortText is not None: - dct["sortText"] = sortText + dct['sortText'] = sortText if detail is not None: - dct["detail"] = detail + dct['detail'] = detail if type is not None: - dct["type"] = type + dct['type'] = type if start is not None: - dct["start"] = start + dct['start'] = start if length is not None: - dct["length"] = length + dct['length'] = length if selectionStart is not None: - dct["selectionStart"] = selectionStart + dct['selectionStart'] = selectionStart if selectionLength is not None: - dct["selectionLength"] = selectionLength + dct['selectionLength'] = selectionLength dct.update(self.kwargs) return dct @@ -13180,62 +15281,44 @@ class CompletionItemType(BaseSchema): Note: automatically generated code. Do not edit manually. """ - METHOD = "method" - FUNCTION = "function" - CONSTRUCTOR = "constructor" - FIELD = "field" - VARIABLE = "variable" - CLASS = "class" - INTERFACE = "interface" - MODULE = "module" - PROPERTY = "property" - UNIT = "unit" - VALUE = "value" - ENUM = "enum" - KEYWORD = "keyword" - SNIPPET = "snippet" - TEXT = "text" - COLOR = "color" - FILE = "file" - REFERENCE = "reference" - CUSTOMCOLOR = "customcolor" + METHOD = 'method' + FUNCTION = 'function' + CONSTRUCTOR = 'constructor' + FIELD = 'field' + VARIABLE = 'variable' + CLASS = 'class' + INTERFACE = 'interface' + MODULE = 'module' + PROPERTY = 'property' + UNIT = 'unit' + VALUE = 'value' + ENUM = 'enum' + KEYWORD = 'keyword' + SNIPPET = 'snippet' + TEXT = 'text' + COLOR = 'color' + FILE = 'file' + REFERENCE = 'reference' + CUSTOMCOLOR = 'customcolor' - VALID_VALUES = set( - [ - "method", - "function", - "constructor", - "field", - "variable", - "class", - "interface", - "module", - "property", - "unit", - "value", - "enum", - "keyword", - "snippet", - "text", - "color", - "file", - "reference", - "customcolor", - ] - ) + VALID_VALUES = set(['method', 'function', 'constructor', 'field', 'variable', 'class', 'interface', 'module', 'property', 'unit', 'value', 'enum', 'keyword', 'snippet', 'text', 'color', 'file', 'reference', 'customcolor']) __props__ = {} __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) - """ """ - + """ + + """ + self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) - dct = {} + dct = { + } dct.update(self.kwargs) return dct @@ -13248,25 +15331,29 @@ class ChecksumAlgorithm(BaseSchema): Note: automatically generated code. Do not edit manually. """ - MD5 = "MD5" - SHA1 = "SHA1" - SHA256 = "SHA256" - TIMESTAMP = "timestamp" + MD5 = 'MD5' + SHA1 = 'SHA1' + SHA256 = 'SHA256' + TIMESTAMP = 'timestamp' - VALID_VALUES = set(["MD5", "SHA1", "SHA256", "timestamp"]) + VALID_VALUES = set(['MD5', 'SHA1', 'SHA256', 'timestamp']) __props__ = {} __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) - """ """ - + """ + + """ + self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) - dct = {} + dct = { + } dct.update(self.kwargs) return dct @@ -13280,12 +15367,18 @@ class Checksum(BaseSchema): """ __props__ = { - "algorithm": {"description": "The algorithm used to calculate this checksum.", "type": "ChecksumAlgorithm"}, - "checksum": {"type": "string", "description": "Value of the checksum, encoded as a hexadecimal value."}, + "algorithm": { + "description": "The algorithm used to calculate this checksum.", + "type": "ChecksumAlgorithm" + }, + "checksum": { + "type": "string", + "description": "Value of the checksum, encoded as a hexadecimal value." + } } - __refs__ = set(["algorithm"]) + __refs__ = set(['algorithm']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, algorithm, checksum, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -13298,12 +15391,13 @@ class Checksum(BaseSchema): self.checksum = checksum self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) algorithm = self.algorithm checksum = self.checksum dct = { - "algorithm": algorithm, - "checksum": checksum, + 'algorithm': algorithm, + 'checksum': checksum, } dct.update(self.kwargs) return dct @@ -13317,10 +15411,15 @@ class ValueFormat(BaseSchema): Note: automatically generated code. Do not edit manually. """ - __props__ = {"hex": {"type": "boolean", "description": "Display the value in hex."}} + __props__ = { + "hex": { + "type": "boolean", + "description": "Display the value in hex." + } + } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, hex=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -13329,11 +15428,13 @@ class ValueFormat(BaseSchema): self.hex = hex self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) hex = self.hex # noqa (assign to builtin) - dct = {} + dct = { + } if hex is not None: - dct["hex"] = hex + dct['hex'] = hex dct.update(self.kwargs) return dct @@ -13347,35 +15448,44 @@ class StackFrameFormat(BaseSchema): """ __props__ = { - "hex": {"type": "boolean", "description": "Display the value in hex."}, - "parameters": {"type": "boolean", "description": "Displays parameters for the stack frame."}, - "parameterTypes": {"type": "boolean", "description": "Displays the types of parameters for the stack frame."}, - "parameterNames": {"type": "boolean", "description": "Displays the names of parameters for the stack frame."}, - "parameterValues": {"type": "boolean", "description": "Displays the values of parameters for the stack frame."}, - "line": {"type": "boolean", "description": "Displays the line number of the stack frame."}, - "module": {"type": "boolean", "description": "Displays the module of the stack frame."}, + "hex": { + "type": "boolean", + "description": "Display the value in hex." + }, + "parameters": { + "type": "boolean", + "description": "Displays parameters for the stack frame." + }, + "parameterTypes": { + "type": "boolean", + "description": "Displays the types of parameters for the stack frame." + }, + "parameterNames": { + "type": "boolean", + "description": "Displays the names of parameters for the stack frame." + }, + "parameterValues": { + "type": "boolean", + "description": "Displays the values of parameters for the stack frame." + }, + "line": { + "type": "boolean", + "description": "Displays the line number of the stack frame." + }, + "module": { + "type": "boolean", + "description": "Displays the module of the stack frame." + }, "includeAll": { "type": "boolean", - "description": "Includes all stack frames, including those the debug adapter might otherwise hide.", - }, + "description": "Includes all stack frames, including those the debug adapter might otherwise hide." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - hex=None, - parameters=None, - parameterTypes=None, - parameterNames=None, - parameterValues=None, - line=None, - module=None, - includeAll=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, hex=None, parameters=None, parameterTypes=None, parameterNames=None, parameterValues=None, line=None, module=None, includeAll=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param boolean hex: Display the value in hex. :param boolean parameters: Displays parameters for the stack frame. @@ -13396,6 +15506,7 @@ class StackFrameFormat(BaseSchema): self.includeAll = includeAll self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) hex = self.hex # noqa (assign to builtin) parameters = self.parameters @@ -13405,23 +15516,24 @@ class StackFrameFormat(BaseSchema): line = self.line module = self.module includeAll = self.includeAll - dct = {} + dct = { + } if hex is not None: - dct["hex"] = hex + dct['hex'] = hex if parameters is not None: - dct["parameters"] = parameters + dct['parameters'] = parameters if parameterTypes is not None: - dct["parameterTypes"] = parameterTypes + dct['parameterTypes'] = parameterTypes if parameterNames is not None: - dct["parameterNames"] = parameterNames + dct['parameterNames'] = parameterNames if parameterValues is not None: - dct["parameterValues"] = parameterValues + dct['parameterValues'] = parameterValues if line is not None: - dct["line"] = line + dct['line'] = line if module is not None: - dct["module"] = module + dct['module'] = module if includeAll is not None: - dct["includeAll"] = includeAll + dct['includeAll'] = includeAll dct.update(self.kwargs) return dct @@ -13436,15 +15548,18 @@ class ExceptionFilterOptions(BaseSchema): """ __props__ = { - "filterId": {"type": "string", "description": "ID of an exception filter returned by the `exceptionBreakpointFilters` capability."}, + "filterId": { + "type": "string", + "description": "ID of an exception filter returned by the `exceptionBreakpointFilters` capability." + }, "condition": { "type": "string", - "description": "An expression for conditional exceptions.\nThe exception breaks into the debugger if the result of the condition is True.", - }, + "description": "An expression for conditional exceptions.\nThe exception breaks into the debugger if the result of the condition is True." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, filterId, condition=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -13456,14 +15571,15 @@ class ExceptionFilterOptions(BaseSchema): self.condition = condition self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) filterId = self.filterId condition = self.condition dct = { - "filterId": filterId, + 'filterId': filterId, } if condition is not None: - dct["condition"] = condition + dct['condition'] = condition dct.update(self.kwargs) return dct @@ -13479,14 +15595,19 @@ class ExceptionOptions(BaseSchema): __props__ = { "path": { "type": "array", - "items": {"$ref": "#/definitions/ExceptionPathSegment"}, - "description": "A path that selects a single or multiple exceptions in a tree. If `path` is missing, the whole tree is selected.\nBy convention the first segment of the path is a category that is used to group exceptions in the UI.", + "items": { + "$ref": "#/definitions/ExceptionPathSegment" + }, + "description": "A path that selects a single or multiple exceptions in a tree. If `path` is missing, the whole tree is selected.\nBy convention the first segment of the path is a category that is used to group exceptions in the UI." }, - "breakMode": {"description": "Condition when a thrown exception should result in a break.", "type": "ExceptionBreakMode"}, + "breakMode": { + "description": "Condition when a thrown exception should result in a break.", + "type": "ExceptionBreakMode" + } } - __refs__ = set(["breakMode"]) + __refs__ = set(['breakMode']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, breakMode, path=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -13503,16 +15624,17 @@ class ExceptionOptions(BaseSchema): ExceptionPathSegment.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) breakMode = self.breakMode path = self.path if path and hasattr(path[0], "to_dict"): path = [x.to_dict() for x in path] dct = { - "breakMode": breakMode, + 'breakMode': breakMode, } if path is not None: - dct["path"] = [ExceptionPathSegment.update_dict_ids_to_dap(o) for o in path] if (update_ids_to_dap and path) else path + dct['path'] = [ExceptionPathSegment.update_dict_ids_to_dap(o) for o in path] if (update_ids_to_dap and path) else path dct.update(self.kwargs) return dct @@ -13521,37 +15643,41 @@ class ExceptionOptions(BaseSchema): class ExceptionBreakMode(BaseSchema): """ This enumeration defines all possible conditions when a thrown exception should result in a break. - + never: never breaks, - + always: always breaks, - + unhandled: breaks when exception unhandled, - + userUnhandled: breaks if the exception is not handled by user code. Note: automatically generated code. Do not edit manually. """ - NEVER = "never" - ALWAYS = "always" - UNHANDLED = "unhandled" - USERUNHANDLED = "userUnhandled" + NEVER = 'never' + ALWAYS = 'always' + UNHANDLED = 'unhandled' + USERUNHANDLED = 'userUnhandled' - VALID_VALUES = set(["never", "always", "unhandled", "userUnhandled"]) + VALID_VALUES = set(['never', 'always', 'unhandled', 'userUnhandled']) __props__ = {} __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) - """ """ - + """ + + """ + self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) - dct = {} + dct = { + } dct.update(self.kwargs) return dct @@ -13561,7 +15687,7 @@ class ExceptionPathSegment(BaseSchema): """ An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a tree of exceptions. - + If a segment consists of more than one name, it matches the names provided if `negate` is false or missing, or it matches anything except the names provided if `negate` is true. @@ -13571,17 +15697,19 @@ class ExceptionPathSegment(BaseSchema): __props__ = { "negate": { "type": "boolean", - "description": "If false or missing this segment matches the names provided, otherwise it matches anything except the names provided.", + "description": "If false or missing this segment matches the names provided, otherwise it matches anything except the names provided." }, "names": { "type": "array", - "items": {"type": "string"}, - "description": "Depending on the value of `negate` the names that should match or not match.", - }, + "items": { + "type": "string" + }, + "description": "Depending on the value of `negate` the names that should match or not match." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, names, negate=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -13592,16 +15720,17 @@ class ExceptionPathSegment(BaseSchema): self.negate = negate self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) names = self.names if names and hasattr(names[0], "to_dict"): names = [x.to_dict() for x in names] negate = self.negate dct = { - "names": names, + 'names': names, } if negate is not None: - dct["negate"] = negate + dct['negate'] = negate dct.update(self.kwargs) return dct @@ -13615,35 +15744,39 @@ class ExceptionDetails(BaseSchema): """ __props__ = { - "message": {"type": "string", "description": "Message contained in the exception."}, - "typeName": {"type": "string", "description": "Short type name of the exception object."}, - "fullTypeName": {"type": "string", "description": "Fully-qualified type name of the exception object."}, + "message": { + "type": "string", + "description": "Message contained in the exception." + }, + "typeName": { + "type": "string", + "description": "Short type name of the exception object." + }, + "fullTypeName": { + "type": "string", + "description": "Fully-qualified type name of the exception object." + }, "evaluateName": { "type": "string", - "description": "An expression that can be evaluated in the current scope to obtain the exception object.", + "description": "An expression that can be evaluated in the current scope to obtain the exception object." + }, + "stackTrace": { + "type": "string", + "description": "Stack trace at the time the exception was thrown." }, - "stackTrace": {"type": "string", "description": "Stack trace at the time the exception was thrown."}, "innerException": { "type": "array", - "items": {"$ref": "#/definitions/ExceptionDetails"}, - "description": "Details of the exception contained by this exception, if any.", - }, + "items": { + "$ref": "#/definitions/ExceptionDetails" + }, + "description": "Details of the exception contained by this exception, if any." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - message=None, - typeName=None, - fullTypeName=None, - evaluateName=None, - stackTrace=None, - innerException=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, message=None, typeName=None, fullTypeName=None, evaluateName=None, stackTrace=None, innerException=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string message: Message contained in the exception. :param string typeName: Short type name of the exception object. @@ -13663,6 +15796,7 @@ class ExceptionDetails(BaseSchema): ExceptionDetails.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) message = self.message typeName = self.typeName @@ -13672,23 +15806,20 @@ class ExceptionDetails(BaseSchema): innerException = self.innerException if innerException and hasattr(innerException[0], "to_dict"): innerException = [x.to_dict() for x in innerException] - dct = {} + dct = { + } if message is not None: - dct["message"] = message + dct['message'] = message if typeName is not None: - dct["typeName"] = typeName + dct['typeName'] = typeName if fullTypeName is not None: - dct["fullTypeName"] = fullTypeName + dct['fullTypeName'] = fullTypeName if evaluateName is not None: - dct["evaluateName"] = evaluateName + dct['evaluateName'] = evaluateName if stackTrace is not None: - dct["stackTrace"] = stackTrace + dct['stackTrace'] = stackTrace if innerException is not None: - dct["innerException"] = ( - [ExceptionDetails.update_dict_ids_to_dap(o) for o in innerException] - if (update_ids_to_dap and innerException) - else innerException - ) + dct['innerException'] = [ExceptionDetails.update_dict_ids_to_dap(o) for o in innerException] if (update_ids_to_dap and innerException) else innerException dct.update(self.kwargs) return dct @@ -13704,50 +15835,54 @@ class DisassembledInstruction(BaseSchema): __props__ = { "address": { "type": "string", - "description": "The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise.", + "description": "The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise." }, "instructionBytes": { "type": "string", - "description": "Raw bytes representing the instruction and its operands, in an implementation-defined format.", + "description": "Raw bytes representing the instruction and its operands, in an implementation-defined format." }, "instruction": { "type": "string", - "description": "Text representing the instruction and its operands, in an implementation-defined format.", + "description": "Text representing the instruction and its operands, in an implementation-defined format." + }, + "symbol": { + "type": "string", + "description": "Name of the symbol that corresponds with the location of this instruction, if any." }, - "symbol": {"type": "string", "description": "Name of the symbol that corresponds with the location of this instruction, if any."}, "location": { "description": "Source location that corresponds to this instruction, if any.\nShould always be set (if available) on the first instruction returned,\nbut can be omitted afterwards if this instruction maps to the same source file as the previous instruction.", - "type": "Source", + "type": "Source" + }, + "line": { + "type": "integer", + "description": "The line within the source location that corresponds to this instruction, if any." + }, + "column": { + "type": "integer", + "description": "The column within the line that corresponds to this instruction, if any." + }, + "endLine": { + "type": "integer", + "description": "The end line of the range that corresponds to this instruction, if any." + }, + "endColumn": { + "type": "integer", + "description": "The end column of the range that corresponds to this instruction, if any." }, - "line": {"type": "integer", "description": "The line within the source location that corresponds to this instruction, if any."}, - "column": {"type": "integer", "description": "The column within the line that corresponds to this instruction, if any."}, - "endLine": {"type": "integer", "description": "The end line of the range that corresponds to this instruction, if any."}, - "endColumn": {"type": "integer", "description": "The end column of the range that corresponds to this instruction, if any."}, "presentationHint": { "type": "string", "description": "A hint for how to present the instruction in the UI.\n\nA value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.'", - "enum": ["normal", "invalid"], - }, + "enum": [ + "normal", + "invalid" + ] + } } - __refs__ = set(["location"]) + __refs__ = set(['location']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - address, - instruction, - instructionBytes=None, - symbol=None, - location=None, - line=None, - column=None, - endLine=None, - endColumn=None, - presentationHint=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, address, instruction, instructionBytes=None, symbol=None, location=None, line=None, column=None, endLine=None, endColumn=None, presentationHint=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string address: The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise. :param string instruction: Text representing the instruction and its operands, in an implementation-defined format. @@ -13761,7 +15896,7 @@ class DisassembledInstruction(BaseSchema): :param integer endLine: The end line of the range that corresponds to this instruction, if any. :param integer endColumn: The end column of the range that corresponds to this instruction, if any. :param string presentationHint: A hint for how to present the instruction in the UI. - + A value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.' """ self.address = address @@ -13771,7 +15906,7 @@ class DisassembledInstruction(BaseSchema): if location is None: self.location = Source() else: - self.location = Source(update_ids_from_dap=update_ids_from_dap, **location) if location.__class__ != Source else location + self.location = Source(update_ids_from_dap=update_ids_from_dap, **location) if location.__class__ != Source else location self.line = line self.column = column self.endLine = endLine @@ -13779,6 +15914,7 @@ class DisassembledInstruction(BaseSchema): self.presentationHint = presentationHint self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) address = self.address instruction = self.instruction @@ -13791,25 +15927,25 @@ class DisassembledInstruction(BaseSchema): endColumn = self.endColumn presentationHint = self.presentationHint dct = { - "address": address, - "instruction": instruction, + 'address': address, + 'instruction': instruction, } if instructionBytes is not None: - dct["instructionBytes"] = instructionBytes + dct['instructionBytes'] = instructionBytes if symbol is not None: - dct["symbol"] = symbol + dct['symbol'] = symbol if location is not None: - dct["location"] = location.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['location'] = location.to_dict(update_ids_to_dap=update_ids_to_dap) if line is not None: - dct["line"] = line + dct['line'] = line if column is not None: - dct["column"] = column + dct['column'] = column if endLine is not None: - dct["endLine"] = endLine + dct['endLine'] = endLine if endColumn is not None: - dct["endColumn"] = endColumn + dct['endColumn'] = endColumn if presentationHint is not None: - dct["presentationHint"] = presentationHint + dct['presentationHint'] = presentationHint dct.update(self.kwargs) return dct @@ -13825,20 +15961,24 @@ class InvalidatedAreas(BaseSchema): __props__ = {} __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) - """ """ - + """ + + """ + self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) - dct = {} + dct = { + } dct.update(self.kwargs) return dct -@register_request("setDebuggerProperty") +@register_request('setDebuggerProperty') @register class SetDebuggerPropertyRequest(BaseSchema): """ @@ -13850,46 +15990,55 @@ class SetDebuggerPropertyRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["setDebuggerProperty"]}, - "arguments": {"type": "SetDebuggerPropertyArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "setDebuggerProperty" + ] + }, + "arguments": { + "type": "SetDebuggerPropertyArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param SetDebuggerPropertyArguments arguments: + :param string type: + :param string command: + :param SetDebuggerPropertyArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "setDebuggerProperty" + self.type = 'request' + self.command = 'setDebuggerProperty' if arguments is None: self.arguments = SetDebuggerPropertyArguments() else: - self.arguments = ( - SetDebuggerPropertyArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != SetDebuggerPropertyArguments - else arguments - ) + self.arguments = SetDebuggerPropertyArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != SetDebuggerPropertyArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -13904,43 +16053,48 @@ class SetDebuggerPropertyArguments(BaseSchema): """ __props__ = { - "ideOS": {"type": ["string"], "description": "OS where the ide is running. Supported values [Windows, Linux]"}, + "ideOS": { + "type": [ + "string" + ], + "description": "OS where the ide is running. Supported values [Windows, Linux]" + }, "dontTraceStartPatterns": { - "type": ["array"], - "description": "Patterns to match with the start of the file paths. Matching paths will be added to a list of file where trace is ignored.", + "type": [ + "array" + ], + "description": "Patterns to match with the start of the file paths. Matching paths will be added to a list of file where trace is ignored." }, "dontTraceEndPatterns": { - "type": ["array"], - "description": "Patterns to match with the end of the file paths. Matching paths will be added to a list of file where trace is ignored.", + "type": [ + "array" + ], + "description": "Patterns to match with the end of the file paths. Matching paths will be added to a list of file where trace is ignored." }, "skipSuspendOnBreakpointException": { - "type": ["array"], - "description": "List of exceptions that should be skipped when doing condition evaluations.", + "type": [ + "array" + ], + "description": "List of exceptions that should be skipped when doing condition evaluations." }, "skipPrintBreakpointException": { - "type": ["array"], - "description": "List of exceptions that should skip printing to stderr when doing condition evaluations.", + "type": [ + "array" + ], + "description": "List of exceptions that should skip printing to stderr when doing condition evaluations." }, "multiThreadsSingleNotification": { - "type": ["boolean"], - "description": "If false then a notification is generated for each thread event. If True a single event is gnenerated, and all threads follow that behavior.", - }, + "type": [ + "boolean" + ], + "description": "If false then a notification is generated for each thread event. If True a single event is gnenerated, and all threads follow that behavior." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - ideOS=None, - dontTraceStartPatterns=None, - dontTraceEndPatterns=None, - skipSuspendOnBreakpointException=None, - skipPrintBreakpointException=None, - multiThreadsSingleNotification=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, ideOS=None, dontTraceStartPatterns=None, dontTraceEndPatterns=None, skipSuspendOnBreakpointException=None, skipPrintBreakpointException=None, multiThreadsSingleNotification=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param ['string'] ideOS: OS where the ide is running. Supported values [Windows, Linux] :param ['array'] dontTraceStartPatterns: Patterns to match with the start of the file paths. Matching paths will be added to a list of file where trace is ignored. @@ -13957,6 +16111,7 @@ class SetDebuggerPropertyArguments(BaseSchema): self.multiThreadsSingleNotification = multiThreadsSingleNotification self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) ideOS = self.ideOS dontTraceStartPatterns = self.dontTraceStartPatterns @@ -13964,24 +16119,25 @@ class SetDebuggerPropertyArguments(BaseSchema): skipSuspendOnBreakpointException = self.skipSuspendOnBreakpointException skipPrintBreakpointException = self.skipPrintBreakpointException multiThreadsSingleNotification = self.multiThreadsSingleNotification - dct = {} + dct = { + } if ideOS is not None: - dct["ideOS"] = ideOS + dct['ideOS'] = ideOS if dontTraceStartPatterns is not None: - dct["dontTraceStartPatterns"] = dontTraceStartPatterns + dct['dontTraceStartPatterns'] = dontTraceStartPatterns if dontTraceEndPatterns is not None: - dct["dontTraceEndPatterns"] = dontTraceEndPatterns + dct['dontTraceEndPatterns'] = dontTraceEndPatterns if skipSuspendOnBreakpointException is not None: - dct["skipSuspendOnBreakpointException"] = skipSuspendOnBreakpointException + dct['skipSuspendOnBreakpointException'] = skipSuspendOnBreakpointException if skipPrintBreakpointException is not None: - dct["skipPrintBreakpointException"] = skipPrintBreakpointException + dct['skipPrintBreakpointException'] = skipPrintBreakpointException if multiThreadsSingleNotification is not None: - dct["multiThreadsSingleNotification"] = multiThreadsSingleNotification + dct['multiThreadsSingleNotification'] = multiThreadsSingleNotification dct.update(self.kwargs) return dct -@register_response("setDebuggerProperty") +@register_response('setDebuggerProperty') @register class SetDebuggerPropertyResponse(BaseSchema): """ @@ -13994,33 +16150,58 @@ class SetDebuggerPropertyResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -14032,7 +16213,7 @@ class SetDebuggerPropertyResponse(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -14041,6 +16222,7 @@ class SetDebuggerPropertyResponse(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -14050,21 +16232,21 @@ class SetDebuggerPropertyResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_event("pydevdInputRequested") +@register_event('pydevdInputRequested') @register class PydevdInputRequestedEvent(BaseSchema): """ @@ -14076,63 +16258,82 @@ class PydevdInputRequestedEvent(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "enum": [ + "pydevdInputRequested" + ] }, - "type": {"type": "string", "enum": ["event"]}, - "event": {"type": "string", "enum": ["pydevdInputRequested"]}, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Event-specific information.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Event-specific information." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, seq=-1, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string event: + :param string type: + :param string event: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Event-specific information. """ - self.type = "event" - self.event = "pydevdInputRequested" + self.type = 'event' + self.event = 'pydevdInputRequested' self.seq = seq self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) event = self.event seq = self.seq body = self.body dct = { - "type": type, - "event": event, - "seq": seq, + 'type': type, + 'event': event, + 'seq': seq, } if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct -@register_request("setPydevdSourceMap") +@register_request('setPydevdSourceMap') @register class SetPydevdSourceMapRequest(BaseSchema): """ Sets multiple PydevdSourceMap for a single source and clears all previous PydevdSourceMap in that source. - + i.e.: Maps paths and lines in a 1:N mapping (use case: map a single file in the IDE to multiple IPython cells). - + To clear all PydevdSourceMap for a source, specify an empty array. - + Interaction with breakpoints: When a new mapping is sent, breakpoints that match the source (or previously matched a source) are reapplied. - + Interaction with launch pathMapping: both mappings are independent. This mapping is applied after the launch pathMapping. @@ -14142,46 +16343,55 @@ class SetPydevdSourceMapRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["setPydevdSourceMap"]}, - "arguments": {"type": "SetPydevdSourceMapArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "setPydevdSourceMap" + ] + }, + "arguments": { + "type": "SetPydevdSourceMapArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param SetPydevdSourceMapArguments arguments: + :param string type: + :param string command: + :param SetPydevdSourceMapArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "setPydevdSourceMap" + self.type = 'request' + self.command = 'setPydevdSourceMap' if arguments is None: self.arguments = SetPydevdSourceMapArguments() else: - self.arguments = ( - SetPydevdSourceMapArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != SetPydevdSourceMapArguments - else arguments - ) + self.arguments = SetPydevdSourceMapArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != SetPydevdSourceMapArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -14198,17 +16408,19 @@ class SetPydevdSourceMapArguments(BaseSchema): __props__ = { "source": { "description": "The source location of the PydevdSourceMap; 'source.path' must be specified (e.g.: for an ipython notebook this could be something as /home/notebook/note.py).", - "type": "Source", + "type": "Source" }, "pydevdSourceMaps": { "type": "array", - "items": {"$ref": "#/definitions/PydevdSourceMap"}, - "description": "The PydevdSourceMaps to be set to the given source (provide an empty array to clear the source mappings for a given path).", - }, + "items": { + "$ref": "#/definitions/PydevdSourceMap" + }, + "description": "The PydevdSourceMaps to be set to the given source (provide an empty array to clear the source mappings for a given path)." + } } - __refs__ = set(["source"]) + __refs__ = set(['source']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, source, pydevdSourceMaps=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -14218,32 +16430,29 @@ class SetPydevdSourceMapArguments(BaseSchema): if source is None: self.source = Source() else: - self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source self.pydevdSourceMaps = pydevdSourceMaps if update_ids_from_dap and self.pydevdSourceMaps: for o in self.pydevdSourceMaps: PydevdSourceMap.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) source = self.source pydevdSourceMaps = self.pydevdSourceMaps if pydevdSourceMaps and hasattr(pydevdSourceMaps[0], "to_dict"): pydevdSourceMaps = [x.to_dict() for x in pydevdSourceMaps] dct = { - "source": source.to_dict(update_ids_to_dap=update_ids_to_dap), + 'source': source.to_dict(update_ids_to_dap=update_ids_to_dap), } if pydevdSourceMaps is not None: - dct["pydevdSourceMaps"] = ( - [PydevdSourceMap.update_dict_ids_to_dap(o) for o in pydevdSourceMaps] - if (update_ids_to_dap and pydevdSourceMaps) - else pydevdSourceMaps - ) + dct['pydevdSourceMaps'] = [PydevdSourceMap.update_dict_ids_to_dap(o) for o in pydevdSourceMaps] if (update_ids_to_dap and pydevdSourceMaps) else pydevdSourceMaps dct.update(self.kwargs) return dct -@register_response("setPydevdSourceMap") +@register_response('setPydevdSourceMap') @register class SetPydevdSourceMapResponse(BaseSchema): """ @@ -14256,33 +16465,58 @@ class SetPydevdSourceMapResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Contains request result if success is True and error details if success is false.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is True and error details if success is false." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. @@ -14294,7 +16528,7 @@ class SetPydevdSourceMapResponse(BaseSchema): Some predefined values exist. :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and error details if success is false. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command @@ -14303,6 +16537,7 @@ class SetPydevdSourceMapResponse(BaseSchema): self.body = body self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -14312,16 +16547,16 @@ class SetPydevdSourceMapResponse(BaseSchema): message = self.message body = self.body dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message if body is not None: - dct["body"] = body + dct['body'] = body dct.update(self.kwargs) return dct @@ -14337,21 +16572,24 @@ class PydevdSourceMap(BaseSchema): __props__ = { "line": { "type": "integer", - "description": "The local line to which the mapping should map to (e.g.: for an ipython notebook this would be the first line of the cell in the file).", + "description": "The local line to which the mapping should map to (e.g.: for an ipython notebook this would be the first line of the cell in the file)." + }, + "endLine": { + "type": "integer", + "description": "The end line." }, - "endLine": {"type": "integer", "description": "The end line."}, "runtimeSource": { "description": "The path that the user has remotely -- 'source.path' must be specified (e.g.: for an ipython notebook this could be something as '')", - "type": "Source", + "type": "Source" }, "runtimeLine": { "type": "integer", - "description": "The remote line to which the mapping should map to (e.g.: for an ipython notebook this would be always 1 as it'd map the start of the cell).", - }, + "description": "The remote line to which the mapping should map to (e.g.: for an ipython notebook this would be always 1 as it'd map the start of the cell)." + } } - __refs__ = set(["runtimeSource"]) + __refs__ = set(['runtimeSource']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, line, endLine, runtimeSource, runtimeLine, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -14365,28 +16603,27 @@ class PydevdSourceMap(BaseSchema): if runtimeSource is None: self.runtimeSource = Source() else: - self.runtimeSource = ( - Source(update_ids_from_dap=update_ids_from_dap, **runtimeSource) if runtimeSource.__class__ != Source else runtimeSource - ) + self.runtimeSource = Source(update_ids_from_dap=update_ids_from_dap, **runtimeSource) if runtimeSource.__class__ != Source else runtimeSource self.runtimeLine = runtimeLine self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) line = self.line endLine = self.endLine runtimeSource = self.runtimeSource runtimeLine = self.runtimeLine dct = { - "line": line, - "endLine": endLine, - "runtimeSource": runtimeSource.to_dict(update_ids_to_dap=update_ids_to_dap), - "runtimeLine": runtimeLine, + 'line': line, + 'endLine': endLine, + 'runtimeSource': runtimeSource.to_dict(update_ids_to_dap=update_ids_to_dap), + 'runtimeLine': runtimeLine, } dct.update(self.kwargs) return dct -@register_request("pydevdSystemInfo") +@register_request('pydevdSystemInfo') @register class PydevdSystemInfoRequest(BaseSchema): """ @@ -14398,48 +16635,57 @@ class PydevdSystemInfoRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["pydevdSystemInfo"]}, - "arguments": {"type": "PydevdSystemInfoArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "pydevdSystemInfo" + ] + }, + "arguments": { + "type": "PydevdSystemInfoArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, seq=-1, arguments=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: + :param string type: + :param string command: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. - :param PydevdSystemInfoArguments arguments: + :param PydevdSystemInfoArguments arguments: """ - self.type = "request" - self.command = "pydevdSystemInfo" + self.type = 'request' + self.command = 'pydevdSystemInfo' self.seq = seq if arguments is None: self.arguments = PydevdSystemInfoArguments() else: - self.arguments = ( - PydevdSystemInfoArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != PydevdSystemInfoArguments - else arguments - ) + self.arguments = PydevdSystemInfoArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != PydevdSystemInfoArguments else arguments self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command seq = self.seq arguments = self.arguments dct = { - "type": type, - "command": command, - "seq": seq, + 'type': type, + 'command': command, + 'seq': seq, } if arguments is not None: - dct["arguments"] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['arguments'] = arguments.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct @@ -14455,20 +16701,24 @@ class PydevdSystemInfoArguments(BaseSchema): __props__ = {} __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) - """ """ - + """ + + """ + self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) - dct = {} + dct = { + } dct.update(self.kwargs) return dct -@register_response("pydevdSystemInfo") +@register_response('pydevdSystemInfo') @register class PydevdSystemInfoResponse(BaseSchema): """ @@ -14480,72 +16730,97 @@ class PydevdSystemInfoResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { "python": { "$ref": "#/definitions/PydevdPythonInfo", - "description": "Information about the python version running in the current process.", + "description": "Information about the python version running in the current process." }, "platform": { "$ref": "#/definitions/PydevdPlatformInfo", - "description": "Information about the plarforn on which the current process is running.", + "description": "Information about the plarforn on which the current process is running." }, - "process": {"$ref": "#/definitions/PydevdProcessInfo", "description": "Information about the current process."}, - "pydevd": {"$ref": "#/definitions/PydevdInfo", "description": "Information about pydevd."}, + "process": { + "$ref": "#/definitions/PydevdProcessInfo", + "description": "Information about the current process." + }, + "pydevd": { + "$ref": "#/definitions/PydevdInfo", + "description": "Information about pydevd." + } }, - "required": ["python", "platform", "process", "pydevd"], - }, + "required": [ + "python", + "platform", + "process", + "pydevd" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param PydevdSystemInfoResponseBody body: + :param PydevdSystemInfoResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = PydevdSystemInfoResponseBody() else: - self.body = ( - PydevdSystemInfoResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != PydevdSystemInfoResponseBody - else body - ) + self.body = PydevdSystemInfoResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != PydevdSystemInfoResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -14555,15 +16830,15 @@ class PydevdSystemInfoResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct @@ -14579,16 +16854,16 @@ class PydevdPythonInfo(BaseSchema): __props__ = { "version": { "type": "string", - "description": "Python version as a string in semver format: ...", + "description": "Python version as a string in semver format: ..." }, "implementation": { "description": "Python version as a string in this format ...", - "type": "PydevdPythonImplementationInfo", - }, + "type": "PydevdPythonImplementationInfo" + } } - __refs__ = set(["implementation"]) + __refs__ = set(['implementation']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, version=None, implementation=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -14599,21 +16874,19 @@ class PydevdPythonInfo(BaseSchema): if implementation is None: self.implementation = PydevdPythonImplementationInfo() else: - self.implementation = ( - PydevdPythonImplementationInfo(update_ids_from_dap=update_ids_from_dap, **implementation) - if implementation.__class__ != PydevdPythonImplementationInfo - else implementation - ) + self.implementation = PydevdPythonImplementationInfo(update_ids_from_dap=update_ids_from_dap, **implementation) if implementation.__class__ != PydevdPythonImplementationInfo else implementation self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) version = self.version implementation = self.implementation - dct = {} + dct = { + } if version is not None: - dct["version"] = version + dct['version'] = version if implementation is not None: - dct["implementation"] = implementation.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['implementation'] = implementation.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct @@ -14627,16 +16900,22 @@ class PydevdPythonImplementationInfo(BaseSchema): """ __props__ = { - "name": {"type": "string", "description": "Python implementation name."}, + "name": { + "type": "string", + "description": "Python implementation name." + }, "version": { "type": "string", - "description": "Python version as a string in semver format: ...", + "description": "Python version as a string in semver format: ..." }, - "description": {"type": "string", "description": "Optional description for this python implementation."}, + "description": { + "type": "string", + "description": "Optional description for this python implementation." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, name=None, version=None, description=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -14649,17 +16928,19 @@ class PydevdPythonImplementationInfo(BaseSchema): self.description = description self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) name = self.name version = self.version description = self.description - dct = {} + dct = { + } if name is not None: - dct["name"] = name + dct['name'] = name if version is not None: - dct["version"] = version + dct['version'] = version if description is not None: - dct["description"] = description + dct['description'] = description dct.update(self.kwargs) return dct @@ -14672,10 +16953,15 @@ class PydevdPlatformInfo(BaseSchema): Note: automatically generated code. Do not edit manually. """ - __props__ = {"name": {"type": "string", "description": "Name of the platform as returned by 'sys.platform'."}} + __props__ = { + "name": { + "type": "string", + "description": "Name of the platform as returned by 'sys.platform'." + } + } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, name=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -14684,11 +16970,13 @@ class PydevdPlatformInfo(BaseSchema): self.name = name self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) name = self.name - dct = {} + dct = { + } if name is not None: - dct["name"] = name + dct['name'] = name dct.update(self.kwargs) return dct @@ -14702,14 +16990,26 @@ class PydevdProcessInfo(BaseSchema): """ __props__ = { - "pid": {"type": "integer", "description": "Process ID for the current process."}, - "ppid": {"type": "integer", "description": "Parent Process ID for the current process."}, - "executable": {"type": "string", "description": "Path to the executable as returned by 'sys.executable'."}, - "bitness": {"type": "integer", "description": "Integer value indicating the bitness of the current process."}, + "pid": { + "type": "integer", + "description": "Process ID for the current process." + }, + "ppid": { + "type": "integer", + "description": "Parent Process ID for the current process." + }, + "executable": { + "type": "string", + "description": "Path to the executable as returned by 'sys.executable'." + }, + "bitness": { + "type": "integer", + "description": "Integer value indicating the bitness of the current process." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, pid=None, ppid=None, executable=None, bitness=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -14724,20 +17024,22 @@ class PydevdProcessInfo(BaseSchema): self.bitness = bitness self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) pid = self.pid ppid = self.ppid executable = self.executable bitness = self.bitness - dct = {} + dct = { + } if pid is not None: - dct["pid"] = pid + dct['pid'] = pid if ppid is not None: - dct["ppid"] = ppid + dct['ppid'] = ppid if executable is not None: - dct["executable"] = executable + dct['executable'] = executable if bitness is not None: - dct["bitness"] = bitness + dct['bitness'] = bitness dct.update(self.kwargs) return dct @@ -14751,12 +17053,18 @@ class PydevdInfo(BaseSchema): """ __props__ = { - "usingCython": {"type": "boolean", "description": "Specifies whether the cython native module is being used."}, - "usingFrameEval": {"type": "boolean", "description": "Specifies whether the frame eval native module is being used."}, + "usingCython": { + "type": "boolean", + "description": "Specifies whether the cython native module is being used." + }, + "usingFrameEval": { + "type": "boolean", + "description": "Specifies whether the frame eval native module is being used." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, usingCython=None, usingFrameEval=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -14767,19 +17075,21 @@ class PydevdInfo(BaseSchema): self.usingFrameEval = usingFrameEval self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) usingCython = self.usingCython usingFrameEval = self.usingFrameEval - dct = {} + dct = { + } if usingCython is not None: - dct["usingCython"] = usingCython + dct['usingCython'] = usingCython if usingFrameEval is not None: - dct["usingFrameEval"] = usingFrameEval + dct['usingFrameEval'] = usingFrameEval dct.update(self.kwargs) return dct -@register_request("pydevdAuthorize") +@register_request('pydevdAuthorize') @register class PydevdAuthorizeRequest(BaseSchema): """ @@ -14791,46 +17101,55 @@ class PydevdAuthorizeRequest(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." }, - "type": {"type": "string", "enum": ["request"]}, - "command": {"type": "string", "enum": ["pydevdAuthorize"]}, - "arguments": {"type": "PydevdAuthorizeArguments"}, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "pydevdAuthorize" + ] + }, + "arguments": { + "type": "PydevdAuthorizeArguments" + } } - __refs__ = set(["arguments"]) + __refs__ = set(['arguments']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: - :param string command: - :param PydevdAuthorizeArguments arguments: + :param string type: + :param string command: + :param PydevdAuthorizeArguments arguments: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. """ - self.type = "request" - self.command = "pydevdAuthorize" + self.type = 'request' + self.command = 'pydevdAuthorize' if arguments is None: self.arguments = PydevdAuthorizeArguments() else: - self.arguments = ( - PydevdAuthorizeArguments(update_ids_from_dap=update_ids_from_dap, **arguments) - if arguments.__class__ != PydevdAuthorizeArguments - else arguments - ) + self.arguments = PydevdAuthorizeArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != PydevdAuthorizeArguments else arguments self.seq = seq self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) command = self.command arguments = self.arguments seq = self.seq dct = { - "type": type, - "command": command, - "arguments": arguments.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } dct.update(self.kwargs) return dct @@ -14844,10 +17163,15 @@ class PydevdAuthorizeArguments(BaseSchema): Note: automatically generated code. Do not edit manually. """ - __props__ = {"debugServerAccessToken": {"type": "string", "description": "The access token to access the debug server."}} + __props__ = { + "debugServerAccessToken": { + "type": "string", + "description": "The access token to access the debug server." + } + } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, debugServerAccessToken=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -14856,16 +17180,18 @@ class PydevdAuthorizeArguments(BaseSchema): self.debugServerAccessToken = debugServerAccessToken self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) debugServerAccessToken = self.debugServerAccessToken - dct = {} + dct = { + } if debugServerAccessToken is not None: - dct["debugServerAccessToken"] = debugServerAccessToken + dct['debugServerAccessToken'] = debugServerAccessToken dct.update(self.kwargs) return dct -@register_response("pydevdAuthorize") +@register_response('pydevdAuthorize') @register class PydevdAuthorizeResponse(BaseSchema): """ @@ -14877,63 +17203,82 @@ class PydevdAuthorizeResponse(BaseSchema): __props__ = { "seq": { "type": "integer", - "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request.", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." }, - "type": {"type": "string", "enum": ["response"]}, - "request_seq": {"type": "integer", "description": "Sequence number of the corresponding request."}, "success": { "type": "boolean", - "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "description": "The command requested." }, - "command": {"type": "string", "description": "The command requested."}, "message": { "type": "string", "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", - "_enum": ["cancelled", "notStopped"], - "enumDescriptions": ["the request was cancelled.", "the request may be retried once the adapter is in a 'stopped' state."], + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] }, "body": { "type": "object", "properties": { - "clientAccessToken": {"type": "string", "description": "The access token to access the client (i.e.: usually the IDE)."} + "clientAccessToken": { + "type": "string", + "description": "The access token to access the client (i.e.: usually the IDE)." + } }, - "required": ["clientAccessToken"], - }, + "required": [ + "clientAccessToken" + ] + } } - __refs__ = set(["body"]) + __refs__ = set(['body']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string type: + :param string type: :param integer request_seq: Sequence number of the corresponding request. :param boolean success: Outcome of the request. If true, the request was successful and the `body` attribute may contain the result of the request. If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). :param string command: The command requested. - :param PydevdAuthorizeResponseBody body: + :param PydevdAuthorizeResponseBody body: :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. :param string message: Contains the raw error in short form if `success` is false. This raw error might be interpreted by the client and is not shown in the UI. Some predefined values exist. """ - self.type = "response" + self.type = 'response' self.request_seq = request_seq self.success = success self.command = command if body is None: self.body = PydevdAuthorizeResponseBody() else: - self.body = ( - PydevdAuthorizeResponseBody(update_ids_from_dap=update_ids_from_dap, **body) - if body.__class__ != PydevdAuthorizeResponseBody - else body - ) + self.body = PydevdAuthorizeResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != PydevdAuthorizeResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) request_seq = self.request_seq @@ -14943,15 +17288,640 @@ class PydevdAuthorizeResponse(BaseSchema): seq = self.seq message = self.message dct = { - "type": type, - "request_seq": request_seq, - "success": success, - "command": command, - "body": body.to_dict(update_ids_to_dap=update_ids_to_dap), - "seq": seq, + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } if message is not None: - dct["message"] = message + dct['message'] = message + dct.update(self.kwargs) + return dct + + +@register_request('getTable') +@register +class GetTableRequest(BaseSchema): + """ + Retrieve tabular data (e.g., DataFrame, numpy array, polars) from a variable/expression in the + debuggee. Proxies to pydevd InternalTableCommand. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "getTable" + ] + }, + "arguments": { + "type": "GetTableArguments" + } + } + __refs__ = set(['arguments']) + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param GetTableArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = 'request' + self.command = 'getTable' + if arguments is None: + self.arguments = GetTableArguments() + else: + self.arguments = GetTableArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != GetTableArguments else arguments + self.seq = seq + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, + } + dct.update(self.kwargs) + return dct + + +@register +class GetTableArguments(BaseSchema): + """ + Arguments for 'getTable' request. + + Values are evaluated in the context of the given thread/frame. + + The 'command' (initCommand in server) is a Python expression that evaluates to a supported table- + like object. + + The 'commandType' selects the operation (DF_INFO, DF_DESCRIBE, VISUALIZATION_DATA, SLICE, + SLICE_CSV). + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "threadId": { + "type": [ + "string", + "integer" + ], + "description": "Thread identifier where the frame/expression should be evaluated." + }, + "frameId": { + "type": [ + "string", + "integer" + ], + "description": "Frame identifier within the given thread." + }, + "command": { + "type": "string", + "description": "Python expression that evaluates to the table-like object (e.g., variable name or expression)." + }, + "commandType": { + "type": "string", + "enum": [ + "DF_INFO", + "SLICE", + "SLICE_CSV", + "DF_DESCRIBE", + "VISUALIZATION_DATA", + "IMAGE_START_CHUNK_LOAD", + "IMAGE_CHUNK_LOAD", + "INSPECTIONS" + ] + }, + "start": { + "type": [ + "integer", + "null" + ], + "description": "Optional start row index (inclusive) for slice operations." + }, + "end": { + "type": [ + "integer", + "null" + ], + "description": "Optional end row index (exclusive) for slice operations." + }, + "format": { + "type": [ + "string", + "null" + ], + "description": "Optional backend-specific format hint (e.g., 'json', 'csv', dtype/precision hints)." + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, threadId, frameId, commandType, command=None, start=None, end=None, format=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param ['string', 'integer'] threadId: Thread identifier where the frame/expression should be evaluated. + :param ['string', 'integer'] frameId: Frame identifier within the given thread. + :param string commandType: + :param string command: Python expression that evaluates to the table-like object (e.g., variable name or expression). + :param ['integer', 'null'] start: Optional start row index (inclusive) for slice operations. + :param ['integer', 'null'] end: Optional end row index (exclusive) for slice operations. + :param ['string', 'null'] format: Optional backend-specific format hint (e.g., 'json', 'csv', dtype/precision hints). + """ + self.threadId = threadId + self.frameId = frameId + self.commandType = commandType + self.command = command + self.start = start + self.end = end + self.format = format + if update_ids_from_dap: + self.threadId = self._translate_id_from_dap(self.threadId) + self.frameId = self._translate_id_from_dap(self.frameId) + self.kwargs = kwargs + + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_from_dap(dct['threadId']) + if 'frameId' in dct: + dct['frameId'] = cls._translate_id_from_dap(dct['frameId']) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + threadId = self.threadId + frameId = self.frameId + commandType = self.commandType + command = self.command + start = self.start + end = self.end + format = self.format # noqa (assign to builtin) + if update_ids_to_dap: + if threadId is not None: + threadId = self._translate_id_to_dap(threadId) + if frameId is not None: + frameId = self._translate_id_to_dap(frameId) + dct = { + 'threadId': threadId, + 'frameId': frameId, + 'commandType': commandType, + } + if command is not None: + dct['command'] = command + if start is not None: + dct['start'] = start + if end is not None: + dct['end'] = end + if format is not None: + dct['format'] = format + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_to_dap(dct['threadId']) + if 'frameId' in dct: + dct['frameId'] = cls._translate_id_to_dap(dct['frameId']) + return dct + + +@register_response('getTable') +@register +class GetTableResponse(BaseSchema): + """ + Response to 'getTable' request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." + }, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "enum": [ + "getTable" + ] + }, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] + }, + "body": { + "type": "object", + "properties": { + "result": { + "type": "string", + "description": "Opaque string payload with the result of the getTable operation." + } + } + } + } + __refs__ = set(['body']) + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, request_seq, success, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: + :param GetTableResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = 'response' + self.request_seq = request_seq + self.success = success + self.command = 'getTable' + if body is None: + self.body = GetTableResponseBody() + else: + self.body = GetTableResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != GetTableResponseBody else body + self.seq = seq + self.message = message + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, + } + if message is not None: + dct['message'] = message + dct.update(self.kwargs) + return dct + + +@register_request('getArray') +@register +class GetArrayRequest(BaseSchema): + """ + Retrieve array data from a variable/expression in the debuggee. Proxies to pydevd + InternalArrayCommand. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "getArray" + ] + }, + "arguments": { + "type": "GetArrayArguments" + } + } + __refs__ = set(['arguments']) + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param GetArrayArguments arguments: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + """ + self.type = 'request' + self.command = 'getArray' + if arguments is None: + self.arguments = GetArrayArguments() + else: + self.arguments = GetArrayArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != GetArrayArguments else arguments + self.seq = seq + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, + } + dct.update(self.kwargs) + return dct + + +@register +class GetArrayArguments(BaseSchema): + """ + Arguments for 'getArray' request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "threadId": { + "type": [ + "string", + "integer" + ], + "description": "Thread identifier where the frame/expression should be evaluated." + }, + "frameId": { + "type": [ + "string", + "integer" + ], + "description": "Frame identifier within the given thread." + }, + "rowOffset": { + "type": "integer", + "description": "Row offset" + }, + "colOffset": { + "type": "integer", + "description": "Col offset" + }, + "rows": { + "type": "integer", + "description": "Rows" + }, + "cols": { + "type": "integer", + "description": "Columns" + }, + "format": { + "type": [ + "string", + "null" + ], + "description": "Optional backend-specific format hint (e.g., 'json', 'csv', dtype/precision hints)." + }, + "variableName": { + "type": "string", + "description": "Array variable name" + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, threadId, frameId, rowOffset=None, colOffset=None, rows=None, cols=None, format=None, variableName=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param ['string', 'integer'] threadId: Thread identifier where the frame/expression should be evaluated. + :param ['string', 'integer'] frameId: Frame identifier within the given thread. + :param integer rowOffset: Row offset + :param integer colOffset: Col offset + :param integer rows: Rows + :param integer cols: Columns + :param ['string', 'null'] format: Optional backend-specific format hint (e.g., 'json', 'csv', dtype/precision hints). + :param string variableName: Array variable name + """ + self.threadId = threadId + self.frameId = frameId + self.rowOffset = rowOffset + self.colOffset = colOffset + self.rows = rows + self.cols = cols + self.format = format + self.variableName = variableName + if update_ids_from_dap: + self.threadId = self._translate_id_from_dap(self.threadId) + self.frameId = self._translate_id_from_dap(self.frameId) + self.kwargs = kwargs + + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_from_dap(dct['threadId']) + if 'frameId' in dct: + dct['frameId'] = cls._translate_id_from_dap(dct['frameId']) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + threadId = self.threadId + frameId = self.frameId + rowOffset = self.rowOffset + colOffset = self.colOffset + rows = self.rows + cols = self.cols + format = self.format # noqa (assign to builtin) + variableName = self.variableName + if update_ids_to_dap: + if threadId is not None: + threadId = self._translate_id_to_dap(threadId) + if frameId is not None: + frameId = self._translate_id_to_dap(frameId) + dct = { + 'threadId': threadId, + 'frameId': frameId, + } + if rowOffset is not None: + dct['rowOffset'] = rowOffset + if colOffset is not None: + dct['colOffset'] = colOffset + if rows is not None: + dct['rows'] = rows + if cols is not None: + dct['cols'] = cols + if format is not None: + dct['format'] = format + if variableName is not None: + dct['variableName'] = variableName + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_to_dap(dct['threadId']) + if 'frameId' in dct: + dct['frameId'] = cls._translate_id_to_dap(dct['frameId']) + return dct + + +@register_response('getArray') +@register +class GetArrayResponse(BaseSchema): + """ + Response to 'getTable' request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." + }, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf True, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { + "type": "string", + "enum": [ + "getArray" + ] + }, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": [ + "cancelled", + "notStopped" + ], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] + }, + "body": { + "type": "object", + "properties": { + "result": { + "type": "string", + "description": "Opaque string payload with the result of the requested operation." + } + } + } + } + __refs__ = set(['body']) + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, request_seq, success, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the `body` attribute may contain the result of the request. + If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`). + :param string command: + :param GetArrayResponseBody body: + :param integer seq: Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. + :param string message: Contains the raw error in short form if `success` is false. + This raw error might be interpreted by the client and is not shown in the UI. + Some predefined values exist. + """ + self.type = 'response' + self.request_seq = request_seq + self.success = success + self.command = 'getArray' + if body is None: + self.body = GetArrayResponseBody() + else: + self.body = GetArrayResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != GetArrayResponseBody else body + self.seq = seq + self.message = message + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, + } + if message is not None: + dct['message'] = message dct.update(self.kwargs) return dct @@ -14964,10 +17934,15 @@ class ErrorResponseBody(BaseSchema): Note: automatically generated code. Do not edit manually. """ - __props__ = {"error": {"description": "A structured error message.", "type": "Message"}} - __refs__ = set(["error"]) + __props__ = { + "error": { + "description": "A structured error message.", + "type": "Message" + } + } + __refs__ = set(['error']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, error=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -14976,14 +17951,16 @@ class ErrorResponseBody(BaseSchema): if error is None: self.error = Message() else: - self.error = Message(update_ids_from_dap=update_ids_from_dap, **error) if error.__class__ != Message else error + self.error = Message(update_ids_from_dap=update_ids_from_dap, **error) if error.__class__ != Message else error self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) error = self.error - dct = {} + dct = { + } if error is not None: - dct["error"] = error.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['error'] = error.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct @@ -15009,48 +17986,42 @@ class StoppedEventBody(BaseSchema): "goto", "function breakpoint", "data breakpoint", - "instruction breakpoint", - ], + "instruction breakpoint" + ] }, "description": { "type": "string", - "description": "The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and can be translated.", + "description": "The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and can be translated." + }, + "threadId": { + "type": "integer", + "description": "The thread which was stopped." }, - "threadId": {"type": "integer", "description": "The thread which was stopped."}, "preserveFocusHint": { "type": "boolean", - "description": "A value of True hints to the client that this event should not change the focus.", + "description": "A value of True hints to the client that this event should not change the focus." }, "text": { "type": "string", - "description": "Additional information. E.g. if reason is `exception`, text contains the exception name. This string is shown in the UI.", + "description": "Additional information. E.g. if reason is `exception`, text contains the exception name. This string is shown in the UI." }, "allThreadsStopped": { "type": "boolean", - "description": "If `allThreadsStopped` is True, a debug adapter can announce that all threads have stopped.\n- The client should use this information to enable that all threads can be expanded to access their stacktraces.\n- If the attribute is missing or false, only the thread with the given `threadId` can be expanded.", + "description": "If `allThreadsStopped` is True, a debug adapter can announce that all threads have stopped.\n- The client should use this information to enable that all threads can be expanded to access their stacktraces.\n- If the attribute is missing or false, only the thread with the given `threadId` can be expanded." }, "hitBreakpointIds": { "type": "array", - "items": {"type": "integer"}, - "description": "Ids of the breakpoints that triggered the event. In most cases there is only a single breakpoint but here are some examples for multiple breakpoints:\n- Different types of breakpoints map to the same location.\n- Multiple source breakpoints get collapsed to the same instruction by the compiler/runtime.\n- Multiple function breakpoints with different function names map to the same location.", - }, + "items": { + "type": "integer" + }, + "description": "Ids of the breakpoints that triggered the event. In most cases there is only a single breakpoint but here are some examples for multiple breakpoints:\n- Different types of breakpoints map to the same location.\n- Multiple source breakpoints get collapsed to the same instruction by the compiler/runtime.\n- Multiple function breakpoints with different function names map to the same location." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - reason, - description=None, - threadId=None, - preserveFocusHint=None, - text=None, - allThreadsStopped=None, - hitBreakpointIds=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, reason, description=None, threadId=None, preserveFocusHint=None, text=None, allThreadsStopped=None, hitBreakpointIds=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string reason: The reason for the event. For backward compatibility this string is shown in the UI if the `description` attribute is missing (but it must not be translated). @@ -15076,11 +18047,12 @@ class StoppedEventBody(BaseSchema): if update_ids_from_dap: self.threadId = self._translate_id_from_dap(self.threadId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_from_dap(dct['threadId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -15097,27 +18069,27 @@ class StoppedEventBody(BaseSchema): if threadId is not None: threadId = self._translate_id_to_dap(threadId) dct = { - "reason": reason, + 'reason': reason, } if description is not None: - dct["description"] = description + dct['description'] = description if threadId is not None: - dct["threadId"] = threadId + dct['threadId'] = threadId if preserveFocusHint is not None: - dct["preserveFocusHint"] = preserveFocusHint + dct['preserveFocusHint'] = preserveFocusHint if text is not None: - dct["text"] = text + dct['text'] = text if allThreadsStopped is not None: - dct["allThreadsStopped"] = allThreadsStopped + dct['allThreadsStopped'] = allThreadsStopped if hitBreakpointIds is not None: - dct["hitBreakpointIds"] = hitBreakpointIds + dct['hitBreakpointIds'] = hitBreakpointIds dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_to_dap(dct['threadId']) return dct @@ -15130,15 +18102,18 @@ class ContinuedEventBody(BaseSchema): """ __props__ = { - "threadId": {"type": "integer", "description": "The thread which was continued."}, + "threadId": { + "type": "integer", + "description": "The thread which was continued." + }, "allThreadsContinued": { "type": "boolean", - "description": "If `allThreadsContinued` is True, a debug adapter can announce that all threads have continued.", - }, + "description": "If `allThreadsContinued` is True, a debug adapter can announce that all threads have continued." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, threadId, allThreadsContinued=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -15150,11 +18125,12 @@ class ContinuedEventBody(BaseSchema): if update_ids_from_dap: self.threadId = self._translate_id_from_dap(self.threadId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_from_dap(dct['threadId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -15164,17 +18140,17 @@ class ContinuedEventBody(BaseSchema): if threadId is not None: threadId = self._translate_id_to_dap(threadId) dct = { - "threadId": threadId, + 'threadId': threadId, } if allThreadsContinued is not None: - dct["allThreadsContinued"] = allThreadsContinued + dct['allThreadsContinued'] = allThreadsContinued dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_to_dap(dct['threadId']) return dct @@ -15186,10 +18162,15 @@ class ExitedEventBody(BaseSchema): Note: automatically generated code. Do not edit manually. """ - __props__ = {"exitCode": {"type": "integer", "description": "The exit code returned from the debuggee."}} + __props__ = { + "exitCode": { + "type": "integer", + "description": "The exit code returned from the debuggee." + } + } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, exitCode, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -15198,10 +18179,11 @@ class ExitedEventBody(BaseSchema): self.exitCode = exitCode self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) exitCode = self.exitCode dct = { - "exitCode": exitCode, + 'exitCode': exitCode, } dct.update(self.kwargs) return dct @@ -15217,13 +18199,21 @@ class TerminatedEventBody(BaseSchema): __props__ = { "restart": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "A debug adapter may set `restart` to True (or to an arbitrary object) to request that the client restarts the session.\nThe value is not interpreted by the client and passed unmodified as an attribute `__restart` to the `launch` and `attach` requests.", + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "A debug adapter may set `restart` to True (or to an arbitrary object) to request that the client restarts the session.\nThe value is not interpreted by the client and passed unmodified as an attribute `__restart` to the `launch` and `attach` requests." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, restart=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -15233,11 +18223,13 @@ class TerminatedEventBody(BaseSchema): self.restart = restart self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) restart = self.restart - dct = {} + dct = { + } if restart is not None: - dct["restart"] = restart + dct['restart'] = restart dct.update(self.kwargs) return dct @@ -15251,12 +18243,22 @@ class ThreadEventBody(BaseSchema): """ __props__ = { - "reason": {"type": "string", "description": "The reason for the event.", "_enum": ["started", "exited"]}, - "threadId": {"type": "integer", "description": "The identifier of the thread."}, + "reason": { + "type": "string", + "description": "The reason for the event.", + "_enum": [ + "started", + "exited" + ] + }, + "threadId": { + "type": "integer", + "description": "The identifier of the thread." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, reason, threadId, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -15268,11 +18270,12 @@ class ThreadEventBody(BaseSchema): if update_ids_from_dap: self.threadId = self._translate_id_from_dap(self.threadId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_from_dap(dct['threadId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -15282,16 +18285,16 @@ class ThreadEventBody(BaseSchema): if threadId is not None: threadId = self._translate_id_to_dap(threadId) dct = { - "reason": reason, - "threadId": threadId, + 'reason': reason, + 'threadId': threadId, } dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_to_dap(dct['threadId']) return dct @@ -15307,58 +18310,73 @@ class OutputEventBody(BaseSchema): "category": { "type": "string", "description": "The output category. If not specified or if the category is not understood by the client, `console` is assumed.", - "_enum": ["console", "important", "stdout", "stderr", "telemetry"], + "_enum": [ + "console", + "important", + "stdout", + "stderr", + "telemetry" + ], "enumDescriptions": [ "Show the output in the client's default message UI, e.g. a 'debug console'. This category should only be used for informational output from the debugger (as opposed to the debuggee).", "A hint for the client to show the output in the client's UI for important and highly visible information, e.g. as a popup notification. This category should only be used for important messages from the debugger (as opposed to the debuggee). Since this category value is a hint, clients might ignore the hint and assume the `console` category.", "Show the output as normal program output from the debuggee.", "Show the output as error program output from the debuggee.", - "Send the output to telemetry instead of showing it to the user.", - ], + "Send the output to telemetry instead of showing it to the user." + ] + }, + "output": { + "type": "string", + "description": "The output to report." }, - "output": {"type": "string", "description": "The output to report."}, "group": { "type": "string", "description": "Support for keeping an output log organized by grouping related messages.", - "enum": ["start", "startCollapsed", "end"], + "enum": [ + "start", + "startCollapsed", + "end" + ], "enumDescriptions": [ "Start a new group in expanded mode. Subsequent output events are members of the group and should be shown indented.\nThe `output` attribute becomes the name of the group and is not indented.", "Start a new group in collapsed mode. Subsequent output events are members of the group and should be shown indented (as soon as the group is expanded).\nThe `output` attribute becomes the name of the group and is not indented.", - "End the current group and decrease the indentation of subsequent output events.\nA non-empty `output` attribute is shown as the unindented end of the group.", - ], + "End the current group and decrease the indentation of subsequent output events.\nA non-empty `output` attribute is shown as the unindented end of the group." + ] }, "variablesReference": { "type": "integer", - "description": "If an attribute `variablesReference` exists and its value is > 0, the output contains objects which can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + "description": "If an attribute `variablesReference` exists and its value is > 0, the output contains objects which can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "source": { + "description": "The source location where the output was produced.", + "type": "Source" + }, + "line": { + "type": "integer", + "description": "The source location's line where the output was produced." }, - "source": {"description": "The source location where the output was produced.", "type": "Source"}, - "line": {"type": "integer", "description": "The source location's line where the output was produced."}, "column": { "type": "integer", - "description": "The position in `line` where the output was produced. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.", + "description": "The position in `line` where the output was produced. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." }, "data": { - "type": ["array", "boolean", "integer", "null", "number", "object", "string"], - "description": "Additional data to report. For the `telemetry` category the data is sent to telemetry, for the other categories the data is shown in JSON format.", - }, + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Additional data to report. For the `telemetry` category the data is sent to telemetry, for the other categories the data is shown in JSON format." + } } - __refs__ = set(["source"]) + __refs__ = set(['source']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - output, - category=None, - group=None, - variablesReference=None, - source=None, - line=None, - column=None, - data=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, output, category=None, group=None, variablesReference=None, source=None, line=None, column=None, data=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string output: The output to report. :param string category: The output category. If not specified or if the category is not understood by the client, `console` is assumed. @@ -15376,18 +18394,19 @@ class OutputEventBody(BaseSchema): if source is None: self.source = Source() else: - self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source self.line = line self.column = column self.data = data if update_ids_from_dap: self.variablesReference = self._translate_id_from_dap(self.variablesReference) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "variablesReference" in dct: - dct["variablesReference"] = cls._translate_id_from_dap(dct["variablesReference"]) + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_from_dap(dct['variablesReference']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -15403,29 +18422,29 @@ class OutputEventBody(BaseSchema): if variablesReference is not None: variablesReference = self._translate_id_to_dap(variablesReference) dct = { - "output": output, + 'output': output, } if category is not None: - dct["category"] = category + dct['category'] = category if group is not None: - dct["group"] = group + dct['group'] = group if variablesReference is not None: - dct["variablesReference"] = variablesReference + dct['variablesReference'] = variablesReference if source is not None: - dct["source"] = source.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['source'] = source.to_dict(update_ids_to_dap=update_ids_to_dap) if line is not None: - dct["line"] = line + dct['line'] = line if column is not None: - dct["column"] = column + dct['column'] = column if data is not None: - dct["data"] = data + dct['data'] = data dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "variablesReference" in dct: - dct["variablesReference"] = cls._translate_id_to_dap(dct["variablesReference"]) + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_to_dap(dct['variablesReference']) return dct @@ -15438,15 +18457,23 @@ class BreakpointEventBody(BaseSchema): """ __props__ = { - "reason": {"type": "string", "description": "The reason for the event.", "_enum": ["changed", "new", "removed"]}, + "reason": { + "type": "string", + "description": "The reason for the event.", + "_enum": [ + "changed", + "new", + "removed" + ] + }, "breakpoint": { "description": "The `id` attribute is used to find the target breakpoint, the other attributes are used as the new values.", - "type": "Breakpoint", - }, + "type": "Breakpoint" + } } - __refs__ = set(["breakpoint"]) + __refs__ = set(['breakpoint']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, reason, breakpoint, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -15457,17 +18484,16 @@ class BreakpointEventBody(BaseSchema): if breakpoint is None: self.breakpoint = Breakpoint() else: - self.breakpoint = ( - Breakpoint(update_ids_from_dap=update_ids_from_dap, **breakpoint) if breakpoint.__class__ != Breakpoint else breakpoint - ) + self.breakpoint = Breakpoint(update_ids_from_dap=update_ids_from_dap, **breakpoint) if breakpoint.__class__ != Breakpoint else breakpoint self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) reason = self.reason breakpoint = self.breakpoint # noqa (assign to builtin) dct = { - "reason": reason, - "breakpoint": breakpoint.to_dict(update_ids_to_dap=update_ids_to_dap), + 'reason': reason, + 'breakpoint': breakpoint.to_dict(update_ids_to_dap=update_ids_to_dap), } dct.update(self.kwargs) return dct @@ -15482,15 +18508,23 @@ class ModuleEventBody(BaseSchema): """ __props__ = { - "reason": {"type": "string", "description": "The reason for the event.", "enum": ["new", "changed", "removed"]}, + "reason": { + "type": "string", + "description": "The reason for the event.", + "enum": [ + "new", + "changed", + "removed" + ] + }, "module": { "description": "The new, changed, or removed module. In case of `removed` only the module id is used.", - "type": "Module", - }, + "type": "Module" + } } - __refs__ = set(["module"]) + __refs__ = set(['module']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, reason, module, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -15501,15 +18535,16 @@ class ModuleEventBody(BaseSchema): if module is None: self.module = Module() else: - self.module = Module(update_ids_from_dap=update_ids_from_dap, **module) if module.__class__ != Module else module + self.module = Module(update_ids_from_dap=update_ids_from_dap, **module) if module.__class__ != Module else module self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) reason = self.reason module = self.module dct = { - "reason": reason, - "module": module.to_dict(update_ids_to_dap=update_ids_to_dap), + 'reason': reason, + 'module': module.to_dict(update_ids_to_dap=update_ids_to_dap), } dct.update(self.kwargs) return dct @@ -15524,12 +18559,23 @@ class LoadedSourceEventBody(BaseSchema): """ __props__ = { - "reason": {"type": "string", "description": "The reason for the event.", "enum": ["new", "changed", "removed"]}, - "source": {"description": "The new, changed, or removed source.", "type": "Source"}, + "reason": { + "type": "string", + "description": "The reason for the event.", + "enum": [ + "new", + "changed", + "removed" + ] + }, + "source": { + "description": "The new, changed, or removed source.", + "type": "Source" + } } - __refs__ = set(["source"]) + __refs__ = set(['source']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, reason, source, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -15540,15 +18586,16 @@ class LoadedSourceEventBody(BaseSchema): if source is None: self.source = Source() else: - self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source + self.source = Source(update_ids_from_dap=update_ids_from_dap, **source) if source.__class__ != Source else source self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) reason = self.reason source = self.source dct = { - "reason": reason, - "source": source.to_dict(update_ids_to_dap=update_ids_to_dap), + 'reason': reason, + 'source': source.to_dict(update_ids_to_dap=update_ids_to_dap), } dct.update(self.kwargs) return dct @@ -15565,35 +18612,40 @@ class ProcessEventBody(BaseSchema): __props__ = { "name": { "type": "string", - "description": "The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js.", + "description": "The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js." }, "systemProcessId": { "type": "integer", - "description": "The system process id of the debugged process. This property is missing for non-system processes.", + "description": "The system process id of the debugged process. This property is missing for non-system processes." + }, + "isLocalProcess": { + "type": "boolean", + "description": "If True, the process is running on the same computer as the debug adapter." }, - "isLocalProcess": {"type": "boolean", "description": "If True, the process is running on the same computer as the debug adapter."}, "startMethod": { "type": "string", - "enum": ["launch", "attach", "attachForSuspendedLaunch"], + "enum": [ + "launch", + "attach", + "attachForSuspendedLaunch" + ], "description": "Describes how the debug engine started debugging this process.", "enumDescriptions": [ "Process was launched under the debugger.", "Debugger attached to an existing process.", - "A project launcher component has launched a new process in a suspended state and then asked the debugger to attach.", - ], + "A project launcher component has launched a new process in a suspended state and then asked the debugger to attach." + ] }, "pointerSize": { "type": "integer", - "description": "The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display.", - }, + "description": "The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, name, systemProcessId=None, isLocalProcess=None, startMethod=None, pointerSize=None, update_ids_from_dap=False, **kwargs - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, name, systemProcessId=None, isLocalProcess=None, startMethod=None, pointerSize=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string name: The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js. :param integer systemProcessId: The system process id of the debugged process. This property is missing for non-system processes. @@ -15608,6 +18660,7 @@ class ProcessEventBody(BaseSchema): self.pointerSize = pointerSize self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) name = self.name systemProcessId = self.systemProcessId @@ -15615,16 +18668,16 @@ class ProcessEventBody(BaseSchema): startMethod = self.startMethod pointerSize = self.pointerSize dct = { - "name": name, + 'name': name, } if systemProcessId is not None: - dct["systemProcessId"] = systemProcessId + dct['systemProcessId'] = systemProcessId if isLocalProcess is not None: - dct["isLocalProcess"] = isLocalProcess + dct['isLocalProcess'] = isLocalProcess if startMethod is not None: - dct["startMethod"] = startMethod + dct['startMethod'] = startMethod if pointerSize is not None: - dct["pointerSize"] = pointerSize + dct['pointerSize'] = pointerSize dct.update(self.kwargs) return dct @@ -15637,10 +18690,15 @@ class CapabilitiesEventBody(BaseSchema): Note: automatically generated code. Do not edit manually. """ - __props__ = {"capabilities": {"description": "The set of updated capabilities.", "type": "Capabilities"}} - __refs__ = set(["capabilities"]) + __props__ = { + "capabilities": { + "description": "The set of updated capabilities.", + "type": "Capabilities" + } + } + __refs__ = set(['capabilities']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, capabilities, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -15649,17 +18707,14 @@ class CapabilitiesEventBody(BaseSchema): if capabilities is None: self.capabilities = Capabilities() else: - self.capabilities = ( - Capabilities(update_ids_from_dap=update_ids_from_dap, **capabilities) - if capabilities.__class__ != Capabilities - else capabilities - ) + self.capabilities = Capabilities(update_ids_from_dap=update_ids_from_dap, **capabilities) if capabilities.__class__ != Capabilities else capabilities self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) capabilities = self.capabilities dct = { - "capabilities": capabilities.to_dict(update_ids_to_dap=update_ids_to_dap), + 'capabilities': capabilities.to_dict(update_ids_to_dap=update_ids_to_dap), } dct.update(self.kwargs) return dct @@ -15676,33 +18731,34 @@ class ProgressStartEventBody(BaseSchema): __props__ = { "progressId": { "type": "string", - "description": "An ID that can be used in subsequent `progressUpdate` and `progressEnd` events to make them refer to the same progress reporting.\nIDs must be unique within a debug session.", + "description": "An ID that can be used in subsequent `progressUpdate` and `progressEnd` events to make them refer to the same progress reporting.\nIDs must be unique within a debug session." }, "title": { "type": "string", - "description": "Short title of the progress reporting. Shown in the UI to describe the long running operation.", + "description": "Short title of the progress reporting. Shown in the UI to describe the long running operation." }, "requestId": { "type": "integer", - "description": "The request ID that this progress report is related to. If specified a debug adapter is expected to emit progress events for the long running request until the request has been either completed or cancelled.\nIf the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter.", + "description": "The request ID that this progress report is related to. If specified a debug adapter is expected to emit progress events for the long running request until the request has been either completed or cancelled.\nIf the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter." }, "cancellable": { "type": "boolean", - "description": "If True, the request that reports progress may be cancelled with a `cancel` request.\nSo this property basically controls whether the client should use UX that supports cancellation.\nClients that don't support cancellation are allowed to ignore the setting.", + "description": "If True, the request that reports progress may be cancelled with a `cancel` request.\nSo this property basically controls whether the client should use UX that supports cancellation.\nClients that don't support cancellation are allowed to ignore the setting." + }, + "message": { + "type": "string", + "description": "More detailed progress message." }, - "message": {"type": "string", "description": "More detailed progress message."}, "percentage": { "type": "number", - "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown.", - }, + "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, progressId, title, requestId=None, cancellable=None, message=None, percentage=None, update_ids_from_dap=False, **kwargs - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, progressId, title, requestId=None, cancellable=None, message=None, percentage=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string progressId: An ID that can be used in subsequent `progressUpdate` and `progressEnd` events to make them refer to the same progress reporting. IDs must be unique within a debug session. @@ -15723,6 +18779,7 @@ class ProgressStartEventBody(BaseSchema): self.percentage = percentage self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) progressId = self.progressId title = self.title @@ -15731,17 +18788,17 @@ class ProgressStartEventBody(BaseSchema): message = self.message percentage = self.percentage dct = { - "progressId": progressId, - "title": title, + 'progressId': progressId, + 'title': title, } if requestId is not None: - dct["requestId"] = requestId + dct['requestId'] = requestId if cancellable is not None: - dct["cancellable"] = cancellable + dct['cancellable'] = cancellable if message is not None: - dct["message"] = message + dct['message'] = message if percentage is not None: - dct["percentage"] = percentage + dct['percentage'] = percentage dct.update(self.kwargs) return dct @@ -15755,16 +18812,22 @@ class ProgressUpdateEventBody(BaseSchema): """ __props__ = { - "progressId": {"type": "string", "description": "The ID that was introduced in the initial `progressStart` event."}, - "message": {"type": "string", "description": "More detailed progress message. If omitted, the previous message (if any) is used."}, + "progressId": { + "type": "string", + "description": "The ID that was introduced in the initial `progressStart` event." + }, + "message": { + "type": "string", + "description": "More detailed progress message. If omitted, the previous message (if any) is used." + }, "percentage": { "type": "number", - "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown.", - }, + "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, progressId, message=None, percentage=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -15777,17 +18840,18 @@ class ProgressUpdateEventBody(BaseSchema): self.percentage = percentage self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) progressId = self.progressId message = self.message percentage = self.percentage dct = { - "progressId": progressId, + 'progressId': progressId, } if message is not None: - dct["message"] = message + dct['message'] = message if percentage is not None: - dct["percentage"] = percentage + dct['percentage'] = percentage dct.update(self.kwargs) return dct @@ -15801,12 +18865,18 @@ class ProgressEndEventBody(BaseSchema): """ __props__ = { - "progressId": {"type": "string", "description": "The ID that was introduced in the initial `ProgressStartEvent`."}, - "message": {"type": "string", "description": "More detailed progress message. If omitted, the previous message (if any) is used."}, + "progressId": { + "type": "string", + "description": "The ID that was introduced in the initial `ProgressStartEvent`." + }, + "message": { + "type": "string", + "description": "More detailed progress message. If omitted, the previous message (if any) is used." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, progressId, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -15817,14 +18887,15 @@ class ProgressEndEventBody(BaseSchema): self.message = message self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) progressId = self.progressId message = self.message dct = { - "progressId": progressId, + 'progressId': progressId, } if message is not None: - dct["message"] = message + dct['message'] = message dct.update(self.kwargs) return dct @@ -15841,17 +18912,22 @@ class InvalidatedEventBody(BaseSchema): "areas": { "type": "array", "description": "Set of logical areas that got invalidated. This property has a hint characteristic: a client can only be expected to make a 'best effort' in honoring the areas but there are no guarantees. If this property is missing, empty, or if values are not understood, the client should assume a single value `all`.", - "items": {"$ref": "#/definitions/InvalidatedAreas"}, + "items": { + "$ref": "#/definitions/InvalidatedAreas" + } + }, + "threadId": { + "type": "integer", + "description": "If specified, the client only needs to refetch data related to this thread." }, - "threadId": {"type": "integer", "description": "If specified, the client only needs to refetch data related to this thread."}, "stackFrameId": { "type": "integer", - "description": "If specified, the client only needs to refetch data related to this stack frame (and the `threadId` is ignored).", - }, + "description": "If specified, the client only needs to refetch data related to this stack frame (and the `threadId` is ignored)." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, areas=None, threadId=None, stackFrameId=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -15868,11 +18944,12 @@ class InvalidatedEventBody(BaseSchema): if update_ids_from_dap: self.threadId = self._translate_id_from_dap(self.threadId) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_from_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_from_dap(dct['threadId']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -15884,20 +18961,21 @@ class InvalidatedEventBody(BaseSchema): if update_ids_to_dap: if threadId is not None: threadId = self._translate_id_to_dap(threadId) - dct = {} + dct = { + } if areas is not None: - dct["areas"] = [InvalidatedAreas.update_dict_ids_to_dap(o) for o in areas] if (update_ids_to_dap and areas) else areas + dct['areas'] = [InvalidatedAreas.update_dict_ids_to_dap(o) for o in areas] if (update_ids_to_dap and areas) else areas if threadId is not None: - dct["threadId"] = threadId + dct['threadId'] = threadId if stackFrameId is not None: - dct["stackFrameId"] = stackFrameId + dct['stackFrameId'] = stackFrameId dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "threadId" in dct: - dct["threadId"] = cls._translate_id_to_dap(dct["threadId"]) + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_to_dap(dct['threadId']) return dct @@ -15910,13 +18988,22 @@ class MemoryEventBody(BaseSchema): """ __props__ = { - "memoryReference": {"type": "string", "description": "Memory reference of a memory range that has been updated."}, - "offset": {"type": "integer", "description": "Starting offset in bytes where memory has been updated. Can be negative."}, - "count": {"type": "integer", "description": "Number of bytes updated."}, + "memoryReference": { + "type": "string", + "description": "Memory reference of a memory range that has been updated." + }, + "offset": { + "type": "integer", + "description": "Starting offset in bytes where memory has been updated. Can be negative." + }, + "count": { + "type": "integer", + "description": "Number of bytes updated." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, memoryReference, offset, count, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -15929,14 +19016,15 @@ class MemoryEventBody(BaseSchema): self.count = count self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) memoryReference = self.memoryReference offset = self.offset count = self.count dct = { - "memoryReference": memoryReference, - "offset": offset, - "count": count, + 'memoryReference': memoryReference, + 'offset': offset, + 'count': count, } dct.update(self.kwargs) return dct @@ -15953,15 +19041,19 @@ class RunInTerminalRequestArgumentsEnv(BaseSchema): __props__ = {} __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) - """ """ - + """ + + """ + self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) - dct = {} + dct = { + } dct.update(self.kwargs) return dct @@ -15975,15 +19067,18 @@ class RunInTerminalResponseBody(BaseSchema): """ __props__ = { - "processId": {"type": "integer", "description": "The process ID. The value should be less than or equal to 2147483647 (2^31-1)."}, + "processId": { + "type": "integer", + "description": "The process ID. The value should be less than or equal to 2147483647 (2^31-1)." + }, "shellProcessId": { "type": "integer", - "description": "The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1).", - }, + "description": "The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1)." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, processId=None, shellProcessId=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -15994,14 +19089,16 @@ class RunInTerminalResponseBody(BaseSchema): self.shellProcessId = shellProcessId self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) processId = self.processId shellProcessId = self.shellProcessId - dct = {} + dct = { + } if processId is not None: - dct["processId"] = processId + dct['processId'] = processId if shellProcessId is not None: - dct["shellProcessId"] = shellProcessId + dct['shellProcessId'] = shellProcessId dct.update(self.kwargs) return dct @@ -16017,15 +19114,19 @@ class StartDebuggingRequestArgumentsConfiguration(BaseSchema): __props__ = {} __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) - """ """ - + """ + + """ + self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) - dct = {} + dct = { + } dct.update(self.kwargs) return dct @@ -16041,13 +19142,15 @@ class BreakpointLocationsResponseBody(BaseSchema): __props__ = { "breakpoints": { "type": "array", - "items": {"$ref": "#/definitions/BreakpointLocation"}, - "description": "Sorted set of possible breakpoint locations.", + "items": { + "$ref": "#/definitions/BreakpointLocation" + }, + "description": "Sorted set of possible breakpoint locations." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -16059,14 +19162,13 @@ class BreakpointLocationsResponseBody(BaseSchema): BreakpointLocation.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) breakpoints = self.breakpoints if breakpoints and hasattr(breakpoints[0], "to_dict"): breakpoints = [x.to_dict() for x in breakpoints] dct = { - "breakpoints": [BreakpointLocation.update_dict_ids_to_dap(o) for o in breakpoints] - if (update_ids_to_dap and breakpoints) - else breakpoints, + 'breakpoints': [BreakpointLocation.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints, } dct.update(self.kwargs) return dct @@ -16083,13 +19185,15 @@ class SetBreakpointsResponseBody(BaseSchema): __props__ = { "breakpoints": { "type": "array", - "items": {"$ref": "#/definitions/Breakpoint"}, - "description": "Information about the breakpoints.\nThe array elements are in the same order as the elements of the `breakpoints` (or the deprecated `lines`) array in the arguments.", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints.\nThe array elements are in the same order as the elements of the `breakpoints` (or the deprecated `lines`) array in the arguments." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -16102,14 +19206,13 @@ class SetBreakpointsResponseBody(BaseSchema): Breakpoint.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) breakpoints = self.breakpoints if breakpoints and hasattr(breakpoints[0], "to_dict"): breakpoints = [x.to_dict() for x in breakpoints] dct = { - "breakpoints": [Breakpoint.update_dict_ids_to_dap(o) for o in breakpoints] - if (update_ids_to_dap and breakpoints) - else breakpoints, + 'breakpoints': [Breakpoint.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints, } dct.update(self.kwargs) return dct @@ -16126,13 +19229,15 @@ class SetFunctionBreakpointsResponseBody(BaseSchema): __props__ = { "breakpoints": { "type": "array", - "items": {"$ref": "#/definitions/Breakpoint"}, - "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array.", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -16144,14 +19249,13 @@ class SetFunctionBreakpointsResponseBody(BaseSchema): Breakpoint.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) breakpoints = self.breakpoints if breakpoints and hasattr(breakpoints[0], "to_dict"): breakpoints = [x.to_dict() for x in breakpoints] dct = { - "breakpoints": [Breakpoint.update_dict_ids_to_dap(o) for o in breakpoints] - if (update_ids_to_dap and breakpoints) - else breakpoints, + 'breakpoints': [Breakpoint.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints, } dct.update(self.kwargs) return dct @@ -16168,13 +19272,15 @@ class SetExceptionBreakpointsResponseBody(BaseSchema): __props__ = { "breakpoints": { "type": "array", - "items": {"$ref": "#/definitions/Breakpoint"}, - "description": "Information about the exception breakpoints or filters.\nThe breakpoints returned are in the same order as the elements of the `filters`, `filterOptions`, `exceptionOptions` arrays in the arguments. If both `filters` and `filterOptions` are given, the returned array must start with `filters` information first, followed by `filterOptions` information.", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the exception breakpoints or filters.\nThe breakpoints returned are in the same order as the elements of the `filters`, `filterOptions`, `exceptionOptions` arrays in the arguments. If both `filters` and `filterOptions` are given, the returned array must start with `filters` information first, followed by `filterOptions` information." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, breakpoints=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -16187,15 +19293,15 @@ class SetExceptionBreakpointsResponseBody(BaseSchema): Breakpoint.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) breakpoints = self.breakpoints if breakpoints and hasattr(breakpoints[0], "to_dict"): breakpoints = [x.to_dict() for x in breakpoints] - dct = {} + dct = { + } if breakpoints is not None: - dct["breakpoints"] = ( - [Breakpoint.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints - ) + dct['breakpoints'] = [Breakpoint.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints dct.update(self.kwargs) return dct @@ -16210,26 +19316,31 @@ class DataBreakpointInfoResponseBody(BaseSchema): __props__ = { "dataId": { - "type": ["string", "null"], - "description": "An identifier for the data on which a data breakpoint can be registered with the `setDataBreakpoints` request or null if no data breakpoint is available. If a `variablesReference` or `frameId` is passed, the `dataId` is valid in the current suspended state, otherwise it's valid indefinitely. See 'Lifetime of Object References' in the Overview section for details. Breakpoints set using the `dataId` in the `setDataBreakpoints` request may outlive the lifetime of the associated `dataId`.", + "type": [ + "string", + "null" + ], + "description": "An identifier for the data on which a data breakpoint can be registered with the `setDataBreakpoints` request or null if no data breakpoint is available. If a `variablesReference` or `frameId` is passed, the `dataId` is valid in the current suspended state, otherwise it's valid indefinitely. See 'Lifetime of Object References' in the Overview section for details. Breakpoints set using the `dataId` in the `setDataBreakpoints` request may outlive the lifetime of the associated `dataId`." }, "description": { "type": "string", - "description": "UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available.", + "description": "UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available." }, "accessTypes": { "type": "array", - "items": {"$ref": "#/definitions/DataBreakpointAccessType"}, - "description": "Attribute lists the available access types for a potential data breakpoint. A UI client could surface this information.", + "items": { + "$ref": "#/definitions/DataBreakpointAccessType" + }, + "description": "Attribute lists the available access types for a potential data breakpoint. A UI client could surface this information." }, "canPersist": { "type": "boolean", - "description": "Attribute indicates that a potential data breakpoint could be persisted across sessions.", - }, + "description": "Attribute indicates that a potential data breakpoint could be persisted across sessions." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, dataId, description, accessTypes=None, canPersist=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -16247,6 +19358,7 @@ class DataBreakpointInfoResponseBody(BaseSchema): self.canPersist = canPersist self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) dataId = self.dataId description = self.description @@ -16255,17 +19367,13 @@ class DataBreakpointInfoResponseBody(BaseSchema): accessTypes = [x.to_dict() for x in accessTypes] canPersist = self.canPersist dct = { - "dataId": dataId, - "description": description, + 'dataId': dataId, + 'description': description, } if accessTypes is not None: - dct["accessTypes"] = ( - [DataBreakpointAccessType.update_dict_ids_to_dap(o) for o in accessTypes] - if (update_ids_to_dap and accessTypes) - else accessTypes - ) + dct['accessTypes'] = [DataBreakpointAccessType.update_dict_ids_to_dap(o) for o in accessTypes] if (update_ids_to_dap and accessTypes) else accessTypes if canPersist is not None: - dct["canPersist"] = canPersist + dct['canPersist'] = canPersist dct.update(self.kwargs) return dct @@ -16281,13 +19389,15 @@ class SetDataBreakpointsResponseBody(BaseSchema): __props__ = { "breakpoints": { "type": "array", - "items": {"$ref": "#/definitions/Breakpoint"}, - "description": "Information about the data breakpoints. The array elements correspond to the elements of the input argument `breakpoints` array.", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the data breakpoints. The array elements correspond to the elements of the input argument `breakpoints` array." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -16299,14 +19409,13 @@ class SetDataBreakpointsResponseBody(BaseSchema): Breakpoint.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) breakpoints = self.breakpoints if breakpoints and hasattr(breakpoints[0], "to_dict"): breakpoints = [x.to_dict() for x in breakpoints] dct = { - "breakpoints": [Breakpoint.update_dict_ids_to_dap(o) for o in breakpoints] - if (update_ids_to_dap and breakpoints) - else breakpoints, + 'breakpoints': [Breakpoint.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints, } dct.update(self.kwargs) return dct @@ -16323,13 +19432,15 @@ class SetInstructionBreakpointsResponseBody(BaseSchema): __props__ = { "breakpoints": { "type": "array", - "items": {"$ref": "#/definitions/Breakpoint"}, - "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array.", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -16341,14 +19452,13 @@ class SetInstructionBreakpointsResponseBody(BaseSchema): Breakpoint.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) breakpoints = self.breakpoints if breakpoints and hasattr(breakpoints[0], "to_dict"): breakpoints = [x.to_dict() for x in breakpoints] dct = { - "breakpoints": [Breakpoint.update_dict_ids_to_dap(o) for o in breakpoints] - if (update_ids_to_dap and breakpoints) - else breakpoints, + 'breakpoints': [Breakpoint.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints, } dct.update(self.kwargs) return dct @@ -16365,12 +19475,12 @@ class ContinueResponseBody(BaseSchema): __props__ = { "allThreadsContinued": { "type": "boolean", - "description": "The value True (or a missing property) signals to the client that all threads have been resumed. The value false indicates that not all threads were resumed.", + "description": "The value True (or a missing property) signals to the client that all threads have been resumed. The value false indicates that not all threads were resumed." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, allThreadsContinued=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -16379,11 +19489,13 @@ class ContinueResponseBody(BaseSchema): self.allThreadsContinued = allThreadsContinued self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) allThreadsContinued = self.allThreadsContinued - dct = {} + dct = { + } if allThreadsContinued is not None: - dct["allThreadsContinued"] = allThreadsContinued + dct['allThreadsContinued'] = allThreadsContinued dct.update(self.kwargs) return dct @@ -16399,17 +19511,19 @@ class StackTraceResponseBody(BaseSchema): __props__ = { "stackFrames": { "type": "array", - "items": {"$ref": "#/definitions/StackFrame"}, - "description": "The frames of the stack frame. If the array has length zero, there are no stack frames available.\nThis means that there is no location information available.", + "items": { + "$ref": "#/definitions/StackFrame" + }, + "description": "The frames of the stack frame. If the array has length zero, there are no stack frames available.\nThis means that there is no location information available." }, "totalFrames": { "type": "integer", - "description": "The total number of frames available in the stack. If omitted or if `totalFrames` is larger than the available frames, a client is expected to request frames until a request returns less frames than requested (which indicates the end of the stack). Returning monotonically increasing `totalFrames` values for subsequent requests can be used to enforce paging in the client.", - }, + "description": "The total number of frames available in the stack. If omitted or if `totalFrames` is larger than the available frames, a client is expected to request frames until a request returns less frames than requested (which indicates the end of the stack). Returning monotonically increasing `totalFrames` values for subsequent requests can be used to enforce paging in the client." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, stackFrames, totalFrames=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -16424,18 +19538,17 @@ class StackTraceResponseBody(BaseSchema): self.totalFrames = totalFrames self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) stackFrames = self.stackFrames if stackFrames and hasattr(stackFrames[0], "to_dict"): stackFrames = [x.to_dict() for x in stackFrames] totalFrames = self.totalFrames dct = { - "stackFrames": [StackFrame.update_dict_ids_to_dap(o) for o in stackFrames] - if (update_ids_to_dap and stackFrames) - else stackFrames, + 'stackFrames': [StackFrame.update_dict_ids_to_dap(o) for o in stackFrames] if (update_ids_to_dap and stackFrames) else stackFrames, } if totalFrames is not None: - dct["totalFrames"] = totalFrames + dct['totalFrames'] = totalFrames dct.update(self.kwargs) return dct @@ -16451,13 +19564,15 @@ class ScopesResponseBody(BaseSchema): __props__ = { "scopes": { "type": "array", - "items": {"$ref": "#/definitions/Scope"}, - "description": "The scopes of the stack frame. If the array has length zero, there are no scopes available.", + "items": { + "$ref": "#/definitions/Scope" + }, + "description": "The scopes of the stack frame. If the array has length zero, there are no scopes available." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, scopes, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -16469,12 +19584,13 @@ class ScopesResponseBody(BaseSchema): Scope.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) scopes = self.scopes if scopes and hasattr(scopes[0], "to_dict"): scopes = [x.to_dict() for x in scopes] dct = { - "scopes": [Scope.update_dict_ids_to_dap(o) for o in scopes] if (update_ids_to_dap and scopes) else scopes, + 'scopes': [Scope.update_dict_ids_to_dap(o) for o in scopes] if (update_ids_to_dap and scopes) else scopes, } dct.update(self.kwargs) return dct @@ -16491,13 +19607,15 @@ class VariablesResponseBody(BaseSchema): __props__ = { "variables": { "type": "array", - "items": {"$ref": "#/definitions/Variable"}, - "description": "All (or a range) of variables for the given variable reference.", + "items": { + "$ref": "#/definitions/Variable" + }, + "description": "All (or a range) of variables for the given variable reference." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, variables, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -16509,12 +19627,13 @@ class VariablesResponseBody(BaseSchema): Variable.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) variables = self.variables if variables and hasattr(variables[0], "to_dict"): variables = [x.to_dict() for x in variables] dct = { - "variables": [Variable.update_dict_ids_to_dap(o) for o in variables] if (update_ids_to_dap and variables) else variables, + 'variables': [Variable.update_dict_ids_to_dap(o) for o in variables] if (update_ids_to_dap and variables) else variables, } dct.update(self.kwargs) return dct @@ -16529,40 +19648,36 @@ class SetVariableResponseBody(BaseSchema): """ __props__ = { - "value": {"type": "string", "description": "The new value of the variable."}, - "type": {"type": "string", "description": "The type of the new value. Typically shown in the UI when hovering over the value."}, + "value": { + "type": "string", + "description": "The new value of the variable." + }, + "type": { + "type": "string", + "description": "The type of the new value. Typically shown in the UI when hovering over the value." + }, "variablesReference": { "type": "integer", - "description": "If `variablesReference` is > 0, the new value is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + "description": "If `variablesReference` is > 0, the new value is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." }, "namedVariables": { "type": "integer", - "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "indexedVariables": { "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "memoryReference": { "type": "string", - "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True.", - }, + "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - value, - type=None, - variablesReference=None, - namedVariables=None, - indexedVariables=None, - memoryReference=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, value, type=None, variablesReference=None, namedVariables=None, indexedVariables=None, memoryReference=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string value: The new value of the variable. :param string type: The type of the new value. Typically shown in the UI when hovering over the value. @@ -16586,11 +19701,12 @@ class SetVariableResponseBody(BaseSchema): if update_ids_from_dap: self.variablesReference = self._translate_id_from_dap(self.variablesReference) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "variablesReference" in dct: - dct["variablesReference"] = cls._translate_id_from_dap(dct["variablesReference"]) + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_from_dap(dct['variablesReference']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -16604,25 +19720,25 @@ class SetVariableResponseBody(BaseSchema): if variablesReference is not None: variablesReference = self._translate_id_to_dap(variablesReference) dct = { - "value": value, + 'value': value, } if type is not None: - dct["type"] = type + dct['type'] = type if variablesReference is not None: - dct["variablesReference"] = variablesReference + dct['variablesReference'] = variablesReference if namedVariables is not None: - dct["namedVariables"] = namedVariables + dct['namedVariables'] = namedVariables if indexedVariables is not None: - dct["indexedVariables"] = indexedVariables + dct['indexedVariables'] = indexedVariables if memoryReference is not None: - dct["memoryReference"] = memoryReference + dct['memoryReference'] = memoryReference dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "variablesReference" in dct: - dct["variablesReference"] = cls._translate_id_to_dap(dct["variablesReference"]) + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_to_dap(dct['variablesReference']) return dct @@ -16635,12 +19751,18 @@ class SourceResponseBody(BaseSchema): """ __props__ = { - "content": {"type": "string", "description": "Content of the source reference."}, - "mimeType": {"type": "string", "description": "Content type (MIME type) of the source."}, + "content": { + "type": "string", + "description": "Content of the source reference." + }, + "mimeType": { + "type": "string", + "description": "Content type (MIME type) of the source." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, content, mimeType=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -16651,14 +19773,15 @@ class SourceResponseBody(BaseSchema): self.mimeType = mimeType self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) content = self.content mimeType = self.mimeType dct = { - "content": content, + 'content': content, } if mimeType is not None: - dct["mimeType"] = mimeType + dct['mimeType'] = mimeType dct.update(self.kwargs) return dct @@ -16671,10 +19794,18 @@ class ThreadsResponseBody(BaseSchema): Note: automatically generated code. Do not edit manually. """ - __props__ = {"threads": {"type": "array", "items": {"$ref": "#/definitions/Thread"}, "description": "All threads."}} + __props__ = { + "threads": { + "type": "array", + "items": { + "$ref": "#/definitions/Thread" + }, + "description": "All threads." + } + } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, threads, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -16686,12 +19817,13 @@ class ThreadsResponseBody(BaseSchema): Thread.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) threads = self.threads if threads and hasattr(threads[0], "to_dict"): threads = [x.to_dict() for x in threads] dct = { - "threads": [Thread.update_dict_ids_to_dap(o) for o in threads] if (update_ids_to_dap and threads) else threads, + 'threads': [Thread.update_dict_ids_to_dap(o) for o in threads] if (update_ids_to_dap and threads) else threads, } dct.update(self.kwargs) return dct @@ -16706,12 +19838,21 @@ class ModulesResponseBody(BaseSchema): """ __props__ = { - "modules": {"type": "array", "items": {"$ref": "#/definitions/Module"}, "description": "All modules or range of modules."}, - "totalModules": {"type": "integer", "description": "The total number of modules available."}, + "modules": { + "type": "array", + "items": { + "$ref": "#/definitions/Module" + }, + "description": "All modules or range of modules." + }, + "totalModules": { + "type": "integer", + "description": "The total number of modules available." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, modules, totalModules=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -16725,16 +19866,17 @@ class ModulesResponseBody(BaseSchema): self.totalModules = totalModules self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) modules = self.modules if modules and hasattr(modules[0], "to_dict"): modules = [x.to_dict() for x in modules] totalModules = self.totalModules dct = { - "modules": [Module.update_dict_ids_to_dap(o) for o in modules] if (update_ids_to_dap and modules) else modules, + 'modules': [Module.update_dict_ids_to_dap(o) for o in modules] if (update_ids_to_dap and modules) else modules, } if totalModules is not None: - dct["totalModules"] = totalModules + dct['totalModules'] = totalModules dct.update(self.kwargs) return dct @@ -16747,10 +19889,18 @@ class LoadedSourcesResponseBody(BaseSchema): Note: automatically generated code. Do not edit manually. """ - __props__ = {"sources": {"type": "array", "items": {"$ref": "#/definitions/Source"}, "description": "Set of loaded sources."}} + __props__ = { + "sources": { + "type": "array", + "items": { + "$ref": "#/definitions/Source" + }, + "description": "Set of loaded sources." + } + } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, sources, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -16762,12 +19912,13 @@ class LoadedSourcesResponseBody(BaseSchema): Source.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) sources = self.sources if sources and hasattr(sources[0], "to_dict"): sources = [x.to_dict() for x in sources] dct = { - "sources": [Source.update_dict_ids_to_dap(o) for o in sources] if (update_ids_to_dap and sources) else sources, + 'sources': [Source.update_dict_ids_to_dap(o) for o in sources] if (update_ids_to_dap and sources) else sources, } dct.update(self.kwargs) return dct @@ -16782,48 +19933,40 @@ class EvaluateResponseBody(BaseSchema): """ __props__ = { - "result": {"type": "string", "description": "The result of the evaluate request."}, + "result": { + "type": "string", + "description": "The result of the evaluate request." + }, "type": { "type": "string", - "description": "The type of the evaluate result.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is True.", + "description": "The type of the evaluate result.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is True." }, "presentationHint": { "description": "Properties of an evaluate result that can be used to determine how to render the result in the UI.", - "type": "VariablePresentationHint", + "type": "VariablePresentationHint" }, "variablesReference": { "type": "integer", - "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." }, "namedVariables": { "type": "integer", - "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "indexedVariables": { "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "memoryReference": { "type": "string", - "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True.", - }, + "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True." + } } - __refs__ = set(["presentationHint"]) + __refs__ = set(['presentationHint']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - result, - variablesReference, - type=None, - presentationHint=None, - namedVariables=None, - indexedVariables=None, - memoryReference=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, result, variablesReference, type=None, presentationHint=None, namedVariables=None, indexedVariables=None, memoryReference=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string result: The result of the evaluate request. :param integer variablesReference: If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. @@ -16846,22 +19989,19 @@ class EvaluateResponseBody(BaseSchema): if presentationHint is None: self.presentationHint = VariablePresentationHint() else: - self.presentationHint = ( - VariablePresentationHint(update_ids_from_dap=update_ids_from_dap, **presentationHint) - if presentationHint.__class__ != VariablePresentationHint - else presentationHint - ) + self.presentationHint = VariablePresentationHint(update_ids_from_dap=update_ids_from_dap, **presentationHint) if presentationHint.__class__ != VariablePresentationHint else presentationHint self.namedVariables = namedVariables self.indexedVariables = indexedVariables self.memoryReference = memoryReference if update_ids_from_dap: self.variablesReference = self._translate_id_from_dap(self.variablesReference) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "variablesReference" in dct: - dct["variablesReference"] = cls._translate_id_from_dap(dct["variablesReference"]) + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_from_dap(dct['variablesReference']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -16876,26 +20016,26 @@ class EvaluateResponseBody(BaseSchema): if variablesReference is not None: variablesReference = self._translate_id_to_dap(variablesReference) dct = { - "result": result, - "variablesReference": variablesReference, + 'result': result, + 'variablesReference': variablesReference, } if type is not None: - dct["type"] = type + dct['type'] = type if presentationHint is not None: - dct["presentationHint"] = presentationHint.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['presentationHint'] = presentationHint.to_dict(update_ids_to_dap=update_ids_to_dap) if namedVariables is not None: - dct["namedVariables"] = namedVariables + dct['namedVariables'] = namedVariables if indexedVariables is not None: - dct["indexedVariables"] = indexedVariables + dct['indexedVariables'] = indexedVariables if memoryReference is not None: - dct["memoryReference"] = memoryReference + dct['memoryReference'] = memoryReference dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "variablesReference" in dct: - dct["variablesReference"] = cls._translate_id_to_dap(dct["variablesReference"]) + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_to_dap(dct['variablesReference']) return dct @@ -16908,48 +20048,40 @@ class SetExpressionResponseBody(BaseSchema): """ __props__ = { - "value": {"type": "string", "description": "The new value of the expression."}, + "value": { + "type": "string", + "description": "The new value of the expression." + }, "type": { "type": "string", - "description": "The type of the value.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is True.", + "description": "The type of the value.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is True." }, "presentationHint": { "description": "Properties of a value that can be used to determine how to render the result in the UI.", - "type": "VariablePresentationHint", + "type": "VariablePresentationHint" }, "variablesReference": { "type": "integer", - "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.", + "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." }, "namedVariables": { "type": "integer", - "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "indexedVariables": { "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1).", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "memoryReference": { "type": "string", - "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True.", - }, + "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is True." + } } - __refs__ = set(["presentationHint"]) + __refs__ = set(['presentationHint']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__( - self, - value, - type=None, - presentationHint=None, - variablesReference=None, - namedVariables=None, - indexedVariables=None, - memoryReference=None, - update_ids_from_dap=False, - **kwargs, - ): # noqa (update_ids_from_dap may be unused) + def __init__(self, value, type=None, presentationHint=None, variablesReference=None, namedVariables=None, indexedVariables=None, memoryReference=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string value: The new value of the expression. :param string type: The type of the value. @@ -16971,11 +20103,7 @@ class SetExpressionResponseBody(BaseSchema): if presentationHint is None: self.presentationHint = VariablePresentationHint() else: - self.presentationHint = ( - VariablePresentationHint(update_ids_from_dap=update_ids_from_dap, **presentationHint) - if presentationHint.__class__ != VariablePresentationHint - else presentationHint - ) + self.presentationHint = VariablePresentationHint(update_ids_from_dap=update_ids_from_dap, **presentationHint) if presentationHint.__class__ != VariablePresentationHint else presentationHint self.variablesReference = variablesReference self.namedVariables = namedVariables self.indexedVariables = indexedVariables @@ -16983,11 +20111,12 @@ class SetExpressionResponseBody(BaseSchema): if update_ids_from_dap: self.variablesReference = self._translate_id_from_dap(self.variablesReference) self.kwargs = kwargs - + + @classmethod def update_dict_ids_from_dap(cls, dct): - if "variablesReference" in dct: - dct["variablesReference"] = cls._translate_id_from_dap(dct["variablesReference"]) + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_from_dap(dct['variablesReference']) return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) @@ -17002,27 +20131,27 @@ class SetExpressionResponseBody(BaseSchema): if variablesReference is not None: variablesReference = self._translate_id_to_dap(variablesReference) dct = { - "value": value, + 'value': value, } if type is not None: - dct["type"] = type + dct['type'] = type if presentationHint is not None: - dct["presentationHint"] = presentationHint.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['presentationHint'] = presentationHint.to_dict(update_ids_to_dap=update_ids_to_dap) if variablesReference is not None: - dct["variablesReference"] = variablesReference + dct['variablesReference'] = variablesReference if namedVariables is not None: - dct["namedVariables"] = namedVariables + dct['namedVariables'] = namedVariables if indexedVariables is not None: - dct["indexedVariables"] = indexedVariables + dct['indexedVariables'] = indexedVariables if memoryReference is not None: - dct["memoryReference"] = memoryReference + dct['memoryReference'] = memoryReference dct.update(self.kwargs) - return dct - + return dct + @classmethod def update_dict_ids_to_dap(cls, dct): - if "variablesReference" in dct: - dct["variablesReference"] = cls._translate_id_to_dap(dct["variablesReference"]) + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_to_dap(dct['variablesReference']) return dct @@ -17037,13 +20166,15 @@ class StepInTargetsResponseBody(BaseSchema): __props__ = { "targets": { "type": "array", - "items": {"$ref": "#/definitions/StepInTarget"}, - "description": "The possible step-in targets of the specified source location.", + "items": { + "$ref": "#/definitions/StepInTarget" + }, + "description": "The possible step-in targets of the specified source location." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, targets, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -17055,12 +20186,13 @@ class StepInTargetsResponseBody(BaseSchema): StepInTarget.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) targets = self.targets if targets and hasattr(targets[0], "to_dict"): targets = [x.to_dict() for x in targets] dct = { - "targets": [StepInTarget.update_dict_ids_to_dap(o) for o in targets] if (update_ids_to_dap and targets) else targets, + 'targets': [StepInTarget.update_dict_ids_to_dap(o) for o in targets] if (update_ids_to_dap and targets) else targets, } dct.update(self.kwargs) return dct @@ -17077,13 +20209,15 @@ class GotoTargetsResponseBody(BaseSchema): __props__ = { "targets": { "type": "array", - "items": {"$ref": "#/definitions/GotoTarget"}, - "description": "The possible goto targets of the specified location.", + "items": { + "$ref": "#/definitions/GotoTarget" + }, + "description": "The possible goto targets of the specified location." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, targets, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -17095,12 +20229,13 @@ class GotoTargetsResponseBody(BaseSchema): GotoTarget.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) targets = self.targets if targets and hasattr(targets[0], "to_dict"): targets = [x.to_dict() for x in targets] dct = { - "targets": [GotoTarget.update_dict_ids_to_dap(o) for o in targets] if (update_ids_to_dap and targets) else targets, + 'targets': [GotoTarget.update_dict_ids_to_dap(o) for o in targets] if (update_ids_to_dap and targets) else targets, } dct.update(self.kwargs) return dct @@ -17115,11 +20250,17 @@ class CompletionsResponseBody(BaseSchema): """ __props__ = { - "targets": {"type": "array", "items": {"$ref": "#/definitions/CompletionItem"}, "description": "The possible completions for ."} + "targets": { + "type": "array", + "items": { + "$ref": "#/definitions/CompletionItem" + }, + "description": "The possible completions for ." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, targets, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -17131,12 +20272,13 @@ class CompletionsResponseBody(BaseSchema): CompletionItem.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) targets = self.targets if targets and hasattr(targets[0], "to_dict"): targets = [x.to_dict() for x in targets] dct = { - "targets": [CompletionItem.update_dict_ids_to_dap(o) for o in targets] if (update_ids_to_dap and targets) else targets, + 'targets': [CompletionItem.update_dict_ids_to_dap(o) for o in targets] if (update_ids_to_dap and targets) else targets, } dct.update(self.kwargs) return dct @@ -17151,14 +20293,26 @@ class ExceptionInfoResponseBody(BaseSchema): """ __props__ = { - "exceptionId": {"type": "string", "description": "ID of the exception that was thrown."}, - "description": {"type": "string", "description": "Descriptive text for the exception."}, - "breakMode": {"description": "Mode that caused the exception notification to be raised.", "type": "ExceptionBreakMode"}, - "details": {"description": "Detailed information about the exception.", "type": "ExceptionDetails"}, + "exceptionId": { + "type": "string", + "description": "ID of the exception that was thrown." + }, + "description": { + "type": "string", + "description": "Descriptive text for the exception." + }, + "breakMode": { + "description": "Mode that caused the exception notification to be raised.", + "type": "ExceptionBreakMode" + }, + "details": { + "description": "Detailed information about the exception.", + "type": "ExceptionDetails" + } } - __refs__ = set(["breakMode", "details"]) + __refs__ = set(['breakMode', 'details']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, exceptionId, breakMode, description=None, details=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -17175,24 +20329,23 @@ class ExceptionInfoResponseBody(BaseSchema): if details is None: self.details = ExceptionDetails() else: - self.details = ( - ExceptionDetails(update_ids_from_dap=update_ids_from_dap, **details) if details.__class__ != ExceptionDetails else details - ) + self.details = ExceptionDetails(update_ids_from_dap=update_ids_from_dap, **details) if details.__class__ != ExceptionDetails else details self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) exceptionId = self.exceptionId breakMode = self.breakMode description = self.description details = self.details dct = { - "exceptionId": exceptionId, - "breakMode": breakMode, + 'exceptionId': exceptionId, + 'breakMode': breakMode, } if description is not None: - dct["description"] = description + dct['description'] = description if details is not None: - dct["details"] = details.to_dict(update_ids_to_dap=update_ids_to_dap) + dct['details'] = details.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct @@ -17208,20 +20361,20 @@ class ReadMemoryResponseBody(BaseSchema): __props__ = { "address": { "type": "string", - "description": "The address of the first byte of data returned.\nTreated as a hex value if prefixed with `0x`, or as a decimal value otherwise.", + "description": "The address of the first byte of data returned.\nTreated as a hex value if prefixed with `0x`, or as a decimal value otherwise." }, "unreadableBytes": { "type": "integer", - "description": "The number of unreadable bytes encountered after the last successfully read byte.\nThis can be used to determine the number of bytes that should be skipped before a subsequent `readMemory` request succeeds.", + "description": "The number of unreadable bytes encountered after the last successfully read byte.\nThis can be used to determine the number of bytes that should be skipped before a subsequent `readMemory` request succeeds." }, "data": { "type": "string", - "description": "The bytes read from memory, encoded using base64. If the decoded length of `data` is less than the requested `count` in the original `readMemory` request, and `unreadableBytes` is zero or omitted, then the client should assume it's reached the end of readable memory.", - }, + "description": "The bytes read from memory, encoded using base64. If the decoded length of `data` is less than the requested `count` in the original `readMemory` request, and `unreadableBytes` is zero or omitted, then the client should assume it's reached the end of readable memory." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, address, unreadableBytes=None, data=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -17236,17 +20389,18 @@ class ReadMemoryResponseBody(BaseSchema): self.data = data self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) address = self.address unreadableBytes = self.unreadableBytes data = self.data dct = { - "address": address, + 'address': address, } if unreadableBytes is not None: - dct["unreadableBytes"] = unreadableBytes + dct['unreadableBytes'] = unreadableBytes if data is not None: - dct["data"] = data + dct['data'] = data dct.update(self.kwargs) return dct @@ -17262,16 +20416,16 @@ class WriteMemoryResponseBody(BaseSchema): __props__ = { "offset": { "type": "integer", - "description": "Property that should be returned when `allowPartial` is True to indicate the offset of the first byte of data successfully written. Can be negative.", + "description": "Property that should be returned when `allowPartial` is True to indicate the offset of the first byte of data successfully written. Can be negative." }, "bytesWritten": { "type": "integer", - "description": "Property that should be returned when `allowPartial` is True to indicate the number of bytes starting from address that were successfully written.", - }, + "description": "Property that should be returned when `allowPartial` is True to indicate the number of bytes starting from address that were successfully written." + } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, offset=None, bytesWritten=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -17282,14 +20436,16 @@ class WriteMemoryResponseBody(BaseSchema): self.bytesWritten = bytesWritten self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) offset = self.offset bytesWritten = self.bytesWritten - dct = {} + dct = { + } if offset is not None: - dct["offset"] = offset + dct['offset'] = offset if bytesWritten is not None: - dct["bytesWritten"] = bytesWritten + dct['bytesWritten'] = bytesWritten dct.update(self.kwargs) return dct @@ -17305,13 +20461,15 @@ class DisassembleResponseBody(BaseSchema): __props__ = { "instructions": { "type": "array", - "items": {"$ref": "#/definitions/DisassembledInstruction"}, - "description": "The list of disassembled instructions.", + "items": { + "$ref": "#/definitions/DisassembledInstruction" + }, + "description": "The list of disassembled instructions." } } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, instructions, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -17323,14 +20481,13 @@ class DisassembleResponseBody(BaseSchema): DisassembledInstruction.update_dict_ids_from_dap(o) self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) instructions = self.instructions if instructions and hasattr(instructions[0], "to_dict"): instructions = [x.to_dict() for x in instructions] dct = { - "instructions": [DisassembledInstruction.update_dict_ids_to_dap(o) for o in instructions] - if (update_ids_to_dap and instructions) - else instructions, + 'instructions': [DisassembledInstruction.update_dict_ids_to_dap(o) for o in instructions] if (update_ids_to_dap and instructions) else instructions, } dct.update(self.kwargs) return dct @@ -17347,15 +20504,19 @@ class MessageVariables(BaseSchema): __props__ = {} __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) - """ """ - + """ + + """ + self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) - dct = {} + dct = { + } dct.update(self.kwargs) return dct @@ -17369,17 +20530,26 @@ class PydevdSystemInfoResponseBody(BaseSchema): """ __props__ = { - "python": {"description": "Information about the python version running in the current process.", "type": "PydevdPythonInfo"}, + "python": { + "description": "Information about the python version running in the current process.", + "type": "PydevdPythonInfo" + }, "platform": { "description": "Information about the plarforn on which the current process is running.", - "type": "PydevdPlatformInfo", + "type": "PydevdPlatformInfo" }, - "process": {"description": "Information about the current process.", "type": "PydevdProcessInfo"}, - "pydevd": {"description": "Information about pydevd.", "type": "PydevdInfo"}, + "process": { + "description": "Information about the current process.", + "type": "PydevdProcessInfo" + }, + "pydevd": { + "description": "Information about pydevd.", + "type": "PydevdInfo" + } } - __refs__ = set(["python", "platform", "process", "pydevd"]) + __refs__ = set(['python', 'platform', 'process', 'pydevd']) - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, python, platform, process, pydevd, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -17391,39 +20561,32 @@ class PydevdSystemInfoResponseBody(BaseSchema): if python is None: self.python = PydevdPythonInfo() else: - self.python = ( - PydevdPythonInfo(update_ids_from_dap=update_ids_from_dap, **python) if python.__class__ != PydevdPythonInfo else python - ) + self.python = PydevdPythonInfo(update_ids_from_dap=update_ids_from_dap, **python) if python.__class__ != PydevdPythonInfo else python if platform is None: self.platform = PydevdPlatformInfo() else: - self.platform = ( - PydevdPlatformInfo(update_ids_from_dap=update_ids_from_dap, **platform) - if platform.__class__ != PydevdPlatformInfo - else platform - ) + self.platform = PydevdPlatformInfo(update_ids_from_dap=update_ids_from_dap, **platform) if platform.__class__ != PydevdPlatformInfo else platform if process is None: self.process = PydevdProcessInfo() else: - self.process = ( - PydevdProcessInfo(update_ids_from_dap=update_ids_from_dap, **process) if process.__class__ != PydevdProcessInfo else process - ) + self.process = PydevdProcessInfo(update_ids_from_dap=update_ids_from_dap, **process) if process.__class__ != PydevdProcessInfo else process if pydevd is None: self.pydevd = PydevdInfo() else: - self.pydevd = PydevdInfo(update_ids_from_dap=update_ids_from_dap, **pydevd) if pydevd.__class__ != PydevdInfo else pydevd + self.pydevd = PydevdInfo(update_ids_from_dap=update_ids_from_dap, **pydevd) if pydevd.__class__ != PydevdInfo else pydevd self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) python = self.python platform = self.platform process = self.process pydevd = self.pydevd dct = { - "python": python.to_dict(update_ids_to_dap=update_ids_to_dap), - "platform": platform.to_dict(update_ids_to_dap=update_ids_to_dap), - "process": process.to_dict(update_ids_to_dap=update_ids_to_dap), - "pydevd": pydevd.to_dict(update_ids_to_dap=update_ids_to_dap), + 'python': python.to_dict(update_ids_to_dap=update_ids_to_dap), + 'platform': platform.to_dict(update_ids_to_dap=update_ids_to_dap), + 'process': process.to_dict(update_ids_to_dap=update_ids_to_dap), + 'pydevd': pydevd.to_dict(update_ids_to_dap=update_ids_to_dap), } dct.update(self.kwargs) return dct @@ -17437,10 +20600,15 @@ class PydevdAuthorizeResponseBody(BaseSchema): Note: automatically generated code. Do not edit manually. """ - __props__ = {"clientAccessToken": {"type": "string", "description": "The access token to access the client (i.e.: usually the IDE)."}} + __props__ = { + "clientAccessToken": { + "type": "string", + "description": "The access token to access the client (i.e.: usually the IDE)." + } + } __refs__ = set() - __slots__ = list(__props__.keys()) + ["kwargs"] + __slots__ = list(__props__.keys()) + ['kwargs'] def __init__(self, clientAccessToken, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ @@ -17449,10 +20617,83 @@ class PydevdAuthorizeResponseBody(BaseSchema): self.clientAccessToken = clientAccessToken self.kwargs = kwargs + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) clientAccessToken = self.clientAccessToken dct = { - "clientAccessToken": clientAccessToken, + 'clientAccessToken': clientAccessToken, } dct.update(self.kwargs) return dct + + +@register +class GetTableResponseBody(BaseSchema): + """ + "body" of GetTableResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "result": { + "type": "string", + "description": "Opaque string payload with the result of the getTable operation." + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, result=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string result: Opaque string payload with the result of the getTable operation. + """ + self.result = result + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + result = self.result + dct = { + } + if result is not None: + dct['result'] = result + dct.update(self.kwargs) + return dct + + +@register +class GetArrayResponseBody(BaseSchema): + """ + "body" of GetArrayResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "result": { + "type": "string", + "description": "Opaque string payload with the result of the requested operation." + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, result=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string result: Opaque string payload with the result of the requested operation. + """ + self.result = result + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + result = self.result + dct = { + } + if result is not None: + dct['result'] = result + dct.update(self.kwargs) + return dct diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/__init__.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_asyncio_provider.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_asyncio_provider.py new file mode 100644 index 000000000000..66bd87629bf1 --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_asyncio_provider.py @@ -0,0 +1,39 @@ +# Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +def get_apply(): + try: + from pydevd_nest_asyncio import apply + return apply + except: + return None + + +def get_eval_async_expression_in_context(): + try: + from pydevd_asyncio_utils import eval_async_expression_in_context + return eval_async_expression_in_context + except: + return None + + +def get_eval_async_expression(): + try: + from pydevd_asyncio_utils import eval_async_expression + return eval_async_expression + except: + return None + + +def get_exec_async_code(): + try: + from pydevd_asyncio_utils import exec_async_code + return exec_async_code + except: + return None + + +def get_asyncio_command_compiler(): + try: + from pydevd_asyncio_utils import asyncio_command_compiler + return asyncio_command_compiler + except: + return None diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_constants.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_constants.py new file mode 100644 index 000000000000..77cf2f054ac3 --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_constants.py @@ -0,0 +1,8 @@ +try: + xrange = xrange +except: + # Python 3k does not have it + xrange = range + +NUMPY_NUMERIC_TYPES = "biufc" +NUMPY_FLOATING_POINT_TYPES = "fc" diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_custom_frames.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_custom_frames.py new file mode 100644 index 000000000000..1a3385a6c2c4 --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_custom_frames.py @@ -0,0 +1,17 @@ +def get_custom_frame(thread_id, frame_id): + ''' + :param thread_id: This should actually be the frame_id which is returned by add_custom_frame. + :param frame_id: This is the actual id() of the frame + ''' + + CustomFramesContainer.custom_frames_lock.acquire() + try: + frame_id = int(frame_id) + f = CustomFramesContainer.custom_frames[thread_id].frame + while f is not None: + if id(f) == frame_id: + return f + f = f.f_back + finally: + f = None + CustomFramesContainer.custom_frames_lock.release() \ No newline at end of file diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_tables.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_tables.py new file mode 100644 index 000000000000..512d5a8d88b0 --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_tables.py @@ -0,0 +1,149 @@ +# Copyright 2000-2025 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. + + +from _pydev_bundle import pydev_log +from _pydevd_bundle import pydevd_vars +from _pydevd_bundle.pydevd_constants import NEXT_VALUE_SEPARATOR +from _pydevd_bundle.pydevd_xml import ExceptionOnEvaluate +from _pydevd_bundle.custom.tables.images.pydevd_image_loader import load_image_chunk + + +class TableCommandType: + DF_INFO = "DF_INFO" + SLICE = "SLICE" + SLICE_CSV = "SLICE_CSV" + DESCRIBE = "DF_DESCRIBE" + VISUALIZATION_DATA = "VISUALIZATION_DATA" + IMAGE_START_CHUNK_LOAD = "IMAGE_START_CHUNK_LOAD" + IMAGE_CHUNK_LOAD = "IMAGE_CHUNK_LOAD" + + +def is_error_on_eval(val): + try: + # This should be faster than isinstance (but we have to protect against not + # having a '__class__' attribute). + is_exception_on_eval = val.__class__ == ExceptionOnEvaluate + except: + is_exception_on_eval = False + return is_exception_on_eval + +def exec_image_table_command(init_command, command_type, offset, image_id, f_globals, f_locals): + table = pydevd_vars.eval_in_context(init_command, f_globals, f_locals) + is_exception_on_eval = is_error_on_eval(table) + if is_exception_on_eval: + return False, table.result + + image_provider = __get_image_provider(table) + if not image_provider: + raise RuntimeError('No image provider for: {}'.format(type(table))) + + if command_type == TableCommandType.IMAGE_START_CHUNK_LOAD: + return True, image_provider.create_image(table) + + return True, load_image_chunk(offset, image_id) + + +def exec_table_command(init_command, command_type, start_index, end_index, format, f_globals, + f_locals): + + table = pydevd_vars.eval_in_context(init_command, f_globals, f_locals) + is_exception_on_eval = is_error_on_eval(table) + if is_exception_on_eval: + return False, table.result + + table_provider = __get_table_provider(table) + if not table_provider: + raise RuntimeError('No table data provider for: {}'.format(type(table))) + + res = [] + if command_type == TableCommandType.DF_INFO: + res.append(table_provider.get_type(table)) + res.append(NEXT_VALUE_SEPARATOR) + res.append(table_provider.get_shape(table)) + res.append(NEXT_VALUE_SEPARATOR) + res.append(table_provider.get_head(table)) + res.append(NEXT_VALUE_SEPARATOR) + res.append(table_provider.get_column_types(table)) + + elif command_type == TableCommandType.DESCRIBE: + res.append(table_provider.get_column_descriptions(table)) + + elif command_type == TableCommandType.VISUALIZATION_DATA: + res.append(table_provider.get_value_occurrences_count(table)) + res.append(NEXT_VALUE_SEPARATOR) + + elif command_type == TableCommandType.SLICE: + res.append(table_provider.get_data(table, False, start_index, end_index, format)) + elif command_type == TableCommandType.SLICE_CSV: + res.append(table_provider.get_data(table, True, start_index, end_index, format)) + + return True, ''.join(res) + + +def __get_type_name(table): + table_data_type = type(table) + table_data_type_name = '{}.{}'.format(table_data_type.__module__, table_data_type.__name__) + return table_data_type_name + + +# noinspection PyUnresolvedReferences +def __get_table_provider(output): + # type: (str) -> Any + type_qualified_name = __get_type_name(output) + numpy_based_type_qualified_names = ['tensorflow.python.framework.ops.EagerTensor', + 'tensorflow.python.ops.resource_variable_ops.ResourceVariable', + 'tensorflow.python.framework.sparse_tensor.SparseTensor', + 'torch.Tensor'] + table_provider = None + if type_qualified_name in ['pandas.core.frame.DataFrame', + 'pandas.core.series.Series', + 'geopandas.geoseries.GeoSeries', + 'geopandas.geodataframe.GeoDataFrame', + 'pandera.typing.pandas.DataFrame']: + import _pydevd_bundle.custom.tables.pydevd_pandas as table_provider + # dict is needed for sort commands + elif type_qualified_name == 'builtins.dict': + table_type_name = __get_type_name(output['data']) + if table_type_name in numpy_based_type_qualified_names: + import _pydevd_bundle.custom.tables.pydevd_numpy_based as table_provider + else: + import _pydevd_bundle.custom.tables.pydevd_numpy as table_provider + elif type_qualified_name == 'numpy.ndarray' or type_qualified_name == 'numpy.rec.recarray': + import _pydevd_bundle.custom.tables.pydevd_numpy as table_provider + elif type_qualified_name in numpy_based_type_qualified_names: + import _pydevd_bundle.custom.tables.pydevd_numpy_based as table_provider + elif type_qualified_name.startswith('polars') and ( + type_qualified_name.endswith('DataFrame') + or type_qualified_name.endswith('Series')): + import _pydevd_bundle.custom.tables.pydevd_polars as table_provider + elif type_qualified_name == 'datasets.arrow_dataset.Dataset': + import _pydevd_bundle.custom.tables.pydevd_dataset as table_provider + + return table_provider + + +# noinspection PyUnresolvedReferences +def __get_image_provider(output): + # type: (str) -> Any + type_qualified_name = __get_type_name(output) + numpy_based_type_qualified_names = ['tensorflow.python.framework.ops.EagerTensor', + 'tensorflow.python.ops.resource_variable_ops.ResourceVariable', + 'tensorflow.python.framework.sparse_tensor.SparseTensor', + 'torch.Tensor'] + image_provider = None + if type_qualified_name == 'builtins.dict': + table_type_name = __get_type_name(output['data']) + if table_type_name in numpy_based_type_qualified_names: + import _pydevd_bundle.custom.tables.images.pydevd_numpy_based_image as image_provider + else: + import _pydevd_bundle.custom.tables.images.pydevd_numpy_image as image_provider + elif type_qualified_name in numpy_based_type_qualified_names: + import _pydevd_bundle.custom.tables.images.pydevd_numpy_based_image as image_provider + elif type_qualified_name == 'numpy.ndarray': + import _pydevd_bundle.custom.tables.images.pydevd_numpy_image as image_provider + elif type_qualified_name in ['PIL.Image.Image', 'PIL.PngImagePlugin.PngImageFile', 'PIL.JpegImagePlugin.JpegImageFile']: + import _pydevd_bundle.custom.tables.images.pydevd_pillow_image as image_provider + elif type_qualified_name in ['matplotlib.figure.Figure', 'plotly.graph_objs._figure.Figure']: + import _pydevd_bundle.custom.tables.images.pydevd_matplotlib_image as image_provider + + return image_provider diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_user_type_renderers_utils.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_user_type_renderers_utils.py new file mode 100644 index 000000000000..f4ccffedeb0f --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_user_type_renderers_utils.py @@ -0,0 +1,58 @@ +# Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +import inspect + +from _pydevd_bundle import pydevd_utils + + +class TypeRenderersConstants: + new_line = "@_@NEW_LINE_CHAR@_@" + tab = "@_@TAB_CHAR@_@" + + +def try_get_type_renderer_for_var(var, renderers_dict): + try: + cls = var.__class__ + cls_name = cls.__name__ + renderers_for_name = renderers_dict.get(cls_name) + if renderers_for_name is None: + return None + + module_name = cls.__module__ + qualified_name = module_name + "." + cls_name + + # for builtins + builtin_module = int.__module__ + if module_name == builtin_module: + for render in renderers_for_name: + if render.type_canonical_import_path == qualified_name: + return render + + # for classes which defined in project directory + try: + src_file = inspect.getfile(cls) + except: + src_file = None + + if src_file is not None and pydevd_utils.in_project_roots(src_file): + for render in renderers_for_name: + if render.type_src_file == src_file: + return render + return None + + # by qualified name + for render in renderers_for_name: + if render.type_qualified_name == qualified_name: + return render + + # by module root and class name + # (if module contains only one class with the same name) + module_root = module_name.split(".")[0] + for render in renderers_for_name: + if render.module_root_has_one_type_with_same_name: + renderer_module_root = render.type_canonical_import_path.split(".")[0] + if renderer_module_root == module_root: + return render + except: + pass + + return None diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_utils.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_utils.py new file mode 100644 index 000000000000..283d6c7a2d1a --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_utils.py @@ -0,0 +1,11 @@ +class VariableWithOffset(object): + def __init__(self, data, offset): + self.data, self.offset = data, offset + + +def eval_expression(expression, globals, locals): + eval_func = get_eval_async_expression_in_context() + if eval_func is not None: + return eval_func(expression, globals, locals, False) + + return eval(expression, globals, locals) diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_vars.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_vars.py new file mode 100644 index 000000000000..6bad5ac370fc --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/pydevd_vars.py @@ -0,0 +1,888 @@ +""" pydevd_vars deals with variables: + resolution/conversion to XML. +""" +import math +import pickle + +from _pydev_bundle.pydev_imports import quote +from _pydev_bundle._pydev_saved_modules import thread, threading +from _pydevd_bundle.pydevd_constants import get_frame, get_current_thread_id +from _pydevd_bundle.custom.pydevd_constants import xrange, NUMPY_NUMERIC_TYPES, NUMPY_FLOATING_POINT_TYPES +from _pydevd_bundle.custom.pydevd_custom_frames import get_custom_frame +from _pydevd_bundle.custom.pydevd_user_type_renderers_utils import try_get_type_renderer_for_var +from _pydevd_bundle.pydevd_xml import ExceptionOnEvaluate, get_type, var_to_xml +from _pydevd_bundle.custom.pydevd_asyncio_provider import get_eval_async_expression + +try: + from StringIO import StringIO +except ImportError: + from io import StringIO +import sys # @Reimport + +try: + from collections import OrderedDict +except: + OrderedDict = dict + +from _pydev_bundle._pydev_saved_modules import threading +import traceback +from _pydevd_bundle import pydevd_save_locals +from _pydev_bundle.pydev_imports import Exec, execfile +from _pydevd_bundle.custom.pydevd_utils import VariableWithOffset, eval_expression +from _pydevd_bundle.pydevd_constants import IS_PY313_OR_GREATER + +SENTINEL_VALUE = [] +DEFAULT_DF_FORMAT = "s" + +# ------------------------------------------------------------------------------------------------------ class for errors + +class VariableError(RuntimeError): pass + + +class FrameNotFoundError(RuntimeError): pass + + +def _iter_frames(initialFrame): + '''NO-YIELD VERSION: Iterates through all the frames starting at the specified frame (which will be the first returned item)''' + # cannot use yield + frames = [] + + while initialFrame is not None: + frames.append(initialFrame) + initialFrame = initialFrame.f_back + + return frames + + +def dump_frames(thread_id): + sys.stdout.write('dumping frames\n') + if thread_id != get_current_thread_id(threading.current_thread()): + raise VariableError("find_frame: must execute on same thread") + + curFrame = get_frame() + for frame in _iter_frames(curFrame): + sys.stdout.write('%s\n' % pickle.dumps(frame)) + + +# =============================================================================== +# AdditionalFramesContainer +# =============================================================================== +class AdditionalFramesContainer: + lock = thread.allocate_lock() + additional_frames = {} # dict of dicts + + +def add_additional_frame_by_id(thread_id, frames_by_id): + AdditionalFramesContainer.additional_frames[thread_id] = frames_by_id + + +addAdditionalFrameById = add_additional_frame_by_id # Backward compatibility + + +def remove_additional_frame_by_id(thread_id): + del AdditionalFramesContainer.additional_frames[thread_id] + + +removeAdditionalFrameById = remove_additional_frame_by_id # Backward compatibility + + +def has_additional_frames_by_id(thread_id): + return thread_id in AdditionalFramesContainer.additional_frames + + +def get_additional_frames_by_id(thread_id): + return AdditionalFramesContainer.additional_frames.get(thread_id) + + +def find_frame(thread_id, frame_id): + """ returns a frame on the thread that has a given frame_id """ + try: + curr_thread_id = get_current_thread_id(threading.current_thread()) + if thread_id != curr_thread_id: + try: + return get_custom_frame(thread_id, frame_id) # I.e.: thread_id could be a stackless frame id + thread_id. + except: + pass + + raise VariableError("find_frame: must execute on same thread (%s != %s)" % (thread_id, curr_thread_id)) + + lookingFor = int(frame_id) + + if AdditionalFramesContainer.additional_frames: + if thread_id in AdditionalFramesContainer.additional_frames: + frame = AdditionalFramesContainer.additional_frames[thread_id].get(lookingFor) + + if frame is not None: + return frame + + curFrame = get_frame() + if frame_id == "*": + return curFrame # any frame is specified with "*" + + frameFound = None + + for frame in _iter_frames(curFrame): + if lookingFor == id(frame): + frameFound = frame + del frame + break + + del frame + + # Important: python can hold a reference to the frame from the current context + # if an exception is raised, so, if we don't explicitly add those deletes + # we might have those variables living much more than we'd want to. + + # I.e.: sys.exc_info holding reference to frame that raises exception (so, other places + # need to call sys.exc_clear()) + del curFrame + + if frameFound is None: + msgFrames = '' + i = 0 + + for frame in _iter_frames(get_frame()): + i += 1 + msgFrames += str(id(frame)) + if i % 5 == 0: + msgFrames += '\n' + else: + msgFrames += ' - ' + +# Note: commented this error message out (it may commonly happen +# if a message asking for a frame is issued while a thread is paused +# but the thread starts running before the message is actually +# handled). +# Leaving code to uncomment during tests. +# err_msg = '''find_frame: frame not found. +# Looking for thread_id:%s, frame_id:%s +# Current thread_id:%s, available frames: +# %s\n +# ''' % (thread_id, lookingFor, curr_thread_id, msgFrames) +# +# sys.stderr.write(err_msg) + return None + + return frameFound + except: + import traceback + traceback.print_exc() + return None + + +def getVariable(thread_id, frame_id, scope, attrs): + """ + returns the value of a variable + + :scope: can be BY_ID, EXPRESSION, GLOBAL, LOCAL, FRAME + + BY_ID means we'll traverse the list of all objects alive to get the object. + + :attrs: after reaching the proper scope, we have to get the attributes until we find + the proper location (i.e.: obj\tattr1\tattr2). + + :note: when BY_ID is used, the frame_id is considered the id of the object to find and + not the frame (as we don't care about the frame in this case). + """ + if scope == 'BY_ID': + if thread_id != get_current_thread_id(threading.current_thread()): + raise VariableError("getVariable: must execute on same thread") + + try: + import gc + objects = gc.get_objects() + except: + pass # Not all python variants have it. + else: + frame_id = int(frame_id) + for var in objects: + if id(var) == frame_id: + if attrs is not None: + attrList = attrs.split('\t') + for k in attrList: + _type, _typeName, resolver = get_type(var) + var = resolver.resolve(var, k) + + return var + + # If it didn't return previously, we coudn't find it by id (i.e.: alrceady garbage collected). + sys.stderr.write('Unable to find object with id: %s\n' % (frame_id,)) + return None + + frame = find_frame(thread_id, frame_id) + if frame is None: + return {} + + if attrs is not None: + attrList = attrs.split('\t') + else: + attrList = [] + + for attr in attrList: + attr.replace("@_@TAB_CHAR@_@", '\t') + + if scope == 'EXPRESSION': + for count in xrange(len(attrList)): + if count == 0: + # An Expression can be in any scope (globals/locals), therefore it needs to evaluated as an expression + var = evaluate_expression(thread_id, frame_id, attrList[count], False) + else: + _type, _typeName, resolver = get_type(var) + var = resolver.resolve(var, attrList[count]) + else: + if scope == "GLOBAL": + var = frame.f_globals + del attrList[0] # globals are special, and they get a single dummy unused attribute + else: + # in a frame access both locals and globals as Python does + var = {} + var.update(frame.f_globals) + var.update(frame.f_locals) + + for k in attrList: + _type, _typeName, resolver = get_type(var) + var = resolver.resolve(var, k) + + return var + + +def get_offset(attrs): + """ + Extract offset from the given attributes. + + :param attrs: The string of a compound variable fields split by tabs. + If an offset is given, it must go the first element. + :return: The value of offset if given or 0. + """ + offset = 0 + if attrs is not None: + try: + offset = int(attrs.split('\t')[0]) + except ValueError: + pass + return offset + + +def _resolve_default_variable_fields(var, resolver, offset): + return resolver.get_dictionary(VariableWithOffset(var, offset) if offset else var) + + +def _resolve_custom_variable_fields(var, var_expr, resolver, offset, type_renderer, frame_info=None): + val_dict = OrderedDict() + if type_renderer.is_default_children or type_renderer.append_default_children: + default_val_dict = _resolve_default_variable_fields(var, resolver, offset) + if len(val_dict) == 0: + return default_val_dict + for (name, value) in default_val_dict.items(): + val_dict[name] = value + + return val_dict + + +def resolve_compound_variable_fields(thread_id, frame_id, scope, attrs, user_type_renderers={}): + """ + Resolve compound variable in debugger scopes by its name and attributes + + :param thread_id: id of the variable's thread + :param frame_id: id of the variable's frame + :param scope: can be BY_ID, EXPRESSION, GLOBAL, LOCAL, FRAME + :param attrs: after reaching the proper scope, we have to get the attributes until we find + the proper location (i.e.: obj\tattr1\tattr2) + :param user_type_renderers: a dictionary with user type renderers + :return: a dictionary of variables's fields + + :note: PyCharm supports progressive loading of large collections and uses the `attrs` + parameter to pass the offset, e.g. 300\t\\obj\tattr1\tattr2 should return + the value of attr2 starting from the 300th element. This hack makes it possible + to add the support of progressive loading without extending of the protocol. + """ + offset = get_offset(attrs) + + orig_attrs, attrs = attrs, attrs.split('\t', 1)[1] if offset else attrs + + var = getVariable(thread_id, frame_id, scope, attrs) + + var_expr = ".".join(attrs.split('\t')) + + try: + _type, _typeName, resolver = get_type(var) + + type_renderer = try_get_type_renderer_for_var(var, user_type_renderers) + if type_renderer is not None and offset == 0: + frame_info = (thread_id, frame_id) + return _typeName, _resolve_custom_variable_fields( + var, var_expr, resolver, offset, type_renderer, frame_info + ) + + return _typeName, _resolve_default_variable_fields(var, resolver, offset) + + except: + sys.stderr.write('Error evaluating: thread_id: %s\nframe_id: %s\nscope: %s\nattrs: %s\n' % ( + thread_id, frame_id, scope, orig_attrs,)) + traceback.print_exc() + + +def resolve_var_object(var, attrs): + """ + Resolve variable's attribute + + :param var: an object of variable + :param attrs: a sequence of variable's attributes separated by \t (i.e.: obj\tattr1\tattr2) + :return: a value of resolved variable's attribute + """ + if attrs is not None: + attr_list = attrs.split('\t') + else: + attr_list = [] + for k in attr_list: + type, _typeName, resolver = get_type(var) + var = resolver.resolve(var, k) + return var + + +def resolve_compound_var_object_fields(var, attrs, user_type_renderers={}): + """ + Resolve compound variable by its object and attributes + + :param var: an object of variable + :param attrs: a sequence of variable's attributes separated by \t (i.e.: obj\tattr1\tattr2) + :param user_type_renderers: a dictionary with user type renderers + :return: a dictionary of variables's fields + """ + namespace = var + + offset = get_offset(attrs) + + attrs = attrs.split('\t', 1)[1] if offset else attrs + + attr_list = attrs.split('\t') + + var_expr = ".".join(attr_list) + + for k in attr_list: + type, _typeName, resolver = get_type(var) + var = resolver.resolve(var, k) + + try: + type, _typeName, resolver = get_type(var) + + type_renderer = try_get_type_renderer_for_var(var, user_type_renderers) + if type_renderer is not None and offset == 0: + return _resolve_custom_variable_fields( + var, var_expr, resolver, offset, type_renderer + ) + + return _resolve_default_variable_fields(var, resolver, offset) + except: + traceback.print_exc() + + +def custom_operation(thread_id, frame_id, scope, attrs, style, code_or_file, operation_fn_name): + """ + We'll execute the code_or_file and then search in the namespace the operation_fn_name to execute with the given var. + + code_or_file: either some code (i.e.: from pprint import pprint) or a file to be executed. + operation_fn_name: the name of the operation to execute after the exec (i.e.: pprint) + """ + expressionValue = getVariable(thread_id, frame_id, scope, attrs) + + try: + namespace = {'__name__': ''} + if style == "EXECFILE": + namespace['__file__'] = code_or_file + execfile(code_or_file, namespace, namespace) + else: # style == EXEC + namespace['__file__'] = '' + Exec(code_or_file, namespace, namespace) + + return str(namespace[operation_fn_name](expressionValue)) + except: + traceback.print_exc() + + +def get_eval_exception_msg(expression, locals): + s = StringIO() + traceback.print_exc(file=s) + result = s.getvalue() + + try: + try: + etype, value, tb = sys.exc_info() + result = value + finally: + etype = value = tb = None + except: + pass + + result = ExceptionOnEvaluate(result) + + # Ok, we have the initial error message, but let's see if we're dealing with a name mangling error... + try: + if '__' in expression: + # Try to handle '__' name mangling... + split = expression.split('.') + curr = locals.get(split[0]) + for entry in split[1:]: + if entry.startswith('__') and not hasattr(curr, entry): + entry = '_%s%s' % (curr.__class__.__name__, entry) + curr = getattr(curr, entry) + + result = curr + except: + pass + return result + + +def eval_in_context(expression, globals, locals): + try: + result = eval_expression(expression, globals, locals) + except Exception: + result = get_eval_exception_msg(expression, locals) + return result + + +def evaluate_expression(thread_id, frame_id, expression, doExec): + '''returns the result of the evaluated expression + @param doExec: determines if we should do an exec or an eval + ''' + frame = find_frame(thread_id, frame_id) + if frame is None: + return + + # Not using frame.f_globals because of https://sourceforge.net/tracker2/?func=detail&aid=2541355&group_id=85796&atid=577329 + # (Names not resolved in generator expression in method) + # See message: http://mail.python.org/pipermail/python-list/2009-January/526522.html + updated_globals = {} + updated_globals.update(frame.f_globals) + updated_globals.update(frame.f_locals) # locals later because it has precedence over the actual globals + + try: + expression = str(expression.replace('@LINE@', '\n')) + eval_func = get_eval_async_expression() + if eval_func is not None: + return eval_func(expression, updated_globals, frame, doExec, get_eval_exception_msg) + + if doExec: + try: + # try to make it an eval (if it is an eval we can print it, otherwise we'll exec it and + # it will have whatever the user actually did) + compiled = compile(expression, '', 'eval') + except: + Exec(expression, updated_globals, frame.f_locals) + pydevd_save_locals.save_locals(frame) + else: + result = eval(compiled, updated_globals, frame.f_locals) + if result is not None: # Only print if it's not None (as python does) + sys.stdout.write('%s\n' % (result,)) + return + + else: + return eval_in_context(expression, updated_globals, frame.f_locals) + finally: + # Should not be kept alive if an exception happens and this frame is kept in the stack. + del updated_globals + del frame + + +def change_attr_expression(thread_id, frame_id, attr, expression, dbg, value=SENTINEL_VALUE): + '''Changes some attribute in a given frame. + ''' + frame = find_frame(thread_id, frame_id) + if frame is None: + return + + try: + expression = expression.replace('@LINE@', '\n') + + if dbg.plugin and value is SENTINEL_VALUE: + result = dbg.plugin.change_variable(frame, attr, expression) + if result: + return result + + if value is SENTINEL_VALUE: + # It is possible to have variables with names like '.0', ',,,foo', etc in scope by setting them with + # `sys._getframe().f_locals`. In particular, the '.0' variable name is used to denote the list iterator when we stop in + # list comprehension expressions. This variable evaluates to 0. by `eval`, which is not what we want and this is the main + # reason we have to check if the expression exists in the global and local scopes before trying to evaluate it. + value = frame.f_locals.get(expression) or frame.f_globals.get(expression) or eval(expression, frame.f_globals, frame.f_locals) + + if attr[:7] == "Globals": + attr = attr[8:] + if is_complex(attr): + Exec('%s=%s' % (attr, expression), frame.f_globals, frame.f_globals) + return value + if attr in frame.f_globals: + frame.f_globals[attr] = value + return frame.f_globals[attr] + else: + if pydevd_save_locals.is_save_locals_available(): + if is_complex(attr): + if IS_PY313_OR_GREATER: + Exec('%s=%s' % (attr, expression), frame.f_globals, frame.f_locals) + else: + Exec('%s=%s' % (attr, expression), frame.f_locals, frame.f_locals) + return value + frame.f_locals[attr] = value + pydevd_save_locals.save_locals(frame) + return frame.f_locals[attr] + + # default way (only works for changing it in the topmost frame) + result = value + Exec('%s=%s' % (attr, expression), frame.f_globals, frame.f_locals) + return result + + except Exception: + traceback.print_exc() + +def is_complex(attr): + complex_indicators = ['[', ']', '.'] + for indicator in complex_indicators: + if attr.find(indicator) != -1: + return True + return False + +MAXIMUM_ARRAY_SIZE = float('inf') + + +def array_to_xml(array, name, roffset, coffset, rows, cols, format): + array, xml, r, c, f = array_to_meta_xml(array, name, format) + format = '%' + f + if rows == -1 and cols == -1: + rows = r + cols = c + + rows = min(rows, MAXIMUM_ARRAY_SIZE) + cols = min(cols, MAXIMUM_ARRAY_SIZE) + + if rows == 0 and cols == 0: + return xml + + # there is no obvious rule for slicing (at least 5 choices) + if len(array) == 1 and (rows > 1 or cols > 1): + array = array[0] + if array.size > len(array): + array = array[roffset:, coffset:] + rows = min(rows, len(array)) + cols = min(cols, len(array[0])) + if len(array) == 1: + array = array[0] + elif array.size == len(array): + if roffset == 0 and rows == 1: + array = array[coffset:] + cols = min(cols, len(array)) + elif coffset == 0 and cols == 1: + array = array[roffset:] + rows = min(rows, len(array)) + + def get_value(row, col): + value = array + if rows == 1 or cols == 1: + if rows == 1 and cols == 1: + value = array[0] + else: + value = array[(col if rows == 1 else row)] + if "ndarray" in str(type(value)): + value = value[0] + else: + value = array[row][col] + return value + xml += array_data_to_xml(rows, cols, lambda r: (get_value(r, c) for c in range(cols)), format) + return xml + + +def tf_to_xml(tensor, name, roffset, coffset, rows, cols, format): + try: + return array_to_xml(tensor.numpy(), name, roffset, coffset, rows, cols, format) + except TypeError: + return array_to_xml(tensor.to_dense().numpy(), name, roffset, coffset, rows, cols, format) + + +def torch_to_xml(tensor, name, roffset, coffset, rows, cols, format): + try: + if tensor.requires_grad: + tensor = tensor.detach() + return array_to_xml(tensor.numpy(), name, roffset, coffset, rows, cols, format) + except TypeError: + return array_to_xml(tensor.to_dense().numpy(), name, roffset, coffset, rows, cols, format) + + +def tf_sparse_to_xml(tensor, name, roffset, coffset, rows, cols, format): + try: + import tensorflow as tf + return tf_to_xml(tf.sparse.to_dense(tf.sparse.reorder(tensor)), name, roffset, coffset, rows, cols, format) + except ImportError: + pass + + +class ExceedingArrayDimensionsException(Exception): + pass + + +def array_to_meta_xml(array, name, format): + type = array.dtype.kind + slice = name + l = len(array.shape) + + if l == 0: + rows, cols = 0, 0 + bounds = (0, 0) + return array, slice_to_xml(name, rows, cols, format, "", bounds), rows, cols, format + + try: + import numpy as np + if isinstance(array, np.recarray) and l > 1: + slice = "{}['{}']".format(slice, array.dtype.names[0]) + array = array[array.dtype.names[0]] + except ImportError: + pass + + # initial load, compute slice + if format == '%': + if l > 2: + slice += '[0]' * (l - 2) + for r in range(l - 2): + array = array[0] + if type == 'f': + format = '.5f' + elif type == 'i' or type == 'u': + format = 'd' + else: + format = 's' + else: + format = format.replace('%', '') + + l = len(array.shape) + reslice = "" + if l > 2: + raise ExceedingArrayDimensionsException() + elif l == 1: + # special case with 1D arrays arr[i, :] - row, but arr[:, i] - column with equal shape and ndim + # http://stackoverflow.com/questions/16837946/numpy-a-2-rows-1-column-file-loadtxt-returns-1row-2-columns + # explanation: http://stackoverflow.com/questions/15165170/how-do-i-maintain-row-column-orientation-of-vectors-in-numpy?rq=1 + # we use kind of a hack - get information about memory from C_CONTIGUOUS + cols = 1 + rows = len(array) + if rows < len(array): + reslice = '[0:%s]' % (rows) + array = array[0:rows] + elif l == 2: + rows = array.shape[-2] + cols = array.shape[-1] + if cols < array.shape[-1] or rows < array.shape[-2]: + reslice = '[0:%s, 0:%s]' % (rows, cols) + array = array[0:rows, 0:cols] + + # avoid slice duplication + if not slice.endswith(reslice): + slice += reslice + + bounds = (0, 0) + if type in NUMPY_NUMERIC_TYPES and array.size != 0: + bounds = (array.min(), array.max()) + return array, slice_to_xml(slice, rows, cols, format, type, bounds), rows, cols, format + + +def get_column_formatter_by_type(initial_format, column_type): + if column_type in NUMPY_NUMERIC_TYPES and initial_format: + if column_type in NUMPY_FLOATING_POINT_TYPES and initial_format.strip() == DEFAULT_DF_FORMAT: + # use custom formatting for floats when default formatting is set + return array_default_format(column_type) + return initial_format + else: + return array_default_format(column_type) + + +def get_formatted_row_elements(row, iat, dim, cols, format, dtypes): + for c in range(cols): + val = iat[row, c] if dim > 1 else iat[row] + col_formatter = get_column_formatter_by_type(format, dtypes[c]) + try: + if val != val: + yield "nan" + else: + yield ("%" + col_formatter) % (val,) + except TypeError: + yield ("%" + DEFAULT_DF_FORMAT) % (val,) + + +def array_default_format(type): + if type == 'f': + return '.5f' + elif type == 'i' or type == 'u': + return 'd' + else: + return 's' + + +def get_label(label): + return str(label) if not isinstance(label, tuple) else '/'.join(map(str, label)) + + +DATAFRAME_HEADER_LOAD_MAX_SIZE = 100 + +class IAtPolarsAccessor: + def __init__(self, ps): + self.ps = ps + + def __getitem__(self, row): + return self.ps[row] + + +def dataframe_to_xml(df, name, roffset, coffset, rows, cols, format): + """ + :type df: pandas.core.frame.DataFrame + :type name: str + :type coffset: int + :type roffset: int + :type rows: int + :type cols: int + :type format: str + + + """ + original_df = df + dim = len(df.axes) if hasattr(df, 'axes') else -1 + num_rows = df.shape[0] + num_cols = df.shape[1] if dim > 1 else 1 + format = format.replace('%', '') + + if not format: + if num_rows > 0 and num_cols == 1: # series or data frame with one column + try: + kind = df.dtype.kind + except AttributeError: + try: + kind = df.dtypes[0].kind + except (IndexError, KeyError, AttributeError): + kind = 'O' + format = array_default_format(kind) + else: + format = array_default_format(DEFAULT_DF_FORMAT) + + xml = slice_to_xml(name, num_rows, num_cols, format, "", (0, 0)) + + if (rows, cols) == (-1, -1): + rows, cols = num_rows, num_cols + + elif (rows, cols) == (0, 0): + # return header only + r = min(num_rows, DATAFRAME_HEADER_LOAD_MAX_SIZE) + c = min(num_cols, DATAFRAME_HEADER_LOAD_MAX_SIZE) + xml += header_data_to_xml(r, c, [""] * num_cols, [(0, 0)] * num_cols, lambda x: DEFAULT_DF_FORMAT, original_df, dim) + return xml + + rows = min(rows, MAXIMUM_ARRAY_SIZE) + cols = min(cols, MAXIMUM_ARRAY_SIZE, num_cols) + # need to precompute column bounds here before slicing! + col_bounds = [None] * cols + dtypes = [None] * cols + if dim > 1: + for col in range(cols): + dtype = df.dtypes.iloc[coffset + col].kind + dtypes[col] = dtype + if dtype in NUMPY_NUMERIC_TYPES and df.size != 0: + cvalues = df.iloc[:, coffset + col] + bounds = (cvalues.min(), cvalues.max()) + else: + bounds = (0, 0) + col_bounds[col] = bounds + elif dim == -1: + dtype = '0' + dtypes[0] = dtype + col_bounds[0] = (df.min(), df.max()) if dtype in NUMPY_NUMERIC_TYPES and df.size != 0 else (0, 0) + else: + dtype = df.dtype.kind + dtypes[0] = dtype + col_bounds[0] = (df.min(), df.max()) if dtype in NUMPY_NUMERIC_TYPES and df.size != 0 else (0, 0) + + if dim > 1: + df = df.iloc[roffset: roffset + rows, coffset: coffset + cols] + elif dim == -1: + df = df[roffset: roffset + rows] + else: + df = df.iloc[roffset: roffset + rows] + + rows = df.shape[0] + cols = df.shape[1] if dim > 1 else 1 + + def col_to_format(column_type): + return get_column_formatter_by_type(format, column_type) + + if dim == -1: + iat = IAtPolarsAccessor(df) + elif dim == 1 or len(df.columns.unique()) == len(df.columns): + iat = df.iat + else: + iat = df.iloc + + def formatted_row_elements(row): + return get_formatted_row_elements(row, iat, dim, cols, format, dtypes) + + xml += header_data_to_xml(rows, cols, dtypes, col_bounds, col_to_format, df, dim) + + # we already have here formatted_row_elements, so we pass here %s as a default format + xml += array_data_to_xml(rows, cols, formatted_row_elements, format='%s') + return xml + +def dataset_to_xml(dataset, name, roffset, coffset, rows, cols, format): + return dataframe_to_xml(dataset.to_pandas(), name, roffset, coffset, rows, cols, format) + + +def array_data_to_xml(rows, cols, get_row, format): + xml = "\n" % (rows, cols) + for row in range(rows): + xml += "\n" % row + for value in get_row(row): + xml += var_to_xml(value, '', format=format) + return xml + + +def slice_to_xml(slice, rows, cols, format, type, bounds): + return '' % \ + (quote(slice), rows, cols, quote(format), type, quote(str(bounds[1])), quote(str(bounds[0]))) + + +def header_data_to_xml(rows, cols, dtypes, col_bounds, col_to_format, df, dim): + xml = "\n" % (rows, cols) + for col in range(cols): + col_label = quote(get_label(df.axes[1][col]) if dim > 1 else str(col)) + bounds = col_bounds[col] + col_format = "%" + col_to_format(dtypes[col]) + xml += '\n' % \ + (str(col), col_label, dtypes[col], col_to_format(dtypes[col]), quote(str(col_format % bounds[1])), quote(str(col_format % bounds[0]))) + for row in range(rows): + xml += "\n" % (str(row), quote(get_label(df.axes[0][row] if dim != -1 else str(row)))) + xml += "\n" + return xml + + +def is_able_to_format_number(format): + try: + format % math.pi + except Exception: + return False + return True + + +TYPE_TO_XML_CONVERTERS = { + "ndarray": array_to_xml, + "recarray": array_to_xml, + "DataFrame": dataframe_to_xml, + "Series": dataframe_to_xml, + "GeoDataFrame": dataframe_to_xml, + "GeoSeries": dataframe_to_xml, + "EagerTensor": tf_to_xml, + "ResourceVariable": tf_to_xml, + "SparseTensor": tf_sparse_to_xml, + "Tensor": torch_to_xml, + "Dataset": dataset_to_xml +} + + +def table_like_struct_to_xml(array, name, roffset, coffset, rows, cols, format): + _, type_name, _ = get_type(array) + format = format if is_able_to_format_number(format) else '%' + if type_name in TYPE_TO_XML_CONVERTERS: + return "%s" % TYPE_TO_XML_CONVERTERS[type_name](array, name, roffset, coffset, rows, cols, format) + else: + raise VariableError("type %s not supported" % type_name) diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/__init__.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/__init__.py new file mode 100644 index 000000000000..61d08844749b --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/__init__.py @@ -0,0 +1 @@ +# Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/images/__init__.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/images/__init__.py new file mode 100644 index 000000000000..24b8f7d76125 --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/images/__init__.py @@ -0,0 +1 @@ +# Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/images/pydevd_image_loader.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/images/pydevd_image_loader.py new file mode 100644 index 000000000000..6bfffd3789a4 --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/images/pydevd_image_loader.py @@ -0,0 +1,54 @@ +# Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +import base64 +import io +import uuid + +IMAGE_DATA_STORAGE = {} +DEFAULT_IMAGE_FORMAT = 'PNG' +DEFAULT_ENCODING = 'utf-8' +GRAYSCALE_MODE = 'L' +RGB_MODE = 'RGB' +RGBA_MODE = 'RGBA' +CHUNK_SIZE = 8192 + +def load_image_chunk(offset, image_id): + # type: (int, str) -> str + try: + bytes_data = IMAGE_DATA_STORAGE.get(image_id) + if bytes_data is None: + return "Error: No image data found." + chunk = bytes_data[offset:offset + CHUNK_SIZE] + next_offset = offset + CHUNK_SIZE + if next_offset >= len(bytes_data): + next_offset = -1 + IMAGE_DATA_STORAGE.pop(image_id, None) + chunk_bytes = base64.b64encode(chunk) + if not isinstance(chunk_bytes, str): + chunk_bytes = chunk_bytes.decode(DEFAULT_ENCODING) + return "{};{}".format(chunk_bytes, next_offset) + except ValueError: + return "Error: Invalid offset format." + except Exception as e: + return "Error: {}".format(e) + + +def save_image_to_storage(image_data, data_type=None, format=DEFAULT_IMAGE_FORMAT, save_func=None): + # type: (any, str, str, callable) -> str + try: + bytes_buffer = io.BytesIO() + try: + if save_func: + save_func(bytes_buffer, format) + else: + image_data.save(bytes_buffer, format=format) + bytes_buffer.seek(0) + bytes_data = bytes_buffer.getvalue() + image_id = str(uuid.uuid4()) + IMAGE_DATA_STORAGE[image_id] = bytes_data + if data_type is None: + data_type = "None" + return "{};{};{}".format(image_id, len(bytes_data), data_type) + finally: + bytes_buffer.close() + except Exception as e: + return "Error: {}".format(e) diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/images/pydevd_matplotlib_image.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/images/pydevd_matplotlib_image.py new file mode 100644 index 000000000000..ad692f59f3f4 --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/images/pydevd_matplotlib_image.py @@ -0,0 +1,25 @@ +# Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +from _pydevd_bundle.tables.images.pydevd_image_loader import save_image_to_storage, DEFAULT_IMAGE_FORMAT + + +def create_image(figure): + # type: (Union[matplotlib.figure.Figure | plotly.graph_objs._figure.Figure]) -> str + try: + try: + import matplotlib.figure + except ImportError: + matplotlib = None + + try: + from plotly.graph_objects import Figure as PlotlyFigure + except ImportError: + PlotlyFigure = None + + if matplotlib and isinstance(figure, matplotlib.figure.Figure): + return save_image_to_storage(figure, format=DEFAULT_IMAGE_FORMAT, save_func=lambda buffer, fmt: figure.savefig(buffer, format=fmt)) + elif PlotlyFigure and isinstance(figure, PlotlyFigure): + return save_image_to_storage(figure, format=DEFAULT_IMAGE_FORMAT, save_func=lambda buffer, fmt: buffer.write(figure.to_image(format=fmt))) + else: + return "Error: Unsupported figure type." + except Exception as e: + return "Error: {}".format(e) diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/images/pydevd_numpy_based_image.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/images/pydevd_numpy_based_image.py new file mode 100644 index 000000000000..34f947ef0aa8 --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/images/pydevd_numpy_based_image.py @@ -0,0 +1,103 @@ +# Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +import numpy as np +from _pydevd_bundle.tables.images.pydevd_image_loader import (save_image_to_storage, GRAYSCALE_MODE, RGB_MODE, RGBA_MODE) + +try: + import tensorflow as tf +except ImportError: + pass +try: + import torch +except ImportError: + pass + + +MAX_PIXELS = 144_000_000 + +def create_image(arr): + # type: (np.ndarray) -> str + try: + from PIL import Image + + if hasattr(arr.dtype, 'name'): + data_type = arr.dtype.name + else: + data_type = arr.dtype + arr_to_convert = arr + + try: + import tensorflow as tf + if isinstance(arr_to_convert, tf.SparseTensor): + arr_to_convert = tf.sparse.to_dense(tf.sparse.reorder(arr_to_convert)) + except ImportError: + pass + try: + import torch + if isinstance(arr_to_convert, torch.Tensor): + if arr_to_convert.requires_grad: + arr_to_convert = arr_to_convert.detach() + arr_to_convert = arr_to_convert.to_dense() + except Exception: + pass + + arr_to_convert = arr_to_convert.numpy() + arr_to_convert = np.where(arr_to_convert == None, 0, arr_to_convert) + arr_to_convert = np.nan_to_num(arr_to_convert, nan=0, posinf=255, neginf=0) + + if np.iscomplexobj(arr_to_convert) or np.issubdtype(arr_to_convert.dtype, np.timedelta64): + raise ValueError("Only non-complex numeric array types are supported.") + + if arr_to_convert.ndim == 1: + arr_to_convert = np.expand_dims(arr_to_convert, axis=0) + elif arr_to_convert.ndim == 3 and arr_to_convert.shape[2] == 1: + arr_to_convert = arr_to_convert[:, :, 0] + + h, w = arr_to_convert.shape[:2] + channels = arr_to_convert.shape[2] if arr_to_convert.ndim == 3 else 1 + total_pixels = h * w * channels + if total_pixels > MAX_PIXELS: + scale = (MAX_PIXELS / total_pixels) ** 0.5 + new_h, new_w = max(1, int(h * scale)), max(1, int(w * scale)) + arr_to_convert = average_pooling(arr_to_convert, new_h, new_w) + + arr_min, arr_max = arr_to_convert.min(), arr_to_convert.max() + is_float = np.issubdtype(arr_to_convert.dtype, np.floating) + is_bool = np.issubdtype(arr_to_convert.dtype, np.bool_) + + if (is_float or is_bool) and 0 <= arr_min <= 1 and 0 <= arr_max <= 1: # bool and float in [0; 1] + arr_to_convert = (arr_to_convert * 255).astype(np.uint8) + elif arr_min != arr_max and (arr_min < 0 or arr_max > 255): # other values out of [0; 255] + arr_to_convert = ((arr_to_convert - arr_min) * 255 / (arr_max - arr_min)).astype(np.uint8) + elif arr_min == arr_max and (arr_min < 0 or arr_max > 255): + arr_to_convert = (np.ones_like(arr_to_convert) * 127).astype(np.uint8) + else: # values in [0; 255] + arr_to_convert = arr_to_convert.astype(np.uint8) + + if arr_to_convert.ndim == 2: + mode = GRAYSCALE_MODE + elif arr_to_convert.ndim == 3 and arr_to_convert.shape[2] == 4: + mode = RGBA_MODE + else: + mode = RGB_MODE + + return save_image_to_storage(Image.fromarray(arr_to_convert, mode=mode), data_type=data_type) + + except ImportError: + return "Error: Pillow library is not installed." + except (TypeError, ValueError): + return "Error: Only non-complex numeric array types are supported." + except Exception as e: + return "Error: {}".format(e) + + +def average_pooling(arr, target_h, target_w): + # type: (np.ndarray, int, int) -> np.ndarray + h, w = arr.shape[:2] + factor_h, factor_w = int(h / target_h), int(w / target_w) + arr_cropped = arr[:target_h * factor_h, :target_w * factor_w] + + if arr.ndim == 2: + reshaped = arr_cropped.reshape(target_h, factor_h, target_w, factor_w) + elif arr.ndim == 3: + reshaped = arr_cropped.reshape(target_h, factor_h, target_w, factor_w, arr.shape[2]) + return reshaped.mean(axis=(1, 3)) diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/images/pydevd_numpy_image.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/images/pydevd_numpy_image.py new file mode 100644 index 000000000000..1148bdc81aff --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/images/pydevd_numpy_image.py @@ -0,0 +1,79 @@ +# Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +import numpy as np +from _pydevd_bundle.tables.images.pydevd_image_loader import (save_image_to_storage, GRAYSCALE_MODE, RGB_MODE, RGBA_MODE) + +MAX_PIXELS = 144_000_000 +MAX_DIMENSION = 15_000 + +def create_image(arr): + # type: (np.ndarray) -> str + try: + from PIL import Image + + data_type = arr.dtype.name + arr_to_convert = arr + + arr_to_convert = np.where(arr_to_convert == None, 0, arr_to_convert) + arr_to_convert = np.nan_to_num(arr_to_convert, nan=0, posinf=255, neginf=0) + + if np.iscomplexobj(arr_to_convert) or np.issubdtype(arr_to_convert.dtype, np.timedelta64): + raise ValueError("Only non-complex numeric array types are supported.") + + if arr_to_convert.ndim == 1: + arr_to_convert = np.expand_dims(arr_to_convert, axis=0) + elif arr_to_convert.ndim == 3 and arr_to_convert.shape[2] == 1: + arr_to_convert = arr_to_convert[:, :, 0] + + h, w = arr_to_convert.shape[:2] + channels = arr_to_convert.shape[2] if arr_to_convert.ndim == 3 else 1 + total_pixels = h * w * channels + if (total_pixels > MAX_PIXELS) or (h > MAX_DIMENSION) or (w > MAX_DIMENSION): + scale_h = min(1.0, MAX_DIMENSION / float(h)) + scale_w = min(1.0, MAX_DIMENSION / float(w)) + scale_p = (MAX_PIXELS / float(total_pixels)) ** 0.5 if total_pixels > MAX_PIXELS else 1.0 + scale = min(scale_h, scale_w, scale_p) + new_h, new_w = max(1, int(round(h * scale))), max(1, int(round(w * scale))) + if new_h < h or new_w < w: + arr_to_convert = average_pooling(arr_to_convert, new_h, new_w) + + arr_min, arr_max = arr_to_convert.min(), arr_to_convert.max() + is_float = np.issubdtype(arr_to_convert.dtype, np.floating) + is_bool = np.issubdtype(arr_to_convert.dtype, np.bool_) + + if (is_float or is_bool) and 0 <= arr_min <= 1 and 0 <= arr_max <= 1: # bool and float in [0; 1] + arr_to_convert = (arr_to_convert * 255).astype(np.uint8) + elif arr_min != arr_max and (arr_min < 0 or arr_max > 255): + arr_to_convert = ((arr_to_convert - arr_min) * 255 / (arr_max - arr_min)).astype(np.uint8) # other values out of [0; 255] + elif arr_min == arr_max and (arr_min < 0 or arr_max > 255): + arr_to_convert = (np.ones_like(arr_to_convert) * 127).astype(np.uint8) + else: # values in [0; 255] + arr_to_convert = arr_to_convert.astype(np.uint8) + + if arr_to_convert.ndim == 2: + mode = GRAYSCALE_MODE + elif arr_to_convert.ndim == 3 and arr_to_convert.shape[2] == 4: + mode = RGBA_MODE + else: + mode = RGB_MODE + + return save_image_to_storage(Image.fromarray(arr_to_convert, mode=mode), data_type=data_type) + + except ImportError: + return "Error: Pillow library is not installed." + except (TypeError, ValueError): + return "Error: Only non-complex numeric array types are supported." + except Exception as e: + return "Error: {}".format(e) + + +def average_pooling(arr, target_h, target_w): + # type: (np.ndarray, int, int) -> np.ndarray + h, w = arr.shape[:2] + factor_h, factor_w = int(h / target_h), int(w / target_w) + arr_cropped = arr[:target_h * factor_h, :target_w * factor_w] + + if arr.ndim == 2: + reshaped = arr_cropped.reshape(target_h, factor_h, target_w, factor_w) + elif arr.ndim == 3: + reshaped = arr_cropped.reshape(target_h, factor_h, target_w, factor_w, arr.shape[2]) + return reshaped.mean(axis=(1, 3)) diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/images/pydevd_pillow_image.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/images/pydevd_pillow_image.py new file mode 100644 index 000000000000..467eff21494a --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/images/pydevd_pillow_image.py @@ -0,0 +1,8 @@ +# Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +import PIL +from _pydevd_bundle.tables.images.pydevd_image_loader import save_image_to_storage, DEFAULT_IMAGE_FORMAT + +def create_image(pillow_image): + # type: (PIL.Image.Image) -> str + image_format = pillow_image.format if pillow_image.format else DEFAULT_IMAGE_FORMAT + return save_image_to_storage(pillow_image, format=image_format) diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/pydevd_dataset.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/pydevd_dataset.py new file mode 100644 index 000000000000..dff9057c7f1a --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/pydevd_dataset.py @@ -0,0 +1,157 @@ +# Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +import pandas as pd + +TABLE_TYPE_NEXT_VALUE_SEPARATOR = '__pydev_table_column_type_val__' +MAX_COLWIDTH_PYTHON_2 = 100000 +BATCH_SIZE = 10000 + +CSV_FORMAT_SEPARATOR = '~' + + +def get_type(table): + # type: (str) -> str + return str(type(table)) + + +# noinspection PyUnresolvedReferences +def get_shape(table): + # type: (datasets.arrow_dataset.Dataset) -> str + return str(table.shape[0]) + + +# noinspection PyUnresolvedReferences +def get_head(table): + # type: (datasets.arrow_dataset.Dataset) -> str + return repr(__convert_to_df(table.select([0])).head(1).to_html(notebook=True)) + + +# noinspection PyUnresolvedReferences +def get_column_types(table): + # type: (datasets.arrow_dataset.Dataset) -> str + table = __convert_to_df(table.select([0])) + return str(table.index.dtype) + TABLE_TYPE_NEXT_VALUE_SEPARATOR + \ + TABLE_TYPE_NEXT_VALUE_SEPARATOR.join([str(t) for t in table.dtypes]) + + +# used by pydevd +# noinspection PyUnresolvedReferences +def get_data(table, use_csv_serialization, start_index=None, end_index=None, format=None): + # type: (datasets.arrow_dataset.Dataset, int, int) -> str + + def convert_data_to_csv(data, format): + return repr(__convert_to_df(data).to_csv(na_rep = "NaN", float_format=format, sep=CSV_FORMAT_SEPARATOR)) + + def convert_data_to_html(data, format): + return repr(__convert_to_df(data).to_html(notebook=True)) + + if use_csv_serialization: + computed_data = __compute_sliced_data(table, convert_data_to_csv, start_index, end_index, format) + else: + computed_data = __compute_sliced_data(table, convert_data_to_html, start_index, end_index, format) + return computed_data + + +# used by DSTableCommands +# noinspection PyUnresolvedReferences +def display_data_html(table, start_index, end_index): + # type: (datasets.arrow_dataset.Dataset, int, int) -> None + def ipython_display(data, format): + from IPython.display import display, HTML + display(HTML(__convert_to_df(data).to_html(notebook=True))) + __compute_sliced_data(table, ipython_display, start_index, end_index) + + +# used by DSTableCommands +# noinspection PyUnresolvedReferences +def display_data_csv(table, start_index, end_index): + # type: (datasets.arrow_dataset.Dataset, int, int) -> None + def ipython_display(data, format): + try: + data = data.to_csv(na_rep = "NaN", sep=CSV_FORMAT_SEPARATOR, float_format=format) + except AttributeError: + pass + print(repr(__convert_to_df(data))) + __compute_sliced_data(table, ipython_display, start_index, end_index) + + +def __get_data_slice(table, start, end): + # type: (datasets.arrow_dataset.Dataset, int, int) -> pd.DataFrame + return __convert_to_df(table).iloc[start:end] + + +def __compute_sliced_data(table, fun, start_index=None, end_index=None, format=None): + # type: (datasets.arrow_dataset.Dataset, function, int, int) -> str + max_cols, max_colwidth, max_rows = __get_tables_display_options() + + _jb_max_cols = pd.get_option('display.max_columns') + _jb_max_colwidth = pd.get_option('display.max_colwidth') + _jb_max_rows = pd.get_option('display.max_rows') + if format is not None: + _jb_float_options = pd.get_option('display.float_format') + + pd.set_option('display.max_columns', max_cols) + pd.set_option('display.max_rows', max_rows) + pd.set_option('display.max_colwidth', max_colwidth) + + format_function = __define_format_function(format) + if format_function is not None: + pd.set_option('display.float_format', format_function) + + if start_index is not None and end_index is not None: + table = __get_data_slice(table, start_index, end_index) + + data = fun(table, pd.get_option('display.float_format')) + + pd.set_option('display.max_columns', _jb_max_cols) + pd.set_option('display.max_colwidth', _jb_max_colwidth) + pd.set_option('display.max_rows', _jb_max_rows) + if format is not None: + pd.set_option('display.float_format', _jb_float_options) + + return data + + +def __define_format_function(format): + # type: (Union[None, str]) -> Union[Callable, None] + if format is None or format == 'null': + return None + + if type(format) == str and format.startswith("%"): + return lambda x: format % x + + return None + + +def __get_tables_display_options(): + # type: () -> Tuple[None, Union[int, None], None] + try: + # In pandas versions earlier than 1.0, max_colwidth must be set as an integer + if int(pd.__version__.split('.')[0]) < 1: + return None, MAX_COLWIDTH_PYTHON_2, None + except ImportError: + pass + return None, None, None + + +# noinspection PyUnresolvedReferences +def __convert_to_df(table): + # type: (datasets.arrow_dataset.Dataset) -> pd.DataFrame + try: + import datasets + if type(table) is datasets.arrow_dataset.Dataset: + return __dataset_to_df(table) + except ImportError as e: + pass + return table + + +def __dataset_to_df(dataset): + # type: (datasets.arrow_dataset.Dataset) -> pd.DataFrame + try: + dataset_as_df = list(dataset.to_pandas(batched=True, batch_size=min(len(dataset), BATCH_SIZE))) + if len(dataset_as_df) > 1: + return pd.concat(dataset_as_df, ignore_index=True) + else: + return dataset_as_df[0] + except ImportError as e: + pass \ No newline at end of file diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/pydevd_numpy.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/pydevd_numpy.py new file mode 100644 index 000000000000..f95408226d7d --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/pydevd_numpy.py @@ -0,0 +1,405 @@ +# Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +import io +import numpy as np + +TABLE_TYPE_NEXT_VALUE_SEPARATOR = '__pydev_table_column_type_val__' +MAX_COLWIDTH = 100000 + +ONE_DIM, TWO_DIM, WITH_TYPES = range(3) +NP_ROWS_TYPE = "int64" + +CSV_FORMAT_SEPARATOR = '~' + +is_pd = False +try: + import pandas as pd + is_pd = True +except: + pass + + +def get_type(table): + # type: (np.ndarray) -> str + return str(type(table)) + + +def get_shape(table): + # type: (np.ndarray) -> str + if table.dtype.names is not None: + return str((table.shape[0], len(table.dtype.names))) + if table.ndim == 1: + return str((table.shape[0], 1)) + elif table.ndim == 0: + return str((0, 0)) + else: + return str((table.shape[0], table.shape[1])) + + +def get_head(table): + # type: (np.ndarray) -> str + column_names = table.dtype.names + if column_names: + return TABLE_TYPE_NEXT_VALUE_SEPARATOR.join([str(column_names[i]) for i in range(len(column_names))]) + return "None" + + +def get_column_types(table): + # type: (np.ndarray) -> str + if table.ndim == 0: + return "" + table = __create_table(table[:1]) + try: + cols_types = [str(t) for t in table.dtypes] if is_pd else table.get_cols_types() + except AttributeError: + cols_types = table.get_cols_types() + + return NP_ROWS_TYPE + TABLE_TYPE_NEXT_VALUE_SEPARATOR + \ + TABLE_TYPE_NEXT_VALUE_SEPARATOR.join(cols_types) + + +def get_data(table, use_csv_serialization, start_index=None, end_index=None, format=None): + # type: (Union[np.ndarray, dict], int, int) -> str + def convert_data_to_html(data, format): + return repr(__create_table(data, start_index, end_index, format).to_html(notebook=True)) + + def convert_data_to_csv(data, format): + return repr(__create_table(data, start_index, end_index, format).to_csv(na_rep ="None", float_format=format, sep=CSV_FORMAT_SEPARATOR)) + + if use_csv_serialization: + computed_data = __compute_data(table, convert_data_to_csv, format) + else: + computed_data = __compute_data(table, convert_data_to_html, format) + return computed_data + + +def display_data_html(table, start_index=None, end_index=None): + # type: (np.ndarray, int, int) -> None + def ipython_display(data, format): + from IPython.display import display, HTML + display(HTML(__create_table(data, start_index, end_index).to_html(notebook=True))) + + __compute_data(table, ipython_display) + + +def display_data_csv(table, start_index=None, end_index=None): + # type: (np.ndarray, int, int) -> None + def ipython_display(data, format): + print(repr(__create_table(data, start_index, end_index).to_csv(na_rep ="None", sep=CSV_FORMAT_SEPARATOR, float_format=format))) + + __compute_data(table, ipython_display) + + +def remove_nones_values(array_part, na_rep): + if np.issubdtype(array_part.dtype, np.number): + array_part_without_nones = np.where(array_part == None, np.nan, array_part) + else: + array_part_without_nones = np.where(array_part == None, na_rep, array_part) + return array_part_without_nones + + +class _NpTable: + def __init__(self, np_array, format=None): + self.array = np_array + self.type = self.get_array_type() + self.indexes = None + self.format = format + + def get_array_type(self): + col_type = self.array.dtype + + if len(col_type) != 0: + return WITH_TYPES + + if self.array.ndim > 1: + return TWO_DIM + + return ONE_DIM + + def get_cols_types(self): + col_type = self.array.dtype + + if self.type == ONE_DIM: + # [1, 2, 3] -> [int] + return [str(col_type)] + + if self.type == WITH_TYPES: + # ([(10, 3.14), (20, 2.71)], dtype=[("ci", "i4"), ("cf", "f4")]) -> [int, float] + return [str(col_type[i]) for i in range(len(col_type))] # is not iterable + + # [[1, 2], [3, 4]] -> [int, int] + return [str(col_type) for _ in range(len(self.array[0]))] + + def head(self, num_rows): + if self.array.shape[0] < 6: + return self + + return _NpTable(self.array[:5]).sort() + + def to_html(self, notebook): + html = ['\n'] + + # columns names + html.append('\n' + '\n' + '\n') + html += self.__collect_cols_names() + html.append('\n' + '\n') + + # tbody + html += self.__collect_values(None) + + html.append('
\n') + + return "".join(html) + + def __collect_cols_names(self): + if self.type == ONE_DIM: + return ['0\n'] + + if self.type == WITH_TYPES: + columns_names = self.array.dtype.names + return ['{}\n'.format(str(columns_names[i])) for i in range(len(columns_names))] + + return ['{}\n'.format(i) for i in range(len(self.array[0]))] + + def __collect_values(self, max_cols): + html = ['\n'] + rows = self.array.shape[0] + for row_num in range(rows): + html.append('\n') + html.append('{}\n'.format(int(self.indexes[row_num]))) + if self.type == ONE_DIM: + if self.format is not None and self.array[row_num] is not None and self.array[row_num] == self.array[row_num]: + try: + value = self.format % self.array[row_num] + except Exception as _: + value = self.array[row_num] + else: + value = self.array[row_num] + html.append('{}\n'.format(value)) + else: + cols = len(self.array[0]) + max_cols = cols if max_cols is None else min(max_cols, cols) + for col_num in range(max_cols): + if self.format is not None and self.array[row_num][col_num] is not None and self.array[row_num][col_num] == self.array[row_num][col_num]: + try: + value = self.format % self.array[row_num][col_num] + except Exception as _: + value = self.array[row_num][col_num] + else: + value = self.array[row_num][col_num] + html.append('{}\n'.format(value)) + html.append('\n') + html.append('\n') + return html + + def to_csv(self, na_rep="None", float_format=None, sep=CSV_FORMAT_SEPARATOR): + csv_stream = io.StringIO() + if self.array.dtype.names is not None: + np_array_without_nones = [] + for field in self.array.dtype.names: + np_array_without_nones.append(remove_nones_values(self.array[str(field)], na_rep)) + np_array_without_nones = np.column_stack(np_array_without_nones) + else: + np_array_without_nones = remove_nones_values(self.array, na_rep) + if float_format is None or float_format == 'null': + float_format = "%s" + + np.savetxt(csv_stream, np_array_without_nones, delimiter=sep, fmt=float_format) + csv_string = csv_stream.getvalue() + csv_rows_with_index = self.__insert_index_at_rows_begging_csv(csv_string) + + col_names = self.__collect_col_names_csv() + return col_names + "\n" + csv_rows_with_index + + def __insert_index_at_rows_begging_csv(self, csv_string): + # type: (str) -> str + csv_rows = csv_string.split('\n') + csv_rows_with_index = [] + for row_index in range(self.array.shape[0]): + csv_rows_with_index.append(str(row_index) + CSV_FORMAT_SEPARATOR + csv_rows[row_index]) + return "\n".join(csv_rows_with_index) + + def __collect_col_names_csv(self): + if self.type == ONE_DIM: + return '{}0'.format(CSV_FORMAT_SEPARATOR) + + if self.type == WITH_TYPES: + return CSV_FORMAT_SEPARATOR + CSV_FORMAT_SEPARATOR.join(['{}'.format(name) for name in self.array.dtype.names]) + + # TWO_DIM + return CSV_FORMAT_SEPARATOR + CSV_FORMAT_SEPARATOR.join(['{}'.format(i) for i in range(self.array.shape[1])]) + + + def slice(self, start_index=None, end_index=None): + if end_index is not None and start_index is not None: + self.array = self.array[start_index:end_index] + self.indexes = self.indexes[start_index:end_index] + + return self + + def sort(self, sort_keys=None): + self.indexes = np.arange(self.array.shape[0]) + if sort_keys is None: + return self + + cols, orders = sort_keys + if 0 in cols: + return self.__sort_by_index(True in orders) + + if self.type == ONE_DIM: + extended = np.column_stack((self.indexes, self.array)) + sort_extended = extended[:, 1].argsort() + if False in orders: + sort_extended = sort_extended[::-1] + result = extended[sort_extended] + self.array = result[:, 1] + self.indexes = result[:, 0] + return self + + if self.type == WITH_TYPES: + new_dt = np.dtype([('_pydevd_i', 'i8')] + self.array.dtype.descr) + extended = np.zeros(self.array.shape, dtype=new_dt) + extended['_pydevd_i'] = list(range(self.array.shape[0])) + for col in self.array.dtype.names: + extended[col] = self.array[col] + + column_names = self.array.dtype.names + for i in range(len(cols) - 1, -1, -1): + name = column_names[cols[i] - 1] + sort = extended[name].argsort(kind='stable') + extended = extended[sort if orders[i] else sort[::-1]] + self.indexes = extended['_pydevd_i'] + for col in self.array.dtype.names: + self.array[col] = extended[col] + return self + + extended = np.insert(self.array, 0, self.indexes, axis=1) + for i in range(len(cols) - 1, -1, -1): + sort = extended[:, cols[i]].argsort(kind='stable') + extended = extended[sort if orders[i] else sort[::-1]] + self.indexes = extended[:, 0] + self.array = extended[:, 1:] + return self + + def __sort_by_index(self, order): + if order: + return self + self.array = self.array[::-1] + self.indexes = self.indexes[::-1] + return self + + +def __sort_df(dataframe, sort_keys): + if sort_keys is None: + return dataframe + + cols, orders = sort_keys + if 0 in cols: + if len(cols) == 1: + return dataframe.sort_index(ascending=orders[0]) + return dataframe.sort_index(level=cols, ascending=orders) + sort_by = list(map(lambda c: dataframe.columns[c - 1], cols)) + return dataframe.sort_values(by=sort_by, ascending=orders) + + +def __create_table(command, start_index=None, end_index=None, format=None): + sort_keys = None + + if type(command) is dict: + np_array = command['data'] + sort_keys = command['sort_keys'] + else: + np_array = command + + if is_pd: + sorted_df = __sort_df(pd.DataFrame(np_array), sort_keys) + if start_index is not None and end_index is not None: + sorted_df_slice = sorted_df.iloc[start_index:end_index] + # to apply "format" we should not have None inside DFs + try: + import warnings + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + sorted_df_slice = sorted_df_slice.fillna("None") + except Exception as _: + pass + return sorted_df_slice + return sorted_df + + return _NpTable(np_array, format=format).sort(sort_keys).slice(start_index, + end_index) + + +def __compute_data(arr, fun, format=None): + is_sort_command = type(arr) is dict + data = arr['data'] if is_sort_command else arr + + jb_max_cols, jb_max_colwidth, jb_max_rows, jb_float_options = None, None, None, None + if is_pd: + jb_max_cols, jb_max_colwidth, jb_max_rows, jb_float_options = __set_pd_options(format) + + if is_sort_command: + arr['data'] = data + data = arr + + format = pd.get_option('display.float_format') if is_pd else format + + data = fun(data, format) + + if is_pd: + __reset_pd_options(jb_max_cols, jb_max_colwidth, jb_max_rows, jb_float_options) + + return data + + +def __get_tables_display_options(): + # type: () -> Tuple[None, Union[int, None], None] + try: + import pandas as pd + # In pandas versions earlier than 1.0, max_colwidth must be set as an integer + if int(pd.__version__.split('.')[0]) < 1: + return None, MAX_COLWIDTH, None + except Exception: + pass + return None, None, None + + +def __set_pd_options(format): + max_cols, max_colwidth, max_rows = __get_tables_display_options() + _jb_float_options = None + + _jb_max_cols = pd.get_option('display.max_columns') + _jb_max_colwidth = pd.get_option('display.max_colwidth') + _jb_max_rows = pd.get_option('display.max_rows') + if format is not None: + _jb_float_options = pd.get_option('display.float_format') + + pd.set_option('display.max_columns', max_cols) + pd.set_option('display.max_rows', max_rows) + pd.set_option('display.max_colwidth', max_colwidth) + format_function = __define_format_function(format) + if format_function is not None: + pd.set_option('display.float_format', format_function) + + return _jb_max_cols, _jb_max_colwidth, _jb_max_rows, _jb_float_options + + +def __reset_pd_options(max_cols, max_colwidth, max_rows, float_format): + pd.set_option('display.max_columns', max_cols) + pd.set_option('display.max_colwidth', max_colwidth) + pd.set_option('display.max_rows', max_rows) + if float_format is not None: + pd.set_option('display.float_format', float_format) + + +def __define_format_function(format): + # type: (Union[None, str]) -> Union[Callable, None] + if format is None or format == 'null': + return None + + if type(format) == str and format.startswith("%"): + return lambda x: format % x + else: + return None diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/pydevd_numpy_based.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/pydevd_numpy_based.py new file mode 100644 index 000000000000..55c2c9a3de0e --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/pydevd_numpy_based.py @@ -0,0 +1,401 @@ +# Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +import io +import numpy as np + +try: + import tensorflow as tf +except ImportError: + pass +try: + import torch +except ImportError: + pass + +TABLE_TYPE_NEXT_VALUE_SEPARATOR = '__pydev_table_column_type_val__' +MAX_COLWIDTH = 100000 + +ONE_DIM, TWO_DIM = range(2) +NP_ROWS_TYPE = "int64" + +CSV_FORMAT_SEPARATOR = '~' + +is_pd_can_be_imported = False +try: + import pandas as pd + is_pd_can_be_imported = True +except: + pass + + +def get_type(table): + # type: (np.ndarray) -> str + return str(type(table)) + + +def get_shape(table): + # type: (np.ndarray) -> str + shape = None + try: + import tensorflow as tf + if isinstance(table, tf.SparseTensor): + shape = table.dense_shape.numpy() + else: + shape = table.shape + except Exception: + shape = table.shape + + if len(shape) == 1: + return str((int(shape[0]), 1)) + else: + return str((int(shape[0]), int(shape[1]))) + + +def get_head(table): + # type: (np.ndarray) -> str + return "None" + + +def get_column_types(table): + # type: (np.ndarray) -> str + is_pandas = __is_pandas_can_be_used_for_array(table) + table = __create_table(table) + cols_types = [str(t) for t in table.dtypes] if is_pandas else table.get_cols_types() + + return NP_ROWS_TYPE + TABLE_TYPE_NEXT_VALUE_SEPARATOR + \ + TABLE_TYPE_NEXT_VALUE_SEPARATOR.join(cols_types) + + +def get_data(table, use_csv_serialization, start_index=None, end_index=None, format=None): + # type: (Union[np.ndarray, dict], bool, Union[int, None], Union[int, None], Union[str, None]) -> str + def convert_data_to_html(data, format): + return repr(__create_table(data, start_index, end_index, format).to_html(notebook=True)) + + def convert_data_to_csv(data, format): + return repr(__create_table(data, start_index, end_index, format).to_csv(na_rep ="None", float_format=format, sep=CSV_FORMAT_SEPARATOR)) + + if use_csv_serialization: + computed_data = __compute_data(table, convert_data_to_csv, format) + else: + computed_data = __compute_data(table, convert_data_to_html, format) + return computed_data + + +def display_data_html(table, start_index=None, end_index=None): + # type: (np.ndarray, int, int) -> None + def ipython_display(data, format): + from IPython.display import display, HTML + display(HTML(__create_table(data, start_index, end_index).to_html(notebook=True))) + + __compute_data(table, ipython_display) + + +def display_data_csv(table, start_index=None, end_index=None): + # type: (np.ndarray, int, int) -> None + def ipython_display(data, format): + print(repr(__create_table(data, start_index, end_index).to_csv(na_rep ="None", sep=CSV_FORMAT_SEPARATOR, float_format=format))) + + __compute_data(table, ipython_display) + + +class _NpTable: + def __init__(self, np_array, format=None): + self.array = np_array + self.type = self.get_array_type() + self.indexes = None + self.format = format + + def get_array_type(self): + if len(self.array.shape) > 1: + return TWO_DIM + + return ONE_DIM + + def get_cols_types(self): + dtype = self.array.dtype + if "torch" in str(dtype): + col_type = dtype + else: + col_type = dtype.name + + if self.type == ONE_DIM: + # [1, 2, 3] -> [int] + return [str(col_type)] + + # [[1, 2], [3, 4]] -> [int, int] + return [str(col_type) for _ in range(len(self.array[0]))] + + def head(self, num_rows): + if self.array.shape[0] < 6: + return self + + return _NpTable(self.array[:num_rows]).sort() + + def to_html(self, notebook): + html = ['\n'] + + # columns names + html.append('\n' + '\n' + '\n') + html += self.__collect_cols_names_html() + html.append('\n' + '\n') + + # tbody + html += self.__collect_values_html(None) + + html.append('
\n') + + return "".join(html) + + def __collect_cols_names_html(self): + if self.type == ONE_DIM: + return ['0\n'] + + return ['{}\n'.format(i) for i in range(len(self.array[0]))] + + def __collect_values_html(self, max_cols): + html = ['\n'] + rows = self.array.shape[0] + for row_num in range(rows): + html.append('\n') + html.append('{}\n'.format(int(self.indexes[row_num]))) + if self.type == ONE_DIM: + # None usually is not supported in tensors, but to be totally sure + if self.format is not None and self.array[row_num] is not None and self.array[row_num] == self.array[row_num]: + try: + value = self.format % self.array[row_num] + except Exception as _: + value = self.array[row_num] + else: + value = self.array[row_num] + html.append('{}\n'.format(value)) + else: + cols = len(self.array[0]) + max_cols = cols if max_cols is None else min(max_cols, cols) + for col_num in range(max_cols): + if self.format is not None and self.array[row_num][col_num] is not None and self.array[row_num][col_num] == self.array[row_num][col_num]: + try: + value = self.format % self.array[row_num][col_num] + except Exception as _: + value = self.array[row_num][col_num] + else: + value = self.array[row_num][col_num] + html.append('{}\n'.format(value)) + html.append('\n') + html.append('\n') + return html + + # TODO: won't work for not-CPU-stored arrays + def to_csv(self, na_rep = "None", float_format=None, sep=CSV_FORMAT_SEPARATOR): + csv_stream = io.StringIO() + if float_format is None or float_format == 'null': + float_format = "%s" + + np.savetxt(csv_stream, self.array, delimiter=CSV_FORMAT_SEPARATOR, fmt=float_format) + csv_string = csv_stream.getvalue() + csv_rows_with_index = self.__insert_index_at_rows_begging_csv(csv_string) + + col_names = self.__collect_col_names_csv() + return col_names + "\n" + csv_rows_with_index + + def __insert_index_at_rows_begging_csv(self, csv_string): + # type: (str) -> str + csv_rows = csv_string.split('\n') + csv_rows_with_index = [] + for row_index in range(self.array.shape[0]): + csv_rows_with_index.append(str(row_index) + CSV_FORMAT_SEPARATOR + csv_rows[row_index]) + return "\n".join(csv_rows_with_index) + + def __collect_col_names_csv(self): + if self.type == ONE_DIM: + return '{}0'.format(CSV_FORMAT_SEPARATOR) + + # TWO_DIM + return CSV_FORMAT_SEPARATOR + CSV_FORMAT_SEPARATOR.join(['{}'.format(i) for i in range(self.array.shape[1])]) + + def slice(self, start_index=None, end_index=None): + if end_index is not None and start_index is not None: + self.array = self.array[start_index:end_index] + self.indexes = self.indexes[start_index:end_index] + + return self + + def sort(self, sort_keys=None): + self.indexes = np.arange(self.array.shape[0]) + if sort_keys is None: + return self + + cols, orders = sort_keys + if 0 in cols: + return self.__sort_by_index(True in orders) + + if self.type == ONE_DIM: + extended = np.column_stack((self.indexes, self.array)) + sort_extended = extended[:, 1].argsort() + if False in orders: + sort_extended = sort_extended[::-1] + result = extended[sort_extended] + self.array = result[:, 1] + self.indexes = result[:, 0] + return self + + extended = np.insert(self.array, 0, self.indexes, axis=1) + for i in range(len(cols) - 1, -1, -1): + sort = extended[:, cols[i]].argsort(kind='stable') + extended = extended[sort if orders[i] else sort[::-1]] + self.indexes = extended[:, 0] + self.array = extended[:, 1:] + return self + + def __sort_by_index(self, order): + if order: + return self + self.array = self.array[::-1] + self.indexes = self.indexes[::-1] + return self + + +def __sort_df(dataframe, sort_keys): + if sort_keys is None: + return dataframe + + cols, orders = sort_keys + if 0 in cols: + if len(cols) == 1: + return dataframe.sort_index(ascending=orders[0]) + return dataframe.sort_index(level=cols, ascending=orders) + sort_by = list(map(lambda c: dataframe.columns[c - 1], cols)) + return dataframe.sort_values(by=sort_by, ascending=orders) + + +def __create_table(command, start_index=None, end_index=None, format=None): + sort_keys = None + + if type(command) is dict: + np_array = command['data'] + sort_keys = command['sort_keys'] + else: + np_array = command + + try: + import tensorflow as tf + if isinstance(np_array, tf.SparseTensor): + np_array = tf.sparse.to_dense(tf.sparse.reorder(np_array)) + except Exception: + pass + try: + import torch + if isinstance(np_array, torch.Tensor): + if np_array.requires_grad: + np_array = np_array.detach() + np_array = np_array.to_dense() + except Exception: + pass + + is_pandas = __is_pandas_can_be_used_for_array(np_array) + if is_pandas: + sorting_arr = __sort_df(pd.DataFrame(np_array), sort_keys) + if start_index is not None and end_index is not None: + return sorting_arr.iloc[start_index:end_index] + return sorting_arr + + return _NpTable(np_array, format=format).sort(sort_keys).slice(start_index, end_index) + + +def __compute_data(arr, fun, format=None): + is_sort_command = type(arr) is dict + data = arr['data'] if is_sort_command else arr + + try: + import tensorflow as tf + if data.dtype == tf.bfloat16: + data = tf.convert_to_tensor(data.numpy().astype(np.float32)) + except Exception: + pass + + jb_max_cols, jb_max_colwidth, jb_max_rows, jb_float_options = None, None, None, None + is_pandas = __is_pandas_can_be_used_for_array(arr) + if is_pandas: + jb_max_cols, jb_max_colwidth, jb_max_rows, jb_float_options = __set_pd_options(format) + + if is_sort_command: + arr['data'] = data + data = arr + + format = pd.get_option('display.float_format') if is_pandas else format + + data = fun(data, format) + + if is_pandas: + __reset_pd_options(jb_max_cols, jb_max_colwidth, jb_max_rows, jb_float_options) + + return data + + +def __get_tables_display_options(): + # type: () -> Tuple[None, Union[int, None], None] + try: + import pandas as pd + # In pandas versions earlier than 1.0, max_colwidth must be set as an integer + if int(pd.__version__.split('.')[0]) < 1: + return None, MAX_COLWIDTH, None + except Exception: + pass + return None, None, None + + +def __set_pd_options(format): + max_cols, max_colwidth, max_rows = __get_tables_display_options() + _jb_float_options = None + + _jb_max_cols = pd.get_option('display.max_columns') + _jb_max_colwidth = pd.get_option('display.max_colwidth') + _jb_max_rows = pd.get_option('display.max_rows') + if format is not None: + _jb_float_options = pd.get_option('display.float_format') + + pd.set_option('display.max_columns', max_cols) + pd.set_option('display.max_rows', max_rows) + try: + pd.set_option('display.max_colwidth', max_colwidth) + except ValueError: + pd.set_option('display.max_colwidth', MAX_COLWIDTH) + + format_function = __define_format_function(format) + if format_function is not None: + pd.set_option('display.float_format', format_function) + + return _jb_max_cols, _jb_max_colwidth, _jb_max_rows, _jb_float_options + + +def __reset_pd_options(max_cols, max_colwidth, max_rows, float_format): + pd.set_option('display.max_columns', max_cols) + pd.set_option('display.max_colwidth', max_colwidth) + pd.set_option('display.max_rows', max_rows) + if float_format is not None: + pd.set_option('display.float_format', float_format) + + +def __define_format_function(format): + # type: (Union[None, str]) -> Union[Callable, None] + if format is None or format == 'null': + return None + + if type(format) == str and format.startswith("%"): + return lambda x: format % x + else: + return None + +def __is_pandas_can_be_used_for_array(array): + is_cpu_stored = True + try: + device = str(array.device).lower() + # check mac + if "cpu" in device: + is_cpu_stored = True + else: + is_cpu_stored = False + except: + pass + return is_pd_can_be_imported and is_cpu_stored diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/pydevd_pandas.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/pydevd_pandas.py new file mode 100644 index 000000000000..f512755065fa --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/pydevd_pandas.py @@ -0,0 +1,520 @@ +# Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +import numpy as np +import pandas as pd +import typing +from collections import OrderedDict +import sys +if sys.version_info < (3, 0): + from collections import Iterable +else: + from collections.abc import Iterable + +TABLE_TYPE_NEXT_VALUE_SEPARATOR = '__pydev_table_column_type_val__' +MAX_COLWIDTH = 100000 +CSV_FORMAT_SEPARATOR = '~' +DASH_SYMBOL = '\u2014' +UNSUPPORTED_KINDS = {"c", "V"} # complex, void/raw +OBJECT_SAMPLE_LIMIT = 10 + + +class InspectionResultsDict: + KEY_INSPECTION_NAME = "inspection" + + KEY_STATUS = "executionStatus" + VALUE_STATUS_SUCCESS = "SUCCESS" + VALUE_STATUS_FAILED = "FAILED" + + KEY_IS_TRIGGERED = "isTriggered" + VALUE_TRIGGERED_NO = "NO" + VALUE_TRIGGERED_YES = "YES" + + KEY_DETAILS = "inspectionResultDetails" + KEY_DETAILS_TYPE = "type" + VALUE_DETAILS_TYPE_ALL = "All" + VALUE_DETAILS_TYPE_PER_COLUMN = "PerColumn" + + KEY_DETAILS_VALUE = "value" + + +class ColumnVisualisationType: + HISTOGRAM = "histogram" + UNIQUE = "unique" + PERCENTAGE = "percentage" + + +class ColumnVisualisationUtils: + NUM_BINS = 20 + MAX_UNIQUE_VALUES_TO_SHOW_IN_VIS = 3 + UNIQUE_VALUES_PERCENT = 50 + + TABLE_OCCURRENCES_COUNT_NEXT_COLUMN_SEPARATOR = '__pydev_table_occurrences_count_next_column__' + TABLE_OCCURRENCES_COUNT_NEXT_VALUE_SEPARATOR = '__pydev_table_occurrences_count_next_value__' + TABLE_OCCURRENCES_COUNT_DICT_SEPARATOR = '__pydev_table_occurrences_count_dict__' + TABLE_OCCURRENCES_COUNT_OTHER = '__pydev_table_other__' + + +def get_type(table): + # type: (str) -> str + return str(type(table)) + + +# noinspection PyUnresolvedReferences +def get_shape(table): + # type: (Union[pd.DataFrame, pd.Series]) -> str + return str(table.shape[0]) + + +# noinspection PyUnresolvedReferences +def get_head(table): + # type: (Union[pd.DataFrame, pd.Series]) -> str + return repr(__convert_to_df(table).head(1).to_html(notebook=True, max_cols=None)) + + +# noinspection PyUnresolvedReferences +def get_column_types(table): + # type: (Union[pd.DataFrame, pd.Series]) -> str + table = __convert_to_df(table) + return str(table.index.dtype) + TABLE_TYPE_NEXT_VALUE_SEPARATOR + \ + TABLE_TYPE_NEXT_VALUE_SEPARATOR.join([str(t) for t in table.dtypes]) + + +# used by pydevd +# noinspection PyUnresolvedReferences +def get_data(table, use_csv_serialization, start_index=None, end_index=None, format=None): + # type: (Union[pd.DataFrame, pd.Series], bool, int, int) -> str + + def convert_data_to_csv(data, format): + return repr(__convert_to_df(data).to_csv(na_rep = "NaN", float_format=format, sep=CSV_FORMAT_SEPARATOR)) + + def convert_data_to_html(data, format): + return repr(__convert_to_df(data).to_html(notebook=True)) + + if use_csv_serialization: + computed_data = __compute_sliced_data(table, convert_data_to_csv, start_index, end_index, format) + else: + computed_data = __compute_sliced_data(table, convert_data_to_html, start_index, end_index, format) + return computed_data + + +# used by DSTableCommands +# noinspection PyUnresolvedReferences +def display_data_html(table, start_index, end_index): + # type: (Union[pd.DataFrame, pd.Series], int, int) -> None + def ipython_display(data, format): + from IPython.display import display, HTML + display(HTML(__convert_to_df(data).to_html(notebook=True))) + __compute_sliced_data(table, ipython_display, start_index, end_index) + + +# used by DSTableCommands +# noinspection PyUnresolvedReferences +def display_data_csv(table, start_index, end_index): + # type: (Union[pd.DataFrame, pd.Series], int, int) -> None + def ipython_display(data, format): + try: + data = data.to_csv(na_rep = "NaN", sep=CSV_FORMAT_SEPARATOR, float_format=format) + except AttributeError: + pass + print(repr(__convert_to_df(data))) + __compute_sliced_data(table, ipython_display, start_index, end_index) + + +def get_column_descriptions(table): + # type: (Union[pd.DataFrame, pd.Series]) -> str + described_result = __get_describe(table) + + if described_result is not None: + return get_data(described_result, None, None) + else: + return "" + + +def get_value_occurrences_count(table): + import warnings + df = __convert_to_df(table) + bin_counts = [] + + with warnings.catch_warnings(): + warnings.simplefilter("ignore") # Suppress all + for _, column_data in df.items(): + column_visualisation_type, result = __analyze_column(column_data) + + bin_counts.append(str({column_visualisation_type:result})) + return ColumnVisualisationUtils.TABLE_OCCURRENCES_COUNT_NEXT_COLUMN_SEPARATOR.join(bin_counts) + + +def get_inspection_none_count(table): + def _calculate_none_count(cur_table): + """Calculate missing values per column""" + results_per_column = [] + for col, missing_count in cur_table.isna().sum().items(): + if missing_count > 0: + results_per_column.append({ + "columnName": col, + "value": str(missing_count) + }) + + is_triggered = len(results_per_column) > 0 + details = __create_per_column_details(results_per_column) if is_triggered else None + return __create_success_result(is_triggered, details) + + return __execute_inspection(table, _calculate_none_count, "NONE_COUNT") + + +def get_inspection_duplicate_rows(table): + def _calculate_duplicate_rows(cur_table): + duplicate_rows_number = cur_table.duplicated().sum() + is_triggered = duplicate_rows_number > 0 + details = __create_all_details(str(duplicate_rows_number)) if is_triggered else None + return __create_success_result(is_triggered, details) + + return __execute_inspection(table, _calculate_duplicate_rows, "DUPLICATE_ROWS") + + +def get_inspection_outliers(table): + def _calculate_outliers(cur_table): + results_per_column = [] + for col in cur_table.columns: + if pd.api.types.is_numeric_dtype(cur_table[col]): + q1 = cur_table[col].quantile(0.25) + q3 = cur_table[col].quantile(0.75) + iqr = q3 - q1 + lower_bound = q1 - 1.5 * iqr + upper_bound = q3 + 1.5 * iqr + + # Boolean mask for outliers + mask = (cur_table[col] < lower_bound) | (cur_table[col] > upper_bound) + outliers_count = cur_table[col][mask].count() + + if outliers_count > 0: + results_per_column.append({ + "columnName": col, + "value": str(outliers_count) + }) + + is_triggered = len(results_per_column) > 0 + details = __create_per_column_details(results_per_column) if is_triggered else None + return __create_success_result(is_triggered, details) + + return __execute_inspection(table, _calculate_outliers, "OUTLIERS") + + +def get_inspection_constant_columns(table): + def _calculate_constant_columns(cur_table): + results_per_column = [] + for col in cur_table.columns: + if cur_table[col].nunique(dropna=False) == 1: + results_per_column.append({ + "columnName": col, + "value": str(cur_table[col].iloc[0]) + }) + + is_triggered = len(results_per_column) > 0 + details = __create_per_column_details(results_per_column) if is_triggered else None + return __create_success_result(is_triggered, details) + + return __execute_inspection(table, _calculate_constant_columns, "CONSTANT_COLUMNS") + + +def __get_data_slice(table, start, end): + return __convert_to_df(table).iloc[start:end] + + +def __compute_sliced_data(table, fun, start_index=None, end_index=None, format=None): + # type: (Union[pd.DataFrame, pd.Series], function, Union[None, int], Union[None, int], Union[None, str]) -> str + + max_cols, max_colwidth, max_rows = __get_tables_display_options() + + _jb_max_cols = pd.get_option('display.max_columns') + _jb_max_colwidth = pd.get_option('display.max_colwidth') + _jb_max_rows = pd.get_option('display.max_rows') + if format is not None: + _jb_float_options = pd.get_option('display.float_format') + + pd.set_option('display.max_columns', max_cols) + pd.set_option('display.max_rows', max_rows) + pd.set_option('display.max_colwidth', max_colwidth) + + format_function = __define_format_function(format) + if format_function is not None: + pd.set_option('display.float_format', format_function) + + if start_index is not None and end_index is not None: + table = __get_data_slice(table, start_index, end_index) + + data = fun(table, pd.get_option('display.float_format')) + + pd.set_option('display.max_columns', _jb_max_cols) + pd.set_option('display.max_colwidth', _jb_max_colwidth) + pd.set_option('display.max_rows', _jb_max_rows) + if format is not None: + pd.set_option('display.float_format', _jb_float_options) + + return data + + +def __define_format_function(format): + # type: (Union[None, str]) -> Union[Callable, None] + if format is None or format == 'null': + return None + + if type(format) == str and format.startswith("%"): + return lambda x: format % x + + return None + + +def __analyze_column(column): + col_type = column.dtype + + if __is_boolean(col_type): + return ColumnVisualisationType.HISTOGRAM, __analyze_boolean_column(column) + elif __is_categorical(column, col_type): + return __analyze_categorical_column(column) + elif __is_numeric(col_type): + return ColumnVisualisationType.HISTOGRAM, __analyze_numeric_column(column) + + +def __is_boolean(col_type): + return col_type == bool + + +def __is_categorical(column, col_type): + return col_type.kind in ['O', 'S', 'U', 'M', 'm', 'c'] or column.isna().all() or col_type.kind is None + + +def __is_numeric(col_type): + return col_type.kind in ['i', 'f', 'u'] + +def __analyze_boolean_column(column): + res = column.value_counts().sort_index().to_dict(OrderedDict) + return __add_custom_key_value_separator(res.items()) + + +def __analyze_categorical_column(column): + # Processing of unhashable types (lists, dicts, etc.). + # In Polars these types are NESTED and can be processed separately, but in Pandas they are Objects + if len(column) == 0 or not isinstance(column.iloc[0], typing.Hashable): + return None, "{}" + + value_counts = column.value_counts(dropna=False, normalize=True, sort=True, ascending=False) + all_values = len(column) + vis_type = ColumnVisualisationType.PERCENTAGE + if len(value_counts) <= 3 or float(len(value_counts)) / all_values * 100 <= ColumnVisualisationUtils.UNIQUE_VALUES_PERCENT: + # If column contains <= 3 unique values no `Other` category is shown, but all of these values and their percentages + num_unique_values_to_show_in_vis = ColumnVisualisationUtils.MAX_UNIQUE_VALUES_TO_SHOW_IN_VIS - (0 if len(value_counts) == 3 else 1) + + top_values = value_counts.iloc[:num_unique_values_to_show_in_vis].apply(lambda v_c_share: round(v_c_share * 100, 1)).to_dict(OrderedDict) + if len(value_counts) == 3: + top_values[ColumnVisualisationUtils.TABLE_OCCURRENCES_COUNT_OTHER] = -1 + else: + others_count = value_counts.iloc[num_unique_values_to_show_in_vis:].sum() + top_values[ColumnVisualisationUtils.TABLE_OCCURRENCES_COUNT_OTHER] = round(others_count * 100, 1) + result = __add_custom_key_value_separator(top_values.items()) + else: + vis_type = ColumnVisualisationType.UNIQUE + top_values = len(value_counts) + result = top_values + return vis_type, result + + +def __analyze_numeric_column(column): + if column.size <= ColumnVisualisationUtils.NUM_BINS: + res = column.value_counts().sort_index().to_dict() + else: + def format_function(x): + if x == int(x): + return int(x) + else: + return round(x, 3) + + counts, bin_edges = np.histogram(column.dropna(), bins=ColumnVisualisationUtils.NUM_BINS) + + # so the long dash will be correctly viewed both on Mac and Windows + bin_labels = ['{} {} {}'.format(format_function(bin_edges[i]), DASH_SYMBOL, format_function(bin_edges[i+1])) for i in range(ColumnVisualisationUtils.NUM_BINS)] + bin_count_dict = {label: count for label, count in zip(bin_labels, counts)} + res = bin_count_dict + return __add_custom_key_value_separator(res.items()) + + +def __add_custom_key_value_separator(pairs_list): + return ColumnVisualisationUtils.TABLE_OCCURRENCES_COUNT_NEXT_VALUE_SEPARATOR.join( + ['{}{}{}'.format(key, ColumnVisualisationUtils.TABLE_OCCURRENCES_COUNT_DICT_SEPARATOR, value) for key, value in pairs_list] + ) + + +# noinspection PyUnresolvedReferences +def __convert_to_df(table): + # type: (Union[pd.DataFrame, pd.Series, pd.Categorical]) -> pd.DataFrame + try: + import geopandas + if type(table) is geopandas.GeoSeries: + return __series_to_df(table) + except ImportError: + pass + + if type(table) is pd.Series: + return __series_to_df(table) + if type(table) is pd.Categorical: + return __categorical_to_df(table) + return table + + +# pandas.Series support +def __get_column_name(table): + # type: (pd.Series) -> str + if table.name is not None: + # noinspection PyTypeChecker + return table.name + return '' + + +def __series_to_df(table): + # type: (pd.Series) -> pd.DataFrame + return table.to_frame(name=__get_column_name(table)) + + +# numpy.array support +def __array_to_df(table): + # type: (np.ndarray) -> pd.DataFrame + return pd.DataFrame(table) + + +def __categorical_to_df(table): + # type: (pd.Categorical) -> pd.DataFrame + return pd.DataFrame(table) + + +def __get_tables_display_options(): + # type: () -> Tuple[None, Union[int, None], None] + try: + # In pandas versions earlier than 1.0, max_colwidth must be set as an integer + if int(pd.__version__.split('.')[0]) < 1: + return None, MAX_COLWIDTH, None + except ImportError: + pass + return None, None, None + + +def __is_iterable(element): + # type: (any) -> bool + return isinstance(element, Iterable) + + +def __is_string(element): + # type: (any) -> bool + return isinstance(element, str) + + +def __should_skip_describe(element): + # type: (any) -> bool + if __is_string(element): + return False + if __is_iterable(element): + return True + return False + +def __is_summarizable(series): + # type: (pd.Series) -> bool + kind = series.dtype.kind + + if kind in UNSUPPORTED_KINDS: + return False + + # For object dtype, sample some values to check for lists or unstructured types + if kind == "O": + sample = series.dropna().head(OBJECT_SAMPLE_LIMIT) + if sample.map(lambda x: __should_skip_describe(x)).any(): + return False + + return True + +def __get_describe_dataframe(table): + # type: (pd.DataFrame) -> pd.DataFrame + describe_results = [] + for column_name in table.columns: + series = table[column_name] + if __is_summarizable(series): + describe_results.append(__get_describe_series(series)) + else: + describe_results.append(__get_dummy_describe_series(series)) + + return pd.concat(describe_results, axis=1) + + +def __get_describe_series(series): + # type: (pd.Series) -> pd.Series + try: + return series.describe(percentiles=[.05, .25, .5, .75, .95]) + except: + return __get_dummy_describe_series(series) + + +def __get_dummy_describe_series(series): + # type: (pd.Series) -> pd.Series + manual_data = {"count": series.notna().count()} + return pd.Series(data = manual_data, index=["count"], name=series.name) + + +def __get_describe(table): + # type: (Union[pd.DataFrame, pd.Series]) -> Union[pd.DataFrame, pd.Series, None] + try: + if isinstance(table, pd.DataFrame): + return __get_describe_dataframe(table) + else: + if __is_summarizable(table): + return __get_describe_series(table) + else: + return __get_dummy_describe_series(table) + except: + return None + + +def __serialize_in_json(result_in_dict, inspection_name): + try: + import json + result_in_dict[InspectionResultsDict.KEY_INSPECTION_NAME] = inspection_name + return json.dumps(result_in_dict) + except: + return '{"%s": "%s" "%s": "%s"}' % (InspectionResultsDict.KEY_INSPECTION_NAME, inspection_name, InspectionResultsDict.KEY_STATUS, InspectionResultsDict.VALUE_STATUS_FAILED) + + +def __execute_inspection(table, inspection_func, inspection_name): + """Execute inspection with error handling""" + try: + result = inspection_func(table) + return __serialize_in_json(result, inspection_name) + except: + failed_result = __create_failed_result() + return __serialize_in_json(failed_result, inspection_name) + + +def __create_success_result(is_triggered, details=None): + is_triggered_value = InspectionResultsDict.VALUE_TRIGGERED_YES if is_triggered else InspectionResultsDict.VALUE_TRIGGERED_NO + result = { + InspectionResultsDict.KEY_STATUS: InspectionResultsDict.VALUE_STATUS_SUCCESS, + InspectionResultsDict.KEY_IS_TRIGGERED: is_triggered_value + } + if details: + result[InspectionResultsDict.KEY_DETAILS] = details + return result + + +def __create_failed_result(): + return { + InspectionResultsDict.KEY_STATUS: InspectionResultsDict.VALUE_STATUS_FAILED, + InspectionResultsDict.KEY_IS_TRIGGERED: InspectionResultsDict.VALUE_TRIGGERED_NO + } + + +def __create_per_column_details(results_per_column): + return { + InspectionResultsDict.KEY_DETAILS_TYPE: InspectionResultsDict.VALUE_DETAILS_TYPE_PER_COLUMN, + InspectionResultsDict.KEY_DETAILS_VALUE: results_per_column + } + +def __create_all_details(value): + return { + InspectionResultsDict.KEY_DETAILS_TYPE: InspectionResultsDict.VALUE_DETAILS_TYPE_ALL, + InspectionResultsDict.KEY_DETAILS_VALUE: value + } \ No newline at end of file diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/pydevd_polars.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/pydevd_polars.py new file mode 100644 index 000000000000..2f7b0229eb9a --- /dev/null +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/custom/tables/pydevd_polars.py @@ -0,0 +1,293 @@ +# Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +import polars as pl + +TABLE_TYPE_NEXT_VALUE_SEPARATOR = '__pydev_table_column_type_val__' +MAX_COLWIDTH = 100000 +pl_version_major, pl_version_minor, _ = pl.__version__.split(".") +pl_version_major, pl_version_minor = int(pl_version_major), int(pl_version_minor) +COUNT_COL_NAME = "counts" if pl_version_major == 0 and pl_version_minor < 20 else "count" +CSV_FORMAT_SEPARATOR = '~' +DASH_SYMBOL = '\u2014' + + +class ColumnVisualisationType: + HISTOGRAM = "histogram" + UNIQUE = "unique" + PERCENTAGE = "percentage" + + +class ColumnVisualisationUtils: + NUM_BINS = 20 + MAX_UNIQUE_VALUES = 3 + MAX_UNIQUE_VALUES_TO_SHOW_IN_VIS = 50 + MAX_VALUES_LENGTH = 100 + + TABLE_OCCURRENCES_COUNT_NEXT_COLUMN_SEPARATOR = '__pydev_table_occurrences_count_next_column__' + TABLE_OCCURRENCES_COUNT_NEXT_VALUE_SEPARATOR = '__pydev_table_occurrences_count_next_value__' + TABLE_OCCURRENCES_COUNT_DICT_SEPARATOR = '__pydev_table_occurrences_count_dict__' + TABLE_OCCURRENCES_COUNT_OTHER = '__pydev_table_other__' + + +def get_type(table): + # type: (Union[pl.Series, pl.DataFrame]) -> str + return str(type(table)) + + +def get_shape(table): + # type: (Union[pl.Series, pl.DataFrame]) -> str + return str(table.shape) + + +def get_head(table): + # type: (Union[pl.Series, pl.DataFrame]) -> str + with __create_config(): + return table.head(1)._repr_html_() + + +def get_column_types(table): + # type: (Union[pl.Series, pl.DataFrame]) -> str + if type(table) == pl.Series: + return str(table.dtype) + else: + return TABLE_TYPE_NEXT_VALUE_SEPARATOR.join([str(t) for t in table.dtypes]) + + +# used by pydevd +def get_data(table, use_csv_serialization, start_index=None, end_index=None, format=None): + # type: (Union[pl.Series, pl.DataFrame], int, int) -> str + with __create_config(format): + if use_csv_serialization: + float_precision = __get_float_precision(format) + return __write_to_csv(__get_df_slice(table, start_index, end_index), float_precision=float_precision) + return table[start_index:end_index]._repr_html_() + + +# used by DSTableCommands +def display_data_html(table, start_index, end_index): + # type: (Union[pl.Series, pl.DataFrame], int, int) -> None + with __create_config(): + print(table[start_index:end_index]._repr_html_()) + + +def display_data_csv(table, start_index, end_index): + # type: (Union[pl.Series, pl.DataFrame], int, int) -> None + with __create_config(): + print(repr(__write_to_csv(__get_df_slice(table, start_index, end_index)))) + + +def get_column_descriptions(table): + # type: (Union[pl.Series, pl.DataFrame]) -> str + described_results = __get_describe(table) + + if described_results is not None: + return get_data(described_results, None, None) + else: + return "" + + +def get_value_occurrences_count(table): + # type: (Union[pl.Series, pl.DataFrame]) -> str + bin_counts = [] + if type(table) == pl.DataFrame: + for col in table.columns: + bin_counts.append(__analyze_column(col, table[col])) + elif type(table) == pl.Series: + bin_counts.append(__analyze_column(table.name, table)) + + return ColumnVisualisationUtils.TABLE_OCCURRENCES_COUNT_NEXT_COLUMN_SEPARATOR.join(bin_counts) + + +def __analyze_column(col_name, column): + col_type = column.dtype + res = [] + column_visualisation_type = None + + if __is_boolean(column, col_type): + column_visualisation_type, res = __analyze_boolean_column(column, col_name) + + elif __is_numeric(column, col_type): + column_visualisation_type, res = __analyze_numeric_column(column, col_name) + + else: + column_visualisation_type, res = __analyze_categorical_column(column, col_name) + + if column_visualisation_type != ColumnVisualisationType.UNIQUE: + counts = ColumnVisualisationUtils.TABLE_OCCURRENCES_COUNT_NEXT_VALUE_SEPARATOR.join(res) + else: + counts = res + + return str({column_visualisation_type:counts}) + + +def __is_boolean(column, col_type): + # (pl.Series, pl.DataType) -> bool + return col_type == pl.Boolean and not column.is_null().any() + + +def __is_numeric(column, col_type): + # (pl.Series, pl.DataType) -> bool + return __is_series_numeric(column) and not column.is_null().all() + + +def __analyze_boolean_column(column, col_name): + counts = column.value_counts().sort(by=col_name).to_dict() + return ColumnVisualisationType.HISTOGRAM, __add_custom_key_value_separator(zip(counts[col_name], counts[COUNT_COL_NAME])) + + +def __analyze_categorical_column(column, col_name): + all_values = column.shape[0] + if column.is_null().all(): + value_counts = pl.DataFrame({col_name: "None", COUNT_COL_NAME: all_values}) + else: + value_counts = column.value_counts() + + # Sort in descending order to get values with max percent + value_counts = value_counts.sort(COUNT_COL_NAME).reverse() + + if len(value_counts) <= ColumnVisualisationUtils.MAX_UNIQUE_VALUES or len(value_counts) / all_values * 100 <= ColumnVisualisationUtils.MAX_UNIQUE_VALUES_TO_SHOW_IN_VIS: + column_visualisation_type = ColumnVisualisationType.PERCENTAGE + + # If column contains <= 3 unique values no `Other` category is shown, but all of these values and their percentages + num_unique_values_to_show_in_vis = ColumnVisualisationUtils.MAX_UNIQUE_VALUES - (0 if len(value_counts) == 3 else 1) + counts = value_counts[:num_unique_values_to_show_in_vis] + counts = counts.with_columns(((pl.col(COUNT_COL_NAME) / all_values * 100).round(1)).alias(COUNT_COL_NAME)) + top_values = {} + for label, count in zip(counts[col_name], counts[COUNT_COL_NAME]): + # we should process separately a case with dtype == pl.List + if type(label) == pl.Series or column.dtype == pl.List: + label_values = label.to_list() + label_values_in_str = str(label_values) + top_values[label_values_in_str[:ColumnVisualisationUtils.MAX_VALUES_LENGTH]] = count + else: + label_in_str = str(label) + top_values[label_in_str[:ColumnVisualisationUtils.MAX_VALUES_LENGTH]] = count + if len(value_counts) == ColumnVisualisationUtils.MAX_UNIQUE_VALUES: + top_values[ColumnVisualisationUtils.TABLE_OCCURRENCES_COUNT_OTHER] = -1 + else: + others_count = value_counts[num_unique_values_to_show_in_vis:][COUNT_COL_NAME].sum() + top_values[ColumnVisualisationUtils.TABLE_OCCURRENCES_COUNT_OTHER] = round(others_count / all_values * 100, 1) + res = __add_custom_key_value_separator(top_values.items()) + + else: + column_visualisation_type = ColumnVisualisationType.UNIQUE + res = len(value_counts) + return column_visualisation_type, res + + +def __analyze_numeric_column(column, col_name): + # handle np.NaN values, because they are not dropped with drop_nulls() the way they are + column = column.fill_null(strategy="min") + if column.shape[0] <= ColumnVisualisationUtils.NUM_BINS: + raw_counts = column.value_counts().sort(by=col_name).to_dict(as_series=False) + res = __add_custom_key_value_separator(zip(raw_counts[col_name], raw_counts[COUNT_COL_NAME])) + else: + import numpy as np + + def format_function(x): + if x == int(x): + return int(x) + else: + return round(x, 3) + + counts, bin_edges = np.histogram(column, bins=ColumnVisualisationUtils.NUM_BINS) + # so the long dash will be correctly viewed both on Mac and Windows + bin_labels = ['{} {} {}'.format(format_function(bin_edges[i]), DASH_SYMBOL, format_function(bin_edges[i + 1])) for i in range(ColumnVisualisationUtils.NUM_BINS)] + res = __add_custom_key_value_separator(zip(bin_labels, counts)) + + return ColumnVisualisationType.HISTOGRAM, res + + +def __get_df_slice(table, start_index, end_index): + # type: (Union[pl.Series, pl.DataFrame], int, int) -> pl.DataFrame + if type(table) == pl.Series: + return table[start_index:end_index].to_frame() + return table[start_index:end_index] + + +def __write_to_csv(table, null_value="null", float_precision=None): + def serialize_nested(value, null_value="null", float_precision=None): + if value is None: + return null_value + elif isinstance(value, float) and float_precision is not None: + return "{:.{}f}".format(value, float_precision) + elif isinstance(value, dict): + return "{" + ", ".join("{}: {}".format(k, serialize_nested(v, null_value, float_precision)) for k, v in value.items()) + "}" + elif isinstance(value, list): + return "[" + ", ".join(serialize_nested(v, null_value, float_precision) for v in value) + "]" + else: + return str(value) + + lines = [] + lines.append(CSV_FORMAT_SEPARATOR.join(table.columns)) + for row in table.rows(): + line = [] + for value in row: + line.append(serialize_nested(value, null_value, float_precision)) + lines.append(CSV_FORMAT_SEPARATOR.join(line)) + return "\n".join(lines) + + +def __create_config(format=None): + # type: (Union[str, None]) -> pl.Config + cfg = pl.Config() + cfg.set_tbl_cols(-1) # Unlimited + cfg.set_tbl_rows(-1) # Unlimited + cfg.set_fmt_str_lengths(MAX_COLWIDTH) # No option to set unlimited, so it's 100_000 + float_precision = __get_float_precision(format) + if float_precision is not None and hasattr(cfg, 'set_float_precision'): + cfg.set_float_precision(float_precision) + return cfg + + +def __add_custom_key_value_separator(pairs_list): + return [str(label) + ColumnVisualisationUtils.TABLE_OCCURRENCES_COUNT_DICT_SEPARATOR + str(count) for label, count in pairs_list] + + +def __get_describe(table): + # type: (Union[pl.Series, pl.DataFrame]) -> Union[pl.DataFrame, None] + try: + if type(table) == pl.DataFrame and 'describe' in table.columns: + import random + random_suffix = ''.join([chr(random.randint(97, 122)) for _ in range(5)]) + described_df = table\ + .rename({'describe': 'describe_original_' + random_suffix})\ + .describe(percentiles=(0.05, 0.25, 0.5, 0.75, 0.95)) + else: + described_df = table.describe(percentiles=(0.05, 0.25, 0.5, 0.75, 0.95)) + return described_df + # If DataFrame/Series have unsupported type for describe + # then Polars will raise TypeError exception. We should catch them. + except Exception as e: + return + + +def __get_float_precision(format): + # type: (Union[str, None]) -> Union[int, None] + if isinstance(format, str): + if format.startswith("%") and format.endswith("f"): + start = format.find('%.') + 2 + end = format.find('f') + + if start < end: + try: + precision = int(format[start:end]) + return precision + except: + pass + + return None + + +def __is_series_numeric(column): + """ + Determines if the given column is numeric based on the version of the polars + library being used. + + For polars major version 0, the method checks if the column is numeric using + the `is_numeric` method directly on the column. For later versions, it checks + the `is_numeric` method on the column's data type. + """ + if pl_version_major == 0: + return column.is_numeric() + else: + return column.dtype.is_numeric() diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_api.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_api.py index c85ad0f09c3e..97db69b2a30a 100644 --- a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_api.py +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_api.py @@ -25,6 +25,7 @@ from _pydevd_bundle.pydevd_comm import ( internal_get_exception_details_json, internal_step_in_thread, internal_smart_step_into, + InternalTableCommand ) from _pydevd_bundle.pydevd_comm_constants import ( CMD_THREAD_SUSPEND, @@ -341,6 +342,10 @@ class PyDevdAPI(object): int_cmd = InternalGetArray(seq, roffset, coffset, rows, cols, fmt, thread_id, frame_id, scope, attrs) py_db.post_internal_command(int_cmd, thread_id) + def request_get_table(self, py_db, seq, thread_id, frame_id, init_command, command_type, start_index, end_index, format): + int_cmd = InternalTableCommand(seq, thread_id, frame_id, init_command, command_type, start_index, end_index, format) + py_db.post_internal_command(int_cmd, thread_id) + def request_load_full_value(self, py_db, seq, thread_id, frame_id, vars): int_cmd = InternalLoadFullValue(seq, thread_id, frame_id, vars) py_db.post_internal_command(int_cmd, thread_id) diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py index 64ac454f2936..30feee972c05 100644 --- a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py @@ -95,6 +95,7 @@ from _pydevd_bundle._debug_adapter.pydevd_schema import ( ) from _pydevd_bundle._debug_adapter import pydevd_base_schema, pydevd_schema from _pydevd_bundle.pydevd_net_command import NetCommand +from _pydevd_bundle.custom.pydevd_tables import exec_table_command from _pydevd_bundle.pydevd_xml import ExceptionOnEvaluate from _pydevd_bundle.pydevd_constants import ForkSafeLock, NULL from _pydevd_bundle.pydevd_daemon_thread import PyDBDaemonThread @@ -132,6 +133,7 @@ from io import StringIO # CMD_XXX constants imported for backward compatibility from _pydevd_bundle.pydevd_comm_constants import * # @UnusedWildImport +from _pydevd_bundle.custom import pydevd_vars as pydevd_custom_vars # Socket import aliases: AF_INET, AF_INET6, SOCK_STREAM, SHUT_WR, SOL_SOCKET, IPPROTO_TCP, socket = ( @@ -875,7 +877,7 @@ class InternalGetArray(InternalThreadCommand): try: frame = dbg.find_frame(self.thread_id, self.frame_id) var = pydevd_vars.eval_in_context(self.name, frame.f_globals, frame.f_locals, py_db=dbg) - xml = pydevd_vars.table_like_struct_to_xml(var, self.name, self.roffset, self.coffset, self.rows, self.cols, self.format) + xml = pydevd_custom_vars.table_like_struct_to_xml(var, self.name, self.roffset, self.coffset, self.rows, self.cols, self.format) cmd = dbg.cmd_factory.make_get_array_message(self.sequence, xml) dbg.writer.add_command(cmd) except: @@ -1928,3 +1930,43 @@ class GetValueAsyncThreadConsole(AbstractGetValueAsyncThread): def send_result(self, xml): if self.frame_accessor is not None: self.frame_accessor.ReturnFullValue(self.seq, xml.getvalue()) + +#======================================================================================================================= +# InternalDataViewerAction +#======================================================================================================================= +class InternalTableCommand(InternalThreadCommand): + def __init__(self, sequence, thread_id, frame_id, init_command, command_type, + start_index, end_index, format): + InternalThreadCommand.__init__(self, thread_id) + self.sequence = sequence + self.frame_id = frame_id + self.init_command = init_command + self.command_type = command_type + self.start_index = start_index + self.end_index = end_index + self.format = format + + def do_it(self, dbg): + try: + pydev_log.info(f"WE ARE IN INTERNAL TABLE COMMAND, thread_id: {self.thread_id}, frame_id: {self.frame_id}" ) + frame = dbg.find_frame(self.thread_id, self.frame_id) + pydev_log.info("frame = dbg.find_frame(self.thread_id, self.frame_id)") + pydev_log.info(f"frame {frame}") + + success, res = self.exec_command(frame) + if success: + pydev_log.info("success") + cmd = dbg.cmd_factory.make_get_table_message(self.sequence, res) + dbg.writer.add_command(cmd) + else: + pydev_log.info(f"error, no success, res: {res}") + cmd = dbg.cmd_factory.make_error_message(self.sequence, str(res)) + dbg.writer.add_command(cmd) + except Exception as e: + cmd = dbg.cmd_factory.make_error_message(self.sequence, get_exception_traceback_str()) + dbg.writer.add_command(cmd) + + def exec_command(self, frame): + return exec_table_command(self.init_command, self.command_type, + self.start_index, self.end_index, self.format, + frame.f_globals, frame.f_locals) diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm_constants.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm_constants.py index 7de3d8ef8d3e..05e83f9b3c57 100644 --- a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm_constants.py +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm_constants.py @@ -98,6 +98,10 @@ CMD_LOAD_SOURCE_FROM_FRAME_ID = 207 CMD_SET_FUNCTION_BREAK = 208 +# Powerful DataViewer commands +CMD_DATAVIEWER_ACTION = 210 +CMD_TABLE_EXEC = 211 + CMD_VERSION = 501 CMD_RETURN = 502 CMD_SET_PROTOCOL = 503 @@ -186,6 +190,7 @@ ID_TO_MEANING = { "205": "CMD_AUTHENTICATE", "206": "CMD_STEP_INTO_COROUTINE", "207": "CMD_LOAD_SOURCE_FROM_FRAME_ID", + "211": "CMD_TABLE_EXEC", "501": "CMD_VERSION", "502": "CMD_RETURN", "503": "CMD_SET_PROTOCOL", diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_custom_frames.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_custom_frames.py index 65c83c45817d..dddbf529710b 100644 --- a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_custom_frames.py +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_custom_frames.py @@ -1,3 +1,5 @@ +# Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. + from _pydevd_bundle.pydevd_constants import get_current_thread_id, Null, ForkSafeLock from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame from _pydev_bundle._pydev_saved_modules import thread, threading diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_json.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_json.py index 7715ddb00ad1..77f0b2e6445a 100644 --- a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_json.py +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_json.py @@ -7,7 +7,7 @@ import socket as socket_module from _pydev_bundle._pydev_imports_tipper import TYPE_IMPORT, TYPE_CLASS, TYPE_FUNCTION, TYPE_ATTR, TYPE_BUILTIN, TYPE_PARAM from _pydev_bundle.pydev_is_thread_alive import is_thread_alive from _pydev_bundle.pydev_override import overrides -from _pydevd_bundle._debug_adapter import pydevd_schema +from _pydevd_bundle._debug_adapter import pydevd_schema, pydevd_base_schema from _pydevd_bundle._debug_adapter.pydevd_schema import ( ModuleEvent, ModuleEventBody, @@ -56,6 +56,13 @@ import linecache from io import StringIO from _pydev_bundle import pydev_log +from _pydevd_bundle._debug_adapter.pydevd_schema import \ + GetTableResponseBody +from _pydevd_bundle.pydevd_comm_constants import CMD_TABLE_EXEC + +from _pydevd_bundle._debug_adapter.pydevd_schema import \ + GetArrayResponseBody + class ModulesManager(object): def __init__(self): @@ -584,3 +591,27 @@ This may mean a number of things: def make_exit_command(self, py_db): event = pydevd_schema.TerminatedEvent(pydevd_schema.TerminatedEventBody()) return NetCommand(CMD_EXIT, 0, event, is_json=True) + + @overrides(NetCommandFactory.make_get_table_message) + def make_get_table_message(self, seq, res): + try: + body = GetTableResponseBody(result=res) + pydev_log.info(f"RESPONSE BODY: {body}") + response = pydevd_schema.GetTableResponse(request_seq=seq, success=True, body=body) + pydev_log.info(f"RESPONSE: {response}") + return NetCommand(CMD_RETURN, 0, response, is_json=True) + except Exception as e: + pydev_log.exception(f"Error while building getTable response: {e}") + err_response = pydevd_schema.GetTableResponse(request_seq=seq, success=False, body={}) + return NetCommand(CMD_RETURN, 0, err_response, is_json=True) + + @overrides(NetCommandFactory.make_get_array_message) + def make_get_array_message(self, seq, res): + try: + body = GetArrayResponseBody(result=res) + response = pydevd_schema.GetArrayResponse(request_seq=seq, success=True, body=body) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + except Exception as e: + pydev_log.exception(f"Error while building getTable response: {e}") + err_response = pydevd_schema.GetArrayResponse(request_seq=seq, success=False, body={}) + return NetCommand(CMD_RETURN, 0, err_response, is_json=True) \ No newline at end of file diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_xml.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_xml.py index a9c3ad5be5ac..c2581632819e 100644 --- a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_xml.py +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_xml.py @@ -42,6 +42,7 @@ from _pydevd_bundle.pydevd_comm_constants import ( VERSION_STRING, CMD_RELOAD_CODE, CMD_LOAD_SOURCE_FROM_FRAME_ID, + CMD_TABLE_EXEC, ) from _pydevd_bundle.pydevd_constants import ( DebugInfoHolder, @@ -556,3 +557,7 @@ This may mean a number of things: def make_exit_command(self, py_db): return NULL_EXIT_COMMAND + + def make_get_table_message(self, seq, res): + res_xml = "" + res + "" + return NetCommand(CMD_TABLE_EXEC, seq, res_xml) \ No newline at end of file diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command.py index 92902ed2f7b4..0e5ccb9d2e79 100644 --- a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command.py +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command.py @@ -231,6 +231,22 @@ class _PyDevCommandProcessor(object): self.api.request_get_array(py_db, seq, roffset, coffset, rows, cols, format, thread_id, frame_id, scope, attrs) + def cmd_table_exec(self, py_db, cmd_id, seq, text): + try: + parameters = text.split('\t') + thread_id, frame_id, init_command, command_type = parameters[:4] + + start_index, end_index, format = None, None, None + + if len(parameters) >= 7: + start_index = int(parameters[4]) + end_index = int(parameters[5]) + format = parameters[6] + + self.api.request_get_table(py_db, seq, thread_id, frame_id, init_command, command_type, start_index, end_index, format) + except: + traceback.print_exc() + def cmd_show_return_values(self, py_db, cmd_id, seq, text): show_return_values = text.split("\t")[1] self.api.set_show_return_values(py_db, int(show_return_values) == 1) diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py index 9e118198788b..7179b5b6ccd2 100644 --- a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py @@ -1352,3 +1352,50 @@ class PyDevJsonCommandProcessor(object): response = pydevd_base_schema.build_response(request) return NetCommand(CMD_RETURN, 0, response, is_json=True) + + def on_gettable_request(self, py_db, request): + args = request.arguments + thread_id = args.threadId + frame_id = args.frameId + init_command = args.command + command_type = args.commandType + start_index = args.start + end_index = args.end + df_format = args.format + error_msg = self.api.request_get_table(py_db, request.seq, thread_id, frame_id, init_command, command_type, start_index, end_index, df_format) + if error_msg: + response = pydevd_base_schema.build_response( + request, + kwargs={ + "body": {}, + "success": False, + "message": error_msg, + }, + ) + pydev_log.error("ERR WHILE EXECUTING GETTABLE" + error_msg) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + return None + + def on_getarray_request(self, py_db, request): + args = request.arguments + thread_id = args.threadId + frame_id = args.frameId + row_offset = args.rowOffset + col_offset = args.colOffset + rows = args.rows + cols = args.cols + fmt = args.format + attrs = args.variableName + error_msg = self.api.request_get_array(py_db, request.seq, row_offset, col_offset, rows, cols, fmt, thread_id, frame_id, None, attrs) + if error_msg: + response = pydevd_base_schema.build_response( + request, + kwargs={ + "body": {}, + "success": False, + "message": error_msg, + }, + ) + pydev_log.error("ERR WHILE EXECUTING GETTABLE" + error_msg) + return NetCommand(CMD_RETURN, 0, response, is_json=True) + return None diff --git a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_utils.py b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_utils.py index 4ac447d37bce..05549bc19fa2 100644 --- a/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_utils.py +++ b/python/helpers/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_utils.py @@ -1,6 +1,5 @@ from __future__ import nested_scopes import traceback -import warnings from _pydev_bundle import pydev_log from _pydev_bundle._pydev_saved_modules import thread, threading from _pydev_bundle import _pydev_saved_modules @@ -22,6 +21,7 @@ from _pydevd_bundle.pydevd_constants import ( PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT, get_global_debugger, ) +from _pydevd_bundle.custom.pydevd_asyncio_provider import get_eval_async_expression_in_context def save_main_module(file, module_name): diff --git a/python/pydevSrc/src/com/jetbrains/python/debugger/PyDebugValue.java b/python/pydevSrc/src/com/jetbrains/python/debugger/PyDebugValue.java index fc4f415c79f7..211753473dcb 100644 --- a/python/pydevSrc/src/com/jetbrains/python/debugger/PyDebugValue.java +++ b/python/pydevSrc/src/com/jetbrains/python/debugger/PyDebugValue.java @@ -19,6 +19,7 @@ import com.intellij.xdebugger.impl.ui.tree.nodes.XValueNodeImpl; import com.jetbrains.python.PydevBundle; import com.jetbrains.python.debugger.pydev.PyDebugCallback; import com.jetbrains.python.debugger.render.PyNodeRenderer; +import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -62,7 +63,7 @@ public class PyDebugValue extends XNamedValue { private final @Nullable String myTypeQualifier; protected @Nullable String myValue; private final boolean myContainer; - private final @Nullable String myShape; + protected final @Nullable String myShape; private final @Nullable String myArrayElementType; private final boolean myIsReturnedVal; private final boolean myIsIPythonHidden; @@ -100,6 +101,21 @@ public class PyDebugValue extends XNamedValue { frameAccessor); } + @ApiStatus.Internal + public PyDebugValue(final @NotNull String name, + final @Nullable String type, + @Nullable String typeQualifier, + final @Nullable String value, + @Nullable String shape, + boolean isReturnedVal, + boolean isIPythonHidden, + boolean errorOnEval, + @Nullable String typeRendererId, + final @NotNull PyFrameAccessor frameAccessor) { + this(name, type, typeQualifier, value, EVALUATOR_POSTFIXES.containsKey(type), shape, isReturnedVal, isIPythonHidden, errorOnEval, typeRendererId, null, + frameAccessor); + } + /** * Represents instance of a Python variable available at runtime. Used in Debugger and various Variable Viewers * @@ -851,4 +867,8 @@ public class PyDebugValue extends XNamedValue { } return value; } + + public static Map getEvaluatorPostfixes() { + return EVALUATOR_POSTFIXES; + } }