mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2024-11-16 11:05:10 +01:00
Add linter for cython files (#945)
This commit is contained in:
parent
172fe532f2
commit
0969e9339d
@ -28,3 +28,8 @@ repos:
|
||||
- --force
|
||||
- --keep-updates
|
||||
files: ^(aioesphomeapi)/.+\.py$
|
||||
- repo: https://github.com/MarcoGorelli/cython-lint
|
||||
rev: v0.16.2
|
||||
hooks:
|
||||
- id: cython-lint
|
||||
- id: double-quote-cython-strings
|
||||
|
@ -73,8 +73,10 @@ cpdef void handle_complex_message(
|
||||
cdef object _handle_timeout
|
||||
cdef object _handle_complex_message
|
||||
|
||||
|
||||
@cython.dataclasses.dataclass
|
||||
cdef class ConnectionParams:
|
||||
|
||||
cdef public list addresses
|
||||
cdef public object port
|
||||
cdef public object password
|
||||
@ -84,6 +86,7 @@ cdef class ConnectionParams:
|
||||
cdef public object noise_psk
|
||||
cdef public object expected_name
|
||||
|
||||
|
||||
cdef class APIConnection:
|
||||
|
||||
cdef ConnectionParams _params
|
||||
@ -137,7 +140,11 @@ cdef class APIConnection:
|
||||
cpdef void report_fatal_error(self, Exception err)
|
||||
|
||||
@cython.locals(handlers=set)
|
||||
cdef void _add_message_callback_without_remove(self, object on_message, tuple msg_types)
|
||||
cdef void _add_message_callback_without_remove(
|
||||
self,
|
||||
object on_message,
|
||||
tuple msg_types
|
||||
)
|
||||
|
||||
cpdef add_message_callback(self, object on_message, tuple msg_types)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user