mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
22 lines
491 B
Python
22 lines
491 B
Python
from debugger_protocol._base import Readonly, WithRepr
|
|
|
|
|
|
class Base(Readonly, WithRepr):
|
|
"""Base class for message-related types."""
|
|
|
|
_INIT_ARGS = None
|
|
|
|
@classmethod
|
|
def from_data(cls, **kwargs):
|
|
"""Return an instance based on the given raw data."""
|
|
return cls(**kwargs)
|
|
|
|
def __init__(self):
|
|
self._validate()
|
|
|
|
def _validate(self):
|
|
pass
|
|
|
|
def as_data(self):
|
|
"""Return serializable data for the instance."""
|
|
return {}
|