fix: ensure void methods that can raise exceptions are marked (#417)

This commit is contained in:
J. Nick Koston 2025-03-06 14:40:18 -10:00 committed by GitHub
parent 28888b9f49
commit c433dab7b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 10 deletions

View File

@ -133,7 +133,7 @@ cdef class Unmarshaller:
cdef unsigned int _pos cdef unsigned int _pos
cdef object _stream cdef object _stream
cdef object _sock cdef object _sock
cdef object _message cdef Message _message
cdef object _readers cdef object _readers
cdef unsigned int _body_len cdef unsigned int _body_len
cdef unsigned int _serial cdef unsigned int _serial
@ -161,20 +161,20 @@ cdef class Unmarshaller:
recv=cython.tuple, recv=cython.tuple,
errno=cython.uint errno=cython.uint
) )
cdef void _read_sock_with_fds(self, unsigned int pos, unsigned int missing_bytes) cdef void _read_sock_with_fds(self, unsigned int pos, unsigned int missing_bytes) except *
@cython.locals( @cython.locals(
data=cython.bytes, data=cython.bytes,
errno=cython.uint errno=cython.uint
) )
cdef void _read_sock_without_fds(self, unsigned int pos) cdef void _read_sock_without_fds(self, unsigned int pos) except *
@cython.locals( @cython.locals(
data=cython.bytes data=cython.bytes
) )
cdef void _read_stream(self, unsigned int pos, unsigned int missing_bytes) cdef void _read_stream(self, unsigned int pos, unsigned int missing_bytes) except *
cdef void _read_to_pos(self, unsigned int pos) cdef void _read_to_pos(self, unsigned int pos) except *
cpdef read_boolean(self, SignatureType type_) cpdef read_boolean(self, SignatureType type_)
@ -232,7 +232,7 @@ cdef class Unmarshaller:
key=cython.str, key=cython.str,
ustring="const unsigned char *", ustring="const unsigned char *",
) )
cdef _read_header(self) cdef void _read_header(self) except *
@cython.locals( @cython.locals(
body=list, body=list,
@ -242,9 +242,9 @@ cdef class Unmarshaller:
tree=SignatureTree, tree=SignatureTree,
message=Message message=Message
) )
cdef _read_body(self) cdef void _read_body(self) except *
cdef _unmarshall(self) cdef Message _unmarshall(self)
cpdef unmarshall(self) cpdef unmarshall(self)

View File

@ -45,7 +45,7 @@ cdef class BaseMessageBus:
cdef public object _stream cdef public object _stream
cdef public object _fd cdef public object _fd
cpdef void _process_message(self, Message msg) cpdef void _process_message(self, Message msg) except *
@cython.locals(exported_service_interface=ServiceInterface) @cython.locals(exported_service_interface=ServiceInterface)
cpdef export(self, str path, ServiceInterface interface) cpdef export(self, str path, ServiceInterface interface)
@ -72,4 +72,4 @@ cdef class BaseMessageBus:
_Method method, _Method method,
Message msg, Message msg,
object send_reply object send_reply
) ) except *