Skip to content

Commit a98b272

Browse files
committed
Fix type hints - scalar values can be str or int or something else
1 parent 70f9ab2 commit a98b272

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gql/type_adapter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def traverse_schema(
9393
except (KeyError, AttributeError):
9494
return None
9595

96-
def _get_decoded_scalar_type(self, keys: List[str], value: str) -> str:
96+
def _get_decoded_scalar_type(self, keys: List[str], value: Any) -> Any:
9797
"""Get the decoded value of the type identified by `keys`.
9898
9999
If the type is not a custom scalar, then return the original value.
@@ -122,7 +122,7 @@ def convert_scalars(self, response: Dict[str, Any]) -> Dict[str, Any]:
122122

123123
def iterate(
124124
node: Union[List, Dict, str], keys: List[str] = None
125-
) -> Union[Dict[str, Any], List, str]:
125+
) -> Union[Dict[str, Any], List, Any]:
126126
if keys is None:
127127
keys = []
128128
if isinstance(node, dict):

0 commit comments

Comments
 (0)