Fix bug in bfxapi.rest.endpoints.merchant sub-package.

This commit is contained in:
Davide Casale
2023-02-12 23:26:44 +01:00
parent e5b0c1af9c
commit f0d14a230f
4 changed files with 48 additions and 39 deletions

View File

@@ -15,8 +15,8 @@ def _scheme(data: T, adapter: Callable[[str], str]) -> T:
return cast(T, { adapter(key): _scheme(value, adapter) for key, value in data.items() })
else: return data
def to_snake_case_keys(dictionary: Dict[str, Any]) -> Dict[str, Any]:
def to_snake_case_keys(dictionary: T) -> T:
return _scheme(dictionary, _to_snake_case)
def to_camel_case_keys(dictionary: Dict[str, Any]) -> Dict[str, Any]:
def to_camel_case_keys(dictionary: T) -> T:
return _scheme(dictionary, _to_camel_case)