Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: VSCode doesn't highlight properties of PythonObjects correctly #1098

Closed
soraros opened this issue Oct 19, 2023 · 2 comments
Closed

[BUG]: VSCode doesn't highlight properties of PythonObjects correctly #1098

soraros opened this issue Oct 19, 2023 · 2 comments
Assignees
Labels
bug Something isn't working mojo Issues that are related to mojo mojo-tooling Tag for all issues related to repl, lldb, lsp, vscode extension.

Comments

@soraros
Copy link
Contributor

soraros commented Oct 19, 2023

Bug description

As title. Also, it says __getattr__, which doesn't match the name of the property accessed. Maybe PythonObject has some magic built in that causes this?

Steps to reproduce

Consider the following code snippet:

from python import Python


def main():
    let o = Python.import_module("math")
    _ = o.sin(1).to_float64()#

Notice the blue shade extending beyond sin in the screenshot:

Screenshot 2023-10-19 at 23 53 04

System information

- OS: Docker on macOS Intel
- mojo -v: mojo 0.4.0 (9e33b013)
- modular -v: modular 0.2.1 (5144fffe)
@soraros soraros added bug Something isn't working mojo Issues that are related to mojo labels Oct 19, 2023
@ematejska ematejska added the mojo-tooling Tag for all issues related to repl, lldb, lsp, vscode extension. label Oct 23, 2023
@River707
Copy link
Collaborator

Thanks for filing! Must be some weird source location handling in the lsp, will take a look!

@River707 River707 self-assigned this Oct 31, 2023
@River707 River707 closed this as completed Nov 7, 2023
@River707
Copy link
Collaborator

River707 commented Nov 7, 2023

This should be fixed in the next release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mojo Issues that are related to mojo mojo-tooling Tag for all issues related to repl, lldb, lsp, vscode extension.
Projects
None yet
Development

No branches or pull requests

3 participants