|
64 | 64 | DefaultTagging, |
65 | 65 | Field, |
66 | 66 | NoCheck, |
67 | | - SerdeScope, |
| 67 | + Scope, |
68 | 68 | Tagging, |
69 | 69 | TypeCheck, |
70 | 70 | add_func, |
@@ -214,9 +214,9 @@ def wrap(cls: Type[T]) -> Type[T]: |
214 | 214 | # Create a scope storage used by serde. |
215 | 215 | # Each class should get own scope. Child classes can not share scope with parent class. |
216 | 216 | # That's why we need the "scope.cls is not cls" check. |
217 | | - scope: Optional[SerdeScope] = getattr(cls, SERDE_SCOPE, None) |
| 217 | + scope: Optional[Scope] = getattr(cls, SERDE_SCOPE, None) |
218 | 218 | if scope is None or scope.cls is not cls: |
219 | | - scope = SerdeScope(cls, reuse_instances_default=reuse_instances_default) |
| 219 | + scope = Scope(cls, reuse_instances_default=reuse_instances_default) |
220 | 220 | setattr(cls, SERDE_SCOPE, scope) |
221 | 221 |
|
222 | 222 | # Set some globals for all generated functions |
@@ -331,7 +331,7 @@ def is_dataclass_without_de(cls: Type[Any]) -> bool: |
331 | 331 | return False |
332 | 332 | if not hasattr(cls, SERDE_SCOPE): |
333 | 333 | return True |
334 | | - scope: Optional[SerdeScope] = getattr(cls, SERDE_SCOPE) |
| 334 | + scope: Optional[Scope] = getattr(cls, SERDE_SCOPE) |
335 | 335 | return FROM_DICT not in scope.funcs |
336 | 336 |
|
337 | 337 |
|
@@ -362,7 +362,7 @@ def from_obj(c: Type[T], o: Any, named: bool, reuse_instances: bool) -> T: |
362 | 362 | """ |
363 | 363 |
|
364 | 364 | def deserializable_to_obj(cls): |
365 | | - serde_scope: SerdeScope = getattr(cls, SERDE_SCOPE) |
| 365 | + serde_scope: Scope = getattr(cls, SERDE_SCOPE) |
366 | 366 | func_name = FROM_DICT if named else FROM_ITER |
367 | 367 | res = serde_scope.funcs[func_name]( |
368 | 368 | cls, maybe_generic=maybe_generic, data=o, reuse_instances=reuse_instances |
|
0 commit comments