mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-05 21:20:40 +02:00
fixing (ignoring) linting warnings
This commit is contained in:
parent
e3211b6000
commit
d9a4dd2aeb
@ -121,7 +121,7 @@ class DataService(rpyc.Service, TaskManager):
|
|||||||
self._register_property_callbacks(self, f"{self.__class__.__name__}")
|
self._register_property_callbacks(self, f"{self.__class__.__name__}")
|
||||||
self._register_start_stop_task_callbacks(self, f"{self.__class__.__name__}")
|
self._register_start_stop_task_callbacks(self, f"{self.__class__.__name__}")
|
||||||
|
|
||||||
def _register_list_change_callbacks(
|
def _register_list_change_callbacks( # noqa: C901
|
||||||
self, obj: "DataService", parent_path: str
|
self, obj: "DataService", parent_path: str
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
@ -308,7 +308,7 @@ class DataService(rpyc.Service, TaskManager):
|
|||||||
attr_value, callback
|
attr_value, callback
|
||||||
)
|
)
|
||||||
|
|
||||||
def _register_property_callbacks(
|
def _register_property_callbacks( # noqa: C901
|
||||||
self,
|
self,
|
||||||
obj: "DataService",
|
obj: "DataService",
|
||||||
parent_path: str,
|
parent_path: str,
|
||||||
@ -375,7 +375,7 @@ class DataService(rpyc.Service, TaskManager):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
callback = (
|
callback = (
|
||||||
lambda name, _, dependent_attr=attr_name, dep=dependency: obj._emit_notification(
|
lambda name, _, dependent_attr=attr_name, dep=dependency: obj._emit_notification( # type: ignore
|
||||||
parent_path=parent_path,
|
parent_path=parent_path,
|
||||||
name=dependent_attr,
|
name=dependent_attr,
|
||||||
value=getattr(obj, dependent_attr),
|
value=getattr(obj, dependent_attr),
|
||||||
@ -401,7 +401,7 @@ class DataService(rpyc.Service, TaskManager):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(e)
|
logger.error(e)
|
||||||
|
|
||||||
def serialize(self, prefix: str = "") -> dict[str, dict[str, Any]]:
|
def serialize(self, prefix: str = "") -> dict[str, dict[str, Any]]: # noqa
|
||||||
"""
|
"""
|
||||||
Serializes the instance into a dictionary, preserving the structure of the
|
Serializes the instance into a dictionary, preserving the structure of the
|
||||||
instance.
|
instance.
|
||||||
|
@ -43,7 +43,7 @@ class WebAPI:
|
|||||||
self.setup_socketio()
|
self.setup_socketio()
|
||||||
self.setup_fastapi_app()
|
self.setup_fastapi_app()
|
||||||
|
|
||||||
def setup_socketio(self) -> None:
|
def setup_socketio(self) -> None: # noqa: C901
|
||||||
# the socketio ASGI app, to notify clients when params update
|
# the socketio ASGI app, to notify clients when params update
|
||||||
if self.enable_CORS:
|
if self.enable_CORS:
|
||||||
sio = socketio.AsyncServer(async_mode="asgi", cors_allowed_origins="*")
|
sio = socketio.AsyncServer(async_mode="asgi", cors_allowed_origins="*")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user