boxed / mutmut

Mutation testing system
https://mutmut.readthedocs.io
BSD 3-Clause "New" or "Revised" License
932 stars 112 forks source link

TypeError: can only concatenate str (not "list") to str in mutmut 2.4.4 #308

Closed enalcopolo closed 8 months ago

enalcopolo commented 8 months ago

I used the command

mutmut show id or mutmut html

I obtained this error:

File "[MY_PROJECT_PATH]/.venv/bin/mutmut", line 8, in sys.exit(climain()) ^^^^^^^^^ File "[MY_PROJECT_PATH]/.venv/lib/python3.11/site-packages/click/core.py", line 1157, in call return self.main(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "[MY_PROJECT_PATH]/.venv/lib/python3.11/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "[MY_PROJECT_PATH]/.venv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "[MY_PROJECT_PATH]/.venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "[MY_PROJECT_PATH]/.venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke return __callback(args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "[MY_PROJECT_PATH]/.venv/lib/python3.11/site-packages/mutmut/init.py", line 901, in wrapper f(args, **kwargs) File "[MY_PROJECT_PATH]/.venv/lib/python3.11/site-packages/mutmut/main.py", line 207, in show print(get_unified_diff(id_or_file, dict_synonyms)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "[MY_PROJECT_PATH]/.venv/lib/python3.11/site-packages/mutmut/cache.py", line 203, in get_unified_diff return _get_unified_diff(source, filename, mutation_id, dict_synonyms, update_cache) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "[MY_PROJECT_PATH]/.venv/lib/python3.11/site-packages/mutmut/cache.py", line 214, in _get_unified_diff context = Context( ^^^^^^^^ File "[MY_PROJECT_PATH]/.venv/lib/python3.11/site-packages/mutmut/init.py", line 510, in init self.dict_synonyms = (dict_synonyms or []) + ['dict']

python: 3.11.4
mutmut:  2.4.4

Thanks image

boxed commented 8 months ago

Try removing dict_synonyms from your config

enalcopolo commented 8 months ago

works!! Thanks you