mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 11:36:31 +00:00
e21dd7e70f
fixes definitions can run until API call
14 lines
508 B
Cython
14 lines
508 B
Cython
import msgpack
|
|
|
|
cdef class FileCommand:
|
|
def __init__(self, command_type: CommandType, ProcessorType processor_type, str filename):
|
|
self.command_type = command_type
|
|
self.processor_type = processor_type
|
|
self.filename = filename
|
|
|
|
@staticmethod
|
|
cdef from_msgpack(bytes data, ProcessorType processor_type):
|
|
unpacked = msgpack.unpackb(data, strict_map_key=False)
|
|
return FileCommand(unpacked.get("CommandType"), processor_type, unpacked.get("Filename")
|
|
)
|