Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
_BaseConverter,
InConverter,
OutConverter,
get_binding_registry
get_binding_registry,
check_deferred_bindings_enabled
)
from .sdkType import SdkType
from .web import (
Expand All @@ -28,6 +29,7 @@
'OutConverter',
'SdkType',
'get_binding_registry',
'check_deferred_bindings_enabled',
'ModuleTrackerMeta',
'RequestTrackerMeta',
'ResponseTrackerMeta',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

from typing import Any, Dict, List, Optional, Mapping, Union, Tuple

BINDING_REGISTRY_SET = False

class Datum:
def __init__(self, value: Any, type: Optional[str]):
Expand Down Expand Up @@ -181,4 +182,11 @@ def encode(cls, obj: Any, *,


def get_binding_registry():
global BINDING_REGISTRY_SET
BINDING_REGISTRY_SET = True
return _ConverterMeta


def check_deferred_bindings_enabled(cls, pytype: type) -> bool:
return (BINDING_REGISTRY_SET
and _ConverterMeta.check_supported_type(pytype))