Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def merge(args):
params = {key: value for key, value in args.merger_params}
dict_type = args.dict_type
if dict_type == 'json':
merger = keyvi.JsonDictionaryMerger(params)
elif dict_type == 'string':
merger = keyvi.StringDictionaryMerger(params)
elif dict_type == 'int':
merger = keyvi.IntDictionaryMerger(params)
elif dict_type == 'completion':
merger = keyvi.CompletionDictionaryMerger(params)
elif dict_type == 'key-only':
merger = keyvi.KeyOnlyDictionaryMerger(params)
else:
return 'Must never reach here'
for file in args.input_files:
merger.Add(file)
merger.Merge(args.output_file)