mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-14 19:13:52 +00:00
19 lines
330 B
Python
19 lines
330 B
Python
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass
|
|
|
|
import bbgo_pb2
|
|
|
|
|
|
@dataclass
|
|
class ErrorMessage:
|
|
code: int
|
|
message: str
|
|
|
|
@classmethod
|
|
def from_pb(cls, obj: bbgo_pb2.Error) -> ErrorMessage:
|
|
return cls(
|
|
code=obj.error_code,
|
|
message=obj.error_message,
|
|
)
|