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

Improve Python statement range provider #6051

Open
juliasilge opened this issue Jan 18, 2025 · 0 comments
Open

Improve Python statement range provider #6051

juliasilge opened this issue Jan 18, 2025 · 0 comments
Labels
enhancement New feature or request lang: python

Comments

@juliasilge
Copy link
Contributor

We've gotten some helpful feedback on the Python statement range provider outlining some improvements.

Consider this function, where you have x defined locally so you can step through the function:

def add_some_numbers(x):
    y = x + 1
    z = (y > 4 &
    True)
    z
  1. Put your cursor at the end of line 2. Only that line is identified and Cmd+Enter works well but it moves the cursor forward to the end of the function, still inside but at the end.
  2. Put your cursor at the end of line 3. The whole function is identified as the statement, which is surprising.
  3. Select more than one line with your mouse, such as starting at y and ending at True) then send via Cmd+Enter. Because of the whitespace, the execution errors. This one may be the hardest to make feel nice because of Python whitespace issues.
@juliasilge juliasilge added enhancement New feature or request lang: python labels Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lang: python
Projects
None yet
Development

No branches or pull requests

1 participant