Here is the smell I attempted to refactor:

Maybe the **kwargs was the issue?
this is the error:
Traceback (most recent call last):
File "C:\Users\sevhe\OneDrive - McMaster University\Year 5\SFRWENG 4G06 - Capstone\capstone--source-code-optimizer\src\ecooptimizer\api\routes\refactor_smell.py", line 103, in perform_refactoring
modified_files: list[Path] = refactorer_controller.run_refactorer(
File "C:\Users\sevhe\OneDrive - McMaster University\Year 5\SFRWENG 4G06 - Capstone\capstone--source-code-optimizer\src\ecooptimizer\refactorers\refactorer_controller.py", line 48, in run_refactorer
refactorer.refactor(target_file, source_dir, smell, output_file_path, overwrite)
File "C:\Users\sevhe\OneDrive - McMaster University\Year 5\SFRWENG 4G06 - Capstone\capstone--source-code-optimizer\src\ecooptimizer\refactorers\long_parameter_list.py", line 134, in refactor
modified_source = astor.to_source(updated_tree)
UnboundLocalError: local variable 'updated_tree' referenced before assignment
I'd strongly suggest you install the Pylance vscode extension if you haven't already. For me your code looks like this:


Here is the smell I attempted to refactor:
Maybe the
**kwargswas the issue?this is the error:
I'd strongly suggest you install the
Pylancevscode extension if you haven't already. For me your code looks like this: