Comments (8)
All bug fixed! Thanks so much!
from vscode-inline-parameters.
@l1997i I do not work in Python much and did not realize that using the f-strings
would only work with versions of Python >= 3.6. Thanks for making me aware of that! I have added a fix in commit ffbc5a0, which hopefully solves the problem by using string concatenation with the +
operator instead of using f-strings
.
I have also added a inline-parameters.python.executablePath
setting that allows you to change that command to use python3
instead of the default python
.
I have published version 1.1.2
. please try that version and let me know if the program now works with Python2 or Python3 versions earlier than 3.6
from vscode-inline-parameters.
Still doesn't work. I've set inline-parameters.python.executablePath
to python3
, but the output says it still runs on Python2.7
, which will cause 'Num' object has no attribute 'end_lineno' error.
Traceback (most recent call last):
File "/home/luis/.vscode-server/extensions/robertostermann.inline-parameters-extended-1.1.2/out/src/python/helpers/main.py", line 39, in <module>
main()
File "/home/luis/.vscode-server/extensions/robertostermann.inline-parameters-extended-1.1.2/out/src/python/helpers/main.py", line 10, in main
analyzer.visit(tree)
File "/usr/lib/python2.7/ast.py", line 241, in visit
return visitor(node)
File "/usr/lib/python2.7/ast.py", line 249, in generic_visit
self.visit(item)
File "/usr/lib/python2.7/ast.py", line 241, in visit
return visitor(node)
File "/usr/lib/python2.7/ast.py", line 251, in generic_visit
self.visit(value)
File "/usr/lib/python2.7/ast.py", line 241, in visit
return visitor(node)
File "/home/luis/.vscode-server/extensions/robertostermann.inline-parameters-extended-1.1.2/out/src/python/helpers/main.py", line 21, in visit_Call
argument_end_line = "argument end line: " + str(argument.end_lineno)
AttributeError: 'Num' object has no attribute 'end_lineno'
By the way, I also manually run the command using Python3
,
python3 /home/luis/.vscode-server/extensions/robertostermann.inline-parameters-extended-1.1.2/out/src/python/helpers/main.py /home/luis/test/test.py
it works,
expression line: 4 | expression character: 0 | argument start line: 4 | argument start character: 4 | argument end line: 4 | argument end character: 5
expression line: 4 | expression character: 0 | argument start line: 4 | argument start character: 7 | argument end line: 4 | argument end character: 8
NEW EXPRESSION
from vscode-inline-parameters.
I've fix this and make a pull request #5.
from vscode-inline-parameters.
@l1997i Did you reload your VSCode window after changing the Python path environment variable? I think it should work after reload and I can add a popup to let users know that.
from vscode-inline-parameters.
@l1997i Did you reload your VSCode window after changing the Python path environment variable? I think it should work after reload and I can add a popup to let users know that.
@RobertOstermann Yes, I have. I even reopen the VS Code.
from vscode-inline-parameters.
Ok, I have published version 1.1.3 with changes from 4daccfc that should allow Python 2.7 to work with this extension. I also added the Python command that is being run in the inline-parameters-extended
output tab. That might show that python3
is being run correctly? If not I am not sure why it is not respecting the setting, but I looked at your PR #5 and like the idea of using the ms-python
extension setting for the python path. I will get that merged and push out a new version with those changes.
from vscode-inline-parameters.
@l1997i I have merged your changes and slightly altered them in 078dbe7 to allow for the configured path to take priority when it is set. I published version 1.1.4
with those changes. Let me know if that fixes all the bugs you were seeing.
from vscode-inline-parameters.
Related Issues (15)
- Golang: missing parameter hint on variable function call. HOT 2
- How to make the background color transparent
- The last one is outside the bracket (golang) HOT 5
- Extension causes high cpu load HOT 2
- vscodium support HOT 2
- Are any way to remove background on the inline name parameters ? HOT 2
- Python: single letter parameters aren't handled HOT 2
- PHP: wrong inlay hints HOT 5
- Golang support plan? HOT 2
- Go parameters start with struct name for methods HOT 4
- JS/TS support HOT 2
- Inline parameters don't show when there is a space in the file path HOT 20
- How to modify the background color HOT 2
- Java: parameter hints duplication HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-inline-parameters.