refactor(rpc): remove unused rpc_public and register_rpc_methods decorators

This commit is contained in:
wyzula_j authored and Jan Wyzula committed 2026-10-16 15:53:36 +02:00
1 parent ebe67079f3
commit f606fa8a71
1 file changed
-17
-17
View File
@@ -1,20 +1,3 @@
def rpc_public(func):
func.rpc_public = True # Mark the function for later processing by the class decorator
return func
def register_rpc_methods(cls):
"""
Class decorator to scan for rpc_public methods and add them to USER_ACCESS.
"""
if not hasattr(cls, "USER_ACCESS"):
cls.USER_ACCESS = set()
for name, method in cls.__dict__.items():
if getattr(method, "rpc_public", False):
cls.USER_ACCESS.add(name)
return cls
def rpc_timeout(timeout: float | None):
"""
Decorator to set a timeout for RPC methods.