Dedent prefix bugfix + tests: #142 #346

Merged
merged 2 commits into from Apr 10, 2011

Conversation

Projects
None yet
3 participants
@dwf
Contributor

dwf commented Apr 9, 2011

Re: issue #142, this expands the inputsplitter regex for 'dedentation' to correctly handle ignore lines such as "passes += 1", which should not dedent even though it begins with "pass". It's fine with arbitrary trailing whitespace and a few other wacky corner cases (return() is valid Python, as is return(0), same with raise(TypeError()), etc. -- these only dedent if you at least have a close paren after the open paren.)

Also adds tests for these new behaviours.

@takluyver

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver Apr 9, 2011

Member

Works for me. Thanks, David.

Member

takluyver commented Apr 9, 2011

Works for me. Thanks, David.

@dwf

This comment has been minimized.

Show comment
Hide comment
@dwf

dwf Apr 10, 2011

Contributor

Okay, I think I've got the hang of it. It appears you can have a period afterward and it will still work (tested in a dummy project). Sorry if anyone got flooded with email. :P

Contributor

dwf commented Apr 10, 2011

Okay, I think I've got the hang of it. It appears you can have a period afterward and it will still work (tested in a dummy project). Sorry if anyone got flooded with email. :P

@fperez fperez merged commit 2b92905 into ipython:master Apr 10, 2011

@fperez

This comment has been minimized.

Show comment
Hide comment
@fperez

fperez Apr 10, 2011

Member

Thanks a lot David! Merged and pushed. Good luck with those exams :)

Member

fperez commented Apr 10, 2011

Thanks a lot David! Merged and pushed. Good luck with those exams :)

@dwf

This comment has been minimized.

Show comment
Hide comment
@dwf

dwf Apr 10, 2011

Contributor

On 2011-04-10, at 2:43 AM, fperez wrote:

Thanks a lot David! Merged and pushed. Good luck with those exams :)

Reply to this email directly or view it on GitHub:
#346 (comment)

Very welcome. Thankfully it's exam, singular, and minor IPython hacking is proving to make for refreshing breaks from graph theory/dynamic programming proofs. :)

Contributor

dwf commented Apr 10, 2011

On 2011-04-10, at 2:43 AM, fperez wrote:

Thanks a lot David! Merged and pushed. Good luck with those exams :)

Reply to this email directly or view it on GitHub:
#346 (comment)

Very welcome. Thankfully it's exam, singular, and minor IPython hacking is proving to make for refreshing breaks from graph theory/dynamic programming proofs. :)

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