hiku
hiku copied to clipboard
Mapping type is not well supported in expressions
When we have a function definition which accepts Mapping[String, Any]
, and we pass an option's value with the same type, currently we get this error:
Traceback (most recent call last):
...
File "/usr/local/lib/python3.7/dist-packages/hiku/sources/graph.py", line 57, in __postprocess__
reqs = RequirementsExtractor.extract(self.sub_graph.types, expr)
File "/usr/local/lib/python3.7/dist-packages/hiku/expr/refs.py", line 122, in extract
extractor.visit(expr)
File "/usr/local/lib/python3.7/dist-packages/hiku/expr/refs.py", line 131, in visit
super(RequirementsExtractor, self).visit(node)
File "/usr/local/lib/python3.7/dist-packages/hiku/expr/nodes.py", line 71, in visit
node.accept(self)
File "/usr/local/lib/python3.7/dist-packages/hiku/expr/nodes.py", line 40, in accept
return visitor.visit_tuple(self)
File "/usr/local/lib/python3.7/dist-packages/hiku/expr/refs.py", line 143, in visit_tuple
self.visit(arg)
File "/usr/local/lib/python3.7/dist-packages/hiku/expr/refs.py", line 128, in visit
req = ref_to_req(self._types, ref)
File "/usr/local/lib/python3.7/dist-packages/hiku/expr/refs.py", line 82, in ref_to_req
assert not isinstance(ref_type, _CONTAINER_TYPES), ref_type
AssertionError: Mapping[String, Any]