Skip to content

Fix snippets behaviour in an import statement #691

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

Merged
merged 4 commits into from
Nov 9, 2019

Conversation

steff456
Copy link
Contributor

@steff456 steff456 commented Nov 8, 2019

This change allows to determine if the user is writing an import statement and only return the completion without the snippets.

Fixes spyder-ide/spyder#10276.

@ccordoba12 ccordoba12 changed the title PR: Fix snippets behaviour in an import statement Fix snippets behaviour in an import statement Nov 9, 2019
@ccordoba12 ccordoba12 added this to the 0.30.1 milestone Nov 9, 2019
Copy link
Contributor

@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.

This looks good @steff456 but a test is missing for it. Please use the case reported in spyder-ide/spyder#10276.

Copy link
Contributor

@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 a lot @steff456! This is working as expected.

@ccordoba12 ccordoba12 merged commit 71c2fc5 into palantir:develop Nov 9, 2019
@muffinmad
Copy link
Contributor

Would be nice to handle multiline imports like

from datetime import date,\
    datetime

@ccordoba12
Copy link
Contributor

@muffinmad, you're totally right. Could you open a new issue about that? Thanks!

@muffinmad
Copy link
Contributor

muffinmad commented Nov 11, 2019

@muffinmad, you're totally right. Could you open a new issue about that? Thanks!

Done. Please see #694

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.

Autocomplete introduces code snippet in import statement
3 participants