add proxy for the first part and try to develop the second part
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
from typing import Callable
|
||||
|
||||
|
||||
class Serializer:
|
||||
@classmethod
|
||||
def get_serializers(cls) -> Callable:
|
||||
methods = [
|
||||
(method_name, getattr(cls, method_name))
|
||||
for method_name in dir(cls)
|
||||
if callable(getattr(cls, method_name))
|
||||
]
|
||||
return sorted([
|
||||
method_callable
|
||||
for (method_name, method_callable) in methods
|
||||
if method_name.startswith("serialize_")
|
||||
], key=lambda x: x.__name__)
|
||||
Reference in New Issue
Block a user