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

fix: use default selection range for python doc #2143

Closed
wants to merge 2 commits into from

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Dec 6, 2023

CLOSE #2100

The getDocCommandRange function that is used for setting the range for the /doc comment was modified to always return the default selection range instead of trying to move to the line below the function for python.

Test plan

Try to run the doc command in python code, the doc string should be added above the function name instead of below

@abeatrix abeatrix requested review from toolmantim, kalanchan and a team December 6, 2023 09:59
@@ -217,12 +217,8 @@ export function addSelectionToPrompt(prompt: string, code: string): string {
*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment is now outdated 😬

Copy link
Contributor

@toolmantim toolmantim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still seems to generate the comment above the function def for me, instead of below:

Screen.Recording.2023-12-06.at.9.07.20.pm.mov

@abeatrix
Copy link
Contributor Author

abeatrix commented Dec 6, 2023

This still seems to generate the comment above the function def for me, instead of below:

Screen.Recording.2023-12-06.at.9.07.20.pm.mov

woops i misunderstood the issue. thought you wanted it above the function name instead of below it, my bad 😅

@kalanchan
Copy link
Contributor

kalanchan commented Dec 12, 2023

@abeatrix tom also has the fix in #2290, we can close this after you review

@abeatrix abeatrix closed this Dec 28, 2023
@abeatrix abeatrix deleted the bee/fix-python-doc branch January 17, 2024 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: /doc command adds comments in wrong place for Python functions
4 participants