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

Merged
merged 1 commit into from
Oct 21, 2018

Conversation

Carreau
Copy link
Member

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

closes ipython#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 October 20, 2018 17:52
@Carreau Carreau added this to the 7.1 milestone Oct 20, 2018
@Carreau Carreau merged commit 5c506dc into ipython:master Oct 21, 2018
@Carreau Carreau deleted the fix-assign-detection branch October 21, 2018 15:39
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.

Capturing shell command output after indentation causes SyntaxError in IPython console.
1 participant