mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 17:20:30 +08:00
pylint fix
This commit is contained in:
parent
675abed41a
commit
a6aaa21287
@ -533,14 +533,11 @@ class Server: # pylint: disable=too-many-instance-attributes
|
|||||||
if getattr(method, _ATTR_SYSTEM_TASK, False):
|
if getattr(method, _ATTR_SYSTEM_TASK, False):
|
||||||
self.__system_tasks.append(asyncio.create_task(method()))
|
self.__system_tasks.append(asyncio.create_task(method()))
|
||||||
elif getattr(method, _ATTR_EXPOSED, False):
|
elif getattr(method, _ATTR_EXPOSED, False):
|
||||||
# router = app.router
|
app.router.add_route(
|
||||||
router = getattr(app, "router") # FIXME: Dirty hack to avoid pylint crash
|
|
||||||
router.add_route(
|
|
||||||
getattr(method, _ATTR_EXPOSED_METHOD),
|
getattr(method, _ATTR_EXPOSED_METHOD),
|
||||||
getattr(method, _ATTR_EXPOSED_PATH),
|
getattr(method, _ATTR_EXPOSED_PATH),
|
||||||
method,
|
method,
|
||||||
)
|
)
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
|
||||||
def __run_app_print(self, text: str) -> None:
|
def __run_app_print(self, text: str) -> None:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user