mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-02 02:51:53 +08:00
ws api refactoring
This commit is contained in:
@@ -64,7 +64,7 @@ def get_exposed_http(obj: object) -> List[HttpExposed]:
|
||||
handler=handler,
|
||||
)
|
||||
for name in dir(obj)
|
||||
if inspect.ismethod(handler := getattr(obj, name)) and getattr(handler, _HTTP_EXPOSED, False)
|
||||
if inspect.ismethod(handler := getattr(obj, name)) and getattr(handler, _HTTP_EXPOSED, False) # noqa: E203
|
||||
]
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ def get_exposed_ws(obj: object) -> List[WsExposed]:
|
||||
handler=handler,
|
||||
)
|
||||
for name in dir(obj)
|
||||
if inspect.ismethod(handler := getattr(obj, name)) and getattr(handler, _WS_EXPOSED, False)
|
||||
if inspect.ismethod(handler := getattr(obj, name)) and getattr(handler, _WS_EXPOSED, False) # noqa: E203
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user