annotated KeanuContext.to_java_map
@@ -3,7 +3,7 @@ import io
import os
import logging
from py4j.java_gateway import JavaGateway, CallbackServerParameters, JavaObject, JavaClass, JVMView
-from py4j.java_collections import JavaList, JavaArray
+from py4j.java_collections import JavaList, JavaArray, JavaMap
from typing import Dict, Any, Iterable, List, Collection
from _io import TextIOWrapper
@@ -62,7 +62,7 @@ class KeanuContext(metaclass=Singleton):
def jvm_view(self) -> JVMView:
return self.__jvm_view
- def to_java_map(self, python_map):
+ def to_java_map(self, python_map: Dict[Any, Any]) -> JavaMap:
m = self._gateway.jvm.java.util.HashMap()
for (k, v) in python_map.items():
