Open Franco0700 opened 1 year ago
I'm not able to repro, can you give me the entire script as well as the commands you're running? Here's what I tried:
import jmespath
from jmespath import functions
from typing import List, Dict
class CustomFunctions(functions.Functions):
@functions.signature({'types': ['object']}, {'types': ['array']})
def _func_map_merge(self, obj: str, arg: List[Dict[str, str]]) -> List[Dict[str, str]]:
result = []
for element in arg:
merged_object = super()._func_merge(obj, element)
result.append(merged_object)
return result
options = jmespath.Options(custom_functions=CustomFunctions())
$ mypy check.py
Success: no issues found in 1 source file
Defining a customFunctions, like this:
Drop the following error
I think it should be some missing information on stubs