redbaron icon indicating copy to clipboard operation
redbaron copied to clipboard

Regression with functions that contain with statement top level

Open kayhayen opened this issue 8 years ago • 1 comments

Hello,

this is another regression that I have with 0.6.5 still:

testcase.zip

There is a comment in the middle of the try statement. Not sure if it's at fault.

49 with tempfile.NamedTemporaryFile() as prof_file: 50 vmprof.enable(prof_file.fileno(), 0.001) 51 52 try: 53 program = sys.argv[1] 54 del sys.argv[1] 55 56 <---- here

Thanks in advance, Kay

kayhayen avatar Jan 27 '17 07:01 kayhayen

This is another, quite similar case, here it hates a comment before elif. Seems I really like to put comments where nobody else does? :)

testcase2.zip

I am assuming this is the same kind of error. It might be new in 0.6.5 or 0.6.4, I didn't check, it surely wasn't there in 0.6.3.

kayhayen avatar Jan 27 '17 07:01 kayhayen