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

PR: Prevent Python variable validation to get current word and position when doing completions #20226

Merged
merged 2 commits into from
Dec 20, 2022

Conversation

dalthviz
Copy link
Member

@dalthviz dalthviz commented Dec 19, 2022

Description of Changes

  • Wrote at least one-line docstrings (for any new functions)
  • Added unit test(s) covering the changes (if testable)
  • Included a screenshot or animation (if affecting the UI, see Licecap)

When doing completions, the LSP provides also completions for file names. Files that start with number were not completed correctly since a validation for valid Python variables was being always made when getting the current word and position.

Preview

file_completion

Issue(s) Resolved

Fixes #20156

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: dalthviz

@ccordoba12
Copy link
Member

Looks good to me @dalthviz, thanks!

Please rebase to get the fixes to our tests in PR #20224, then I'll merge.

@dalthviz
Copy link
Member Author

@ccordoba12 just for testing, I enabled an option that allows doing merge/rebases to PRs from the GitHub interface if the PR branch is not up to date with the PR base branch (Settings -> Always suggest updating pull request branches ). Maybe it could be worthy to keep it so contributors have a more easy time if they need to do a rebase or merge to update their PRs?

@ccordoba12
Copy link
Member

Maybe it could be worthy to keep it so contributors have a more easy time if they need to do a rebase or merge to update their PRs?

Good idea! I agree with that.

I also see that this change breaks test_kite_textEdit_completions. Since we don't support Kite anymore, please remove it.

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Thanks @dalthviz!

@ccordoba12 ccordoba12 merged commit f586c20 into spyder-ide:5.x Dec 20, 2022
ccordoba12 added a commit that referenced this pull request Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants