Refactor: Make it clear what methods are private (#946)

This commit is contained in:
UnMonsieur
2023-11-13 22:00:13 +01:00
committed by GitHub
parent a5bf8e9075
commit bf3fac56e4
8 changed files with 28 additions and 26 deletions

View File

@@ -33,7 +33,7 @@ def register_deserializable(cls: Type[T]) -> Type[T]:
Returns:
Type: The same class, after registration.
"""
JSONSerializable.register_class_as_deserializable(cls)
JSONSerializable._register_class_as_deserializable(cls)
return cls
@@ -183,7 +183,7 @@ class JSONSerializable:
return cls.deserialize(json_str)
@classmethod
def register_class_as_deserializable(cls, target_class: Type[T]) -> None:
def _register_class_as_deserializable(cls, target_class: Type[T]) -> None:
"""
Register a class as deserializable. This is a classmethod and globally shared.