Open
Description
When you trying to make auto-name-refactor(F2 by default) of field or method etc. in your game script you will get popup error in VSCode looking like this:
Refactor failed. Syntax error in file <addons/pythonscript/osx-64/lib/Tix8.4.3/pref/WmDefault.py> line <86>: inconsistent use of tabs and spaces in indentation
[<FrameSummary file /home/user/.vscode-oss/extensions/ms-python.python-2020.10.332292344/pythonFiles/refactor.py, line 380 in watch>, <FrameSummary file /home/user/.vscode-oss/extensions/ms-python.python-2020.10.332292344/pythonFiles/refactor.py, line 346 in _process_request>, <FrameSummary file /home/user/.vscode-oss/extensions/ms-python.python-2020.10.332292344/pythonFiles/refactor.py, line 259 in _rename>, <FrameSummary file /home/user/.vscode-oss/extensions/ms-python.python-2020.10.332292344/pythonFiles/refactor.py, line 128 in refactor>, <FrameSummary file /home/user/.vscode-oss/extensions/ms-python.python-2020.10.332292344/pythonFiles/refactor.py, line 156 in onRefactor>, <FrameSummary file /home/user/.local/lib/python3.9/site-packages/rope/refactor/rename.py, line 97 in get_changes>, <FrameSummary file /home/user/.local/lib/python3.9/site-packages/rope/refactor/rename.py, line 195 in rename_in_module>, <FrameSummary file /home/user/.local/lib/python3.9/site-packages/rope/refactor/occurrences.py, line 76 in find_occurrences>, <FrameSummary file /home/user/.local/lib/python3.9/site-packages/rope/base/utils/__init__.py, line 12 in _wrapper>, <FrameSummary file /home/user/.local/lib/python3.9/site-packages/rope/refactor/occurrences.py, line 392 in source_code>, <FrameSummary file /home/user/.local/lib/python3.9/site-packages/rope/base/utils/__init__.py, line 12 in _wrapper>, <FrameSummary file /home/user/.local/lib/python3.9/site-packages/rope/refactor/occurrences.py, line 412 in pymodule>, <FrameSummary file /home/user/.local/lib/python3.9/site-packages/rope/base/project.py, line 116 in get_pymodule>, <FrameSummary file /home/user/.local/lib/python3.9/site-packages/rope/base/pycore.py, line 142 in resource_to_pyobject>, <FrameSummary file /home/user/.local/lib/python3.9/site-packages/rope/base/pycore.py, line 254 in get_pymodule>, <FrameSummary file /home/user/.local/lib/python3.9/site-packages/rope/base/pyobjectsdef.py, line 162 in __init__>, <FrameSummary file /home/user/.local/lib/python3.9/site-packages/rope/base/pyobjectsdef.py, line 191 in _init_source>]
In the end name-refactor makes no effect. I think I just need to exclude somehow /addons/pythonscript from VSCode view so it will stop trying to look where it doesn`t need but have no clue how to do it properly.
How to reproduce:
- Create or open project
- Import pythonscript plugin from assetlib
- Create your first python-script and open it with VSCode
- Declare a variable and try to rename it, using refactor feature(F2 by default)
- And now you here...
Sorry if this issue is a little to offtopic but anyway someone else will encounter it I think, so might be helpful to leave it here. Give me a tip.
Thanks.