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 miss-capturing of assign statement after a dedent. #11418

Merged
merged 1 commit into from Oct 21, 2018

Conversation

Projects
None yet
1 participant
@Carreau
Member

Carreau commented Oct 20, 2018

closes #11415

This fixes a bug where assign statement were miscaptured when occuring
after a dedent. This was due to the fact that :

>>> '' in '({['
True

That is to say the empty string is in any strings.
Add a couple of integration tests and unit tests as well, and also add a
warning to public function when not used properly, in particular, check
that lines passed to make_tokens_by_line do end with an endline marker
(at least for the first line), otherwise the function does not behave
properly.

Fix miss-capturing of assign statement after a dedent.
closes #11415

This fixes a bug where assign statement were miscaptured when occuring
after a dedent. This was due to the fact that :

>>> '' in '({['
True

That is to say the empty string is in any strings.
Add a couple of integration tests and unit tests as well, and also add a
warning to public function when not used properly, in particular, check
that lines passed to make_tokens_by_line do end with an endline marker
(at least for the first line), otherwise the function does not behave
properly.

@Carreau Carreau requested a review from takluyver Oct 20, 2018

@Carreau Carreau added this to the 7.1 milestone Oct 20, 2018

@Carreau Carreau merged commit 5c506dc into ipython:master Oct 21, 2018

4 checks passed

codecov/patch 94.44% of diff hit (target 0%)
Details
codecov/project 68.29% (+<.01%) compared to 4b3baed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Carreau Carreau deleted the Carreau:fix-assign-detection branch Oct 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment